Can I confess to a priest before getting baptized?

I would like to confess to a priest but not sure if I can do that before getting baptized.

Can. 842 ยง1. A person who has not received baptism cannot be admitted validly to the other sacraments.

A person first needs to be baptized before they can go to confession. Baptism forgives all sins, confession is only for those who sin after baptism.

DISCLAIMER: The views and opinions expressed in these forums do not necessarily reflect those of Catholic Answers. For official apologetics resources please visit