If we confess our sins, he is faithful and righteous to forgive us the sins, and to cleanse us from all unrighteousness.
and to cleanse us from all unrighteousness: Vincent says that God "not only forgives but removes" (317). He removes the contamination of sin from our lives by cleansing "from all unrighteousness." To "cleanse" is "to make clean...from the defilement of sin" (Vine 195). When God forgives, He wipes the slate clean by applying the cleansing blood of Christ. The blood of Christ is God’s eraser by which He thoroughly removes all traces of sin from the lives of His people. "Unrighteousness" is simply the opposite of righteousness, or, as Lenski says, "anything contradicting the divine norm of right" (394). Upon the confession of our sins, God forgives them and removes our unrighteousness; consequently, we retain our righteous state before Him.