Jesus was recorded as pronouncing forgiveness of a person for past sins because of the person's faith and repentance (for example, the woman in Luke 7:36-50 who washed His feet with her tears while He was dining at the home of Simon the Pharisee), with no indication of the person undergoing subsequent punishment for those sins. (In fact, Jesus told the woman in the cited passage to go in peace.)
(C.S. Lewis regarded the fact that Jesus forgave people's sins without consulting or involving any of the individuals whom the sinner might have injured as one of the clearest and most convincing assertions of His identity and authority as God Incarnate (as even His enemies recognized (Luke 7:49)), and as the Being who was the chief party concerned and offended by human sin, regardless of whomever else the sinner's actions might have affected.)
In addition, the prophet Isaiah was told that his sins had been forgiven (Isaiah 6:7), with no indication of specific misdeeds on his part, or of his subsequent punishment for anything that he had previously done.

You know the greatest expression of inward knowledge of a person's heart is expressed when Jesus declared plainly who he was to the woman at the well. He made it very plain and confessed openly that he was the Messiah to her.
Let's look at who she was: adulterous, a Samaritan, which was of course not of any importance to Jesus, but the Jews in general looked down on any half-Jews.
She had many husbands and was living with a man not her husband. But she was religiously searching and wondering about the Messiah in her heart and was concerned and wondering about true and proper worship of God.
We don't know if she ever changed her life but she was knowledgeable enough to realize that Jesus was a prophet and knew only a prophet of God could have this knowledge about her personal life.
God knows the inward mind or the spiritual heart of a person, yet we see the actions of the flesh but they don't always convey the mind of a person's spiritual search in their heart.
You just never know who is searching for God in all the wrong places so we have to hear the Holy Spirit speak when we are presented with an opportunity to guide people to truth and salvation.
Just thoughts!
Selah!
Jaybird

All of us who believe on Jesus Christ are forgiven, and Christ has taken our punishment on Himself in our place! Look at Paul for an example: He stated he was the chief of sinners (I Timothy 1:15) and yet Christ (God the Son) forgave him and made him the apostle to the gentiles! Or look at Peter for another example: He denied he knew Christ and yet Christ (God the Son) used him to start the church on the Day of Pentecost! Yes indeed, God truly forgives sin! Confess your sins, and trust that He forgives you through Jesus Christ, and you will indeed be forgiven!