The seven sacraments · Question 1.3
“Does everyone who wasn't baptized go straight to hell?”

Baptism — a new life that begins with water
The Church's answer: The Church teaches plainly that baptism is the way of salvation Christ gave us, and she also says that God cannot be locked up inside the sacraments. Someone who through no fault of their own never knew the Gospel but sought the truth and did good as their conscience directed, and someone who wanted baptism but never received it, are entrusted to God's mercy. No one has the authority to look at a particular person and declare, “no baptism, so hell.”
If they press further: “Then baptism isn't necessary?” — That is not what it means. It is not saying you may as well not take the gift. The Church keeps urging baptism faithfully while confessing, at the same time, that God's mercy is larger than our verdicts.
In one sentence: “Baptism is a precious and necessary sacrament of salvation, but we don't condemn anyone who wasn't baptized — we leave them to God's mercy.”