Passage
Against thee, thee only, have I sinned, and done this evil in thy sight: that thou mightest be justified when thou speakest, and be clear when thou judgest.
Against thee, thee only, have I sinned, and done this evil in thy sight: that thou mightest be justified when thou speakest, and be clear when thou judgest.
Psalms 51:2 Wash me throughly from mine iniquity, and cleanse me from my sin.
Psalms 51:3 For I acknowledge my transgressions: and my sin is ever before me.
Psalms 51:4 Against thee, thee only, have I sinned, and done this evil in thy sight: that thou mightest be justified when thou speakest, and be clear when thou judgest.
Psalms 51:5 Behold, I was shapen in iniquity; and in sin did my mother conceive me.
Psalms 51:6 Behold, thou desirest truth in the inward parts: and in the hidden part thou shalt make me to know wisdom.
The verse centers on "justified", "against", "thee", "only", "sinned", "done", "evil", and "sight". It is saying that the verse draws attention to "justified" and "against", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 3's "For I acknowledge my transgressions and my..." into verse 5's "Behold I was shapen in iniquity and...", so "justified" and "against" belong inside that flow. In Psalms context, the local focus is worship, trust, the LORD's kingship, and covenant mercy.
A plain takeaway is to answer the verse's own emphasis on "justified" and "against" with trust shaped by these words, not by a vague optimism outside the passage.