I think it is the most comforting thought we can have. I used to think I could hide things from God. Actually, I had a lot of pain from my youth hidden from myself.
God brought things to light, and healed me. God knows our very thoughts.
"You know when I sit down and when I rise up. You understand my thought from afar." Psalm 139:2
God created us, he loves us, and he set Jesus to die for all those wrongful thoughts, sins and inner fears we fight.
"God demonstrates his love for us in this, that while we were yet sinners, Christ died for us." Romans 5:8
We can confess our sins and be cleaned. If God loved us before we knew him, how much more does he love us now?