The scriptures says, "Even while on earth, Jesus, by healing a paralytic, demonstrated that he had authority to forgive sins." Read Matthew 9:2-7.
Jehovah’s righteousness, justice, holiness, and purity are such that no sin can be condoned by him. (Psalm 5:4; Isaiah 6:3, 5; Habakkuk 1:13; 1 Peter 1:15) Consequently he could not forgive the sins of mankind without satisfying justice—in effect, without a legal basis. But through his undeserved kindness he made this just arrangement by providing his Son as a sacrificial offering, a propitiation, or a covering for sins. In this way he can righteously exercise mercy toward sinners who accept this arrangement.