If we confess our sins, He is faithful and righteous in order that He should forgive our sins an cleanse us from all unrighteousness, 1 John 1:9
Confess means to verbally acknowledge or say the same thing. It is calling out our sinful actions for what they are in agreement with God. Since sin is always exterior to the body—we cannot sin in our minds (1 Corinthians 6:18; James 1:15; Matthew 15:11)—we are not dealing with a trespass but with the result of accepting a temptation as our own, determining to act upon it, and fulfilling it.
Since all sin has a quality of unrighteousness—for unrighteousness involves not only the actions but also the thought process that brings about the sin—calling our sinful actions out for what they are results in forgiveness of that sin and cleansing from all unrighteousness. This cleansing takes place as we walk in the light by applying the truth (Romans 6:4–6, 11, 13), thereby having fellowship with other saints, so that the blood of Christ keeps on cleansing us from our sins (1 John 1:7).