John MacArthur writes:
Scripture tells us "God sees not as man sees, for man looks at the outward appearance, but the Lord looks at the heart" (1 Sam. 16:7). No sin--not even a whispered curse or a fleeting evil thought--is hidden from the view of God. In fact, if we realized that God himself is the only audience for such secret sins, we... might be less inclined to write them off so lightly.
The Bible declares that God will one day judge the secrets of every heart (Rom. 2:16). He "will bring every act to judgment, everything which is hidden, whether it is good or evil" (Eccl. 12:14).
Not only that, secret sins will not remain secret. "The Lord [will] bring to light the things hidden in the darkness" (1 Cor. 4:5). Jesus said, "There is nothing covered up that will not be revealed, and hidden that will not be known. Accordingly, whatever you have said in the dark shall be heard in the light, and what you have whispered in the inner rooms shall be proclaimed upon the housetops" (Luke 12:2-3). Those who think they can evade shame by sinning in secret will discover one day that open disclosure of their secrets before the very throne of God is the worst shame of all.
It is folly to think we can mitigate our sin by keeping it secret. It is double folly to tell ourselves that we are better than others because we sin in private rather than in public. And it is the very height of folly to convince ourselves that we can get away with sin by covering it up. "He who conceals his transgressions will not prosper" (Prov. 28:13).
All sin is an assault against our holy God, whether it is done in public or in secret. And God, who beholds even the innermost secrets of the heart, sees our sin clearly, no matter how well we think we have covered it.
(Taken from "Nothing Safe About Secret Sin" by John MacArthur)
For more see:
"Total Forgiveness and the Confession of Sin" - John MacArthur
"What in the World is the Christian Message?" - John MacArthur