The Catechism in Questions & Answers

130. Why did Jesus allow Himself to be baptised by John?

Jesus was without sin. Nevertheless, He allowed Himself to be baptised unto repentance by John the Baptist in the Jordan. This act of baptism—which was an expression of repentance—makes it clear that He abased Himself and subjected Himself to the same act that must be performed upon all sinners.

“But Jesus answered and said to him, ‘Permit it to be so now, for thus it is fitting for us to fulfil all righteousness.’”
Matthew 3: 15