Psalm 51 Verse by Verse: David’s Prayer of Repentance and Restoration
What’s Inside: In this article, we’ll walk through Psalm 51 verse by verse and look at David’s prayer of repentance after his sin with Bathsheba and Uriah. We’ll see what this psalm teaches about confession, mercy, cleansing, a clean heart, restored joy, and the kind of broken and contrite heart God does not despise.

Psalm 51 is one of the clearest prayers of repentance in the Bible. It shows us what it looks like when someone stops hiding, stops making excuses, and comes honestly before God for mercy.
The background is David’s sin with Bathsheba and against Uriah. After David tried to cover his sin, God sent Nathan the prophet to confront him. Psalm 51 gives us David’s prayer after his sin was exposed.
As we’ll see, Psalm 51 is not mainly about how terrible David was, though his sin was serious. It is about how merciful God is to those who come to Him with a repentant heart.
True repentance is more than feeling bad about consequences. It includes honest confession, a desire to be cleansed, a longing for inward renewal, and a return to joyful worship.
Psalm 51 At a Glance
Before we dive into our verse by verse study of Psalm 51, here’s an at a glance view of the psalm.
| Author | David |
| Superscription | “To the Chief Musician. A Psalm of David when Nathan the prophet went to him, after he had gone in to Bathsheba.” |
| Type of Psalm | Penitential; also includes elements of lament and wisdom |
| Main Theme | Confession, repentance, cleansing, and restoration after sin |
| Key Verse | “Create in me a clean heart, O God, And renew a steadfast spirit within me.” — Psalm 51:10, NKJV |
| Main Images or Symbols | Cleansing, washing, hyssop, a clean heart, a broken and contrite heart |
| Names of God Used | God — Elohim; Lord — Adonai |
| New Testament Connection | No direct New Testament quotation identified, but the psalm strongly connects with New Testament themes of repentance, forgiveness, cleansing, and the need for a renewed heart. |
| Best Known For | David’s prayer of repentance after his sin with Bathsheba, especially the cry, “Create in me a clean heart, O God.” |

Psalm 51 shows us the movement of true repentance: confession, cleansing, renewal, restored joy, and worship. As we walk through the psalm verse by verse, we’ll see how David brings his guilt to God and finds mercy, cleansing, and restoration.
Digging deeper: If you’d like help reading the Psalms with more understanding and application, I’d love to walk through them with you. Just fill out the form below. :)
Psalm 51 Verse By Verse
Now let’s get into our verse by verse study of Psalm 51.
Psalm 51:1–2 Have Mercy on Me
We’ll start by taking a look at Psalm 51:1–2.
Have mercy upon me, O God,
According to Your lovingkindness;
According to the multitude of Your tender mercies,
Blot out my transgressions.
Wash me thoroughly from my iniquity,
And cleanse me from my sin.
Psalm 51 begins with David asking God for mercy.
That matters because David does not begin by explaining himself, defending himself, or blaming anyone else. He does not point to his past faithfulness, his role as king, or anything good he has done.
He comes to God with one plea: “Have mercy upon me.”
David knows he has no excuse. His only hope is the mercy of God.
According to Your Lovingkindness
David asks for mercy “according to Your lovingkindness.”
The word translated “lovingkindness” points to God’s steadfast, faithful love. David’s hope is not in his own faithfulness, but in the faithful love of God.
That is one of the most important lessons in Psalm 51. True repentance does not minimize sin, but it also does not run from God in despair. David knows his sin is serious, but he also knows God is merciful.
He also appeals to the “multitude” of God’s tender mercies. David is not asking for a small amount of mercy. He needs abundant mercy because his sin is great.
Blot Out, Wash, and Cleanse
David uses three phrases to describe what he needs God to do:
- Blot out my transgressions.
- Wash me thoroughly from my iniquity.
- Cleanse me from my sin.
These words show that David understands the seriousness of what he has done. Sin is guilt that needs to be blotted out, filth that needs to be washed away, and defilement that needs to be cleansed.
David also uses several words for sin: transgression, iniquity, and sin.
Transgression carries the idea of rebellion or crossing a boundary God has set. Iniquity points to guilt, twistedness, or moral corruption. Sin is falling short of God’s holy standard.
David is not trying to soften what he has done. He is agreeing with God about it.
Psalm 51 starts here because true repentance starts here. We come to God honestly, without excuses, asking for mercy only He can give.
Psalm 51:3–4 Against You, You Only, Have I Sinned
Next, let’s look at Psalm 51:3–4.
For I acknowledge my transgressions,
And my sin is always before me.
Against You, You only, have I sinned,
And done this evil in Your sight—
That You may be found just when You speak,
And blameless when You judge.
In these verses, David plainly acknowledges his sin. He didn’t make excuses.
He does not say, “I made a poor choice,” even though he did. He does not say, “I was under pressure,” or “Other people failed too.” He says, “I acknowledge my transgressions.”
David is no longer hiding. He is agreeing with God about what he has done.
My Sin Is Always Before Me
David says, “My sin is always before me.”
That does not mean he is wallowing in guilt for the sake of guilt. It means he is deeply aware of his sin and cannot simply brush it aside.
Before Nathan confronted him, David had tried to cover his sin. But once God exposed it, David could no longer pretend everything was fine.
This is part of true repentance. We stop trying to manage appearances and come honestly before the Lord.
Against You, You Only
At first, David’s words may sound surprising: “Against You, You only, have I sinned.”
After all, David’s sin hurt real people. He sinned against Bathsheba. He sinned against Uriah. He sinned against his family and the nation he was called to lead.
So David is not saying that no one else was harmed.
Rather, he is recognizing that all sin is ultimately against God. Every sin is committed before Him, in His sight, and against His holy character.
That is why David says he has done evil “in Your sight.” His deepest grief is not merely that he was caught, or that consequences would follow. His deepest grief is that he has sinned before God.
God Is Just When He Judges
David also says, “That You may be found just when You speak, and blameless when You judge.”
In other words, David is admitting that God is right. Whatever God says about David’s sin is true. Whatever judgment God gives is just.
This is another mark of real repentance. David is not arguing with God’s verdict. He is bowing before it.
Psalm 51:3–4 shows us that true confession is honest. It names sin for what it is, recognizes that sin is ultimately against God, and admits that God is right in His judgment.
Digging deeper: Psalm 51 is a classic example of a penitential psalm. Learn more about penitential psalms.
Psalm 51:5–6 Sin Runs Deeper Than Actions
Next, let’s look at Psalm 51:5–6.
Behold, I was brought forth in iniquity,
And in sin my mother conceived me.
Behold, You desire truth in the inward parts,
And in the hidden part You will make me to know wisdom.
In these verses, David moves from confessing what he has done to recognizing something deeper about his own heart.
Psalm 51 is not only about one sinful act. It is about the sinful nature beneath that act.
David is not blaming his mother or saying that his birth was sinful. He is acknowledging that sin has marked him from the beginning of his life. His problem is not only external behavior. His problem goes all the way down into the heart.
You Desire Truth in the Inward Parts
David says, “You desire truth in the inward parts.”
God does not only care about what can be seen on the outside. He cares about what is true in the hidden places of the heart.
David had tried to cover his sin outwardly, but God saw the truth inwardly.
That is still how God works. We may be able to hide things from other people for a time, but we cannot hide the condition of our hearts from the Lord.
Wisdom in the Hidden Part
David also says, “In the hidden part You will make me to know wisdom.”
In other words, David needs more than outward correction. He needs God to teach him wisdom deep within.
That is one reason Psalm 51 is so helpful. It shows that true repentance is not merely behavior management. David does not only need to stop doing wrong. He needs God to deal with the heart that produced the wrong.
That is why the later prayer, “Create in me a clean heart,” matters so much. David understands that sin runs deeper than actions, and cleansing must go deeper too.
Psalm 51:5–6 reminds us that God wants truth in the inward parts. He is not looking for a polished appearance covering an unchanged heart. He desires honesty, humility, and inward renewal.
Psalm 51:7–9 Wash Me, and I Shall Be Clean
Next, let’s look at Psalm 51:7–9.
Purge me with hyssop, and I shall be clean;
Wash me, and I shall be whiter than snow.
Make me hear joy and gladness,
That the bones You have broken may rejoice.
Hide Your face from my sins,
And blot out all my iniquities.
In these verses, David continues asking God for cleansing.
He knows he cannot cleanse himself. He cannot undo what he has done. He cannot erase his own guilt. So he asks God to do what only God can do.
Purge Me with Hyssop
David says, “Purge me with hyssop, and I shall be clean.”
Hyssop was a small plant used in Old Testament cleansing rituals, including purification from ceremonial uncleanness.
So when David asks to be purged with hyssop, he is picturing himself as someone unclean who needs God to purify him.
This is not a light request. David is not asking God to simply make him feel better. He is asking God to cleanse him deeply.
Whiter Than Snow
David then says, “Wash me, and I shall be whiter than snow.”
That is a beautiful picture of complete cleansing. David’s sin has stained him, but he believes God can make him clean.
This does not mean David is pretending he never sinned. It means he is trusting that God’s mercy is greater than the stain of his sin.
The Bones You Have Broken
David also says, “Make me hear joy and gladness, that the bones You have broken may rejoice.”
This is strong language. David feels crushed under the weight of conviction and God’s discipline. His sin has not brought freedom, joy, or peace. It has brought misery. This is a classic example of how the pain of sin is always greater than the momentary pleasure of sin.
But even here, David asks for joy again.
He believes the God who has broken him through conviction can also restore him through mercy.
Hide Your Face from My Sins
Finally, David says, “Hide Your face from my sins, and blot out all my iniquities.”
Earlier, David admitted that his sin was done in God’s sight. Now he asks God to turn His face away from his sins and blot them out.
This is not David asking God to ignore evil. It is a plea for forgiveness.
Psalm 51:7–9 shows us that true repentance looks to God for cleansing. David does not merely want relief from consequences. He wants the stain of sin removed, the weight of guilt lifted, and joy restored.
Digging deeper: Learn more about the Psalms David wrote.
Psalm 51:10–12 Create in Me a Clean Heart
Next, let’s look at Psalm 51:10–12.
Create in me a clean heart, O God,
And renew a steadfast spirit within me.
Do not cast me away from Your presence,
And do not take Your Holy Spirit from me.
Restore to me the joy of Your salvation,
And uphold me by Your generous Spirit.
These are some of the most well-known verses in Psalm 51.
David has already asked God to blot out his sin, wash him, cleanse him, and make him whiter than snow. But now his prayer goes even deeper.
He does not only want forgiveness for what he has done. He wants God to change his sinful heart.
Create in Me a Clean Heart
David says, “Create in me a clean heart, O God.”
The word “create” is important. David is not asking for a small adjustment or a little self-improvement. He is asking God to do a work in him that only God can do.
A clean heart is a purified inner life. It includes our desires, thoughts, motives, and will.
This is one of the clearest signs of true repentance. David does not merely pray, “Lord, get me out of trouble.” He prays, in effect, “Lord, make me clean from the inside out.”
Renew a Steadfast Spirit Within Me
David also asks God to “renew a steadfast spirit” within him.
A steadfast spirit is a firm, steady, faithful spirit. David knows he does not only need to be forgiven. He needs to be made steady so he can walk faithfully before the Lord.
That is a prayer every believer can understand. After we sin, we do not only need cleansing from the past. We need God’s help to stand firm going forward.
Do Not Cast Me Away
David then prays, “Do not cast me away from Your presence, and do not take Your Holy Spirit from me.”
These words show how deeply David values fellowship with God.
David had seen what happened to Saul when the Spirit of the Lord departed from him. So this is not a casual request. David knows that no position, success, or earthly blessing can make up for the loss of God’s presence.
For believers today, we should read this prayer in light of the fuller revelation of the New Testament. Those who belong to Christ are sealed with the Holy Spirit. Yet David’s prayer still teaches us something important: sin damages fellowship and joy, and the presence of God is more precious than anything else.
Restore to Me the Joy of Your Salvation
Finally, David asks, “Restore to me the joy of Your salvation.”
He does not say, “Give me salvation,” as if he has never belonged to God. He asks for the joy of salvation to be restored.
Sin steals joy. It clouds our fellowship with God. It makes worship feel distant and prayer feel heavy.
But David believes joy can return. He asks God to restore what sin has damaged. That thought brings me such hope! Even after the pain of sin, God – and only God – can restore our joy.
Psalm 51:10–12 shows that true repentance longs for more than forgiveness. It longs for a clean heart, a steady spirit, God’s presence, and the restored joy of salvation.
Psalm 51:13–15 Then I Will Teach and Praise
Next, let’s look at Psalm 51:13–15.
Then I will teach transgressors Your ways,
And sinners shall be converted to You.
Deliver me from the guilt of bloodshed, O God,
The God of my salvation,
And my tongue shall sing aloud of Your righteousness.
O Lord, open my lips,
And my mouth shall show forth Your praise.
In these verses, David looks ahead to what restored fellowship with God will produce.
He does not treat forgiveness as the end of repentance. Once God cleanses and restores him, David wants his life and words to point others back to the Lord.
Then I Will Teach Transgressors Your Ways
David says, “Then I will teach transgressors Your ways, and sinners shall be converted to You.”
This does not mean sin qualifies a person for ministry. David’s sin was serious and destructive. But it does show that a restored sinner can become a witness of God’s mercy.
David knows what it is to sin grievously. He also knows what it is to be confronted, humbled, forgiven, and restored. Because of that, he can teach other sinners the ways of God.
A person who has truly received mercy should become more humble, not more careless. They should be able to say, “Do not run from God. Come to Him. He is merciful to the repentant.”
Deliver Me from the Guilt of Bloodshed
David then prays, “Deliver me from the guilt of bloodshed.”
This likely points back to Uriah. David had not merely committed adultery. He had also arranged the death of an innocent man.
That makes this prayer even more sobering. David is not speaking vaguely about sin. He is acknowledging real guilt before God.
Yet even here, he calls God “the God of my salvation.”
David’s guilt is great, but he still looks to God as his Deliverer.
O Lord, Open My Lips
David also prays, “O Lord, open my lips, and my mouth shall show forth Your praise.”
Sin had closed David’s mouth in shame and guilt. Now he asks God to open his lips again.
This is a beautiful part of repentance. When God restores joy, He also restores praise. The forgiven person does not merely move on as if nothing happened. He worships with a deeper awareness of God’s mercy.
Psalm 51:13–15 reminds us that forgiveness should lead to renewed witness and renewed worship. Those who have been cleansed by God’s mercy should use their lives and their words to point others back to Him.

Free Psalm Study and Prayer Guide
Use this simple three-page guide to help you understand, apply, and pray any Psalm.
Psalm 51:16–17 A Broken and Contrite Heart
Next, let’s look at Psalm 51:16–17.
For You do not desire sacrifice, or else I would give it;
You do not delight in burnt offering.
The sacrifices of God are a broken spirit,
A broken and a contrite heart—
These, O God, You will not despise.
In these verses, David explains what God truly desires from him.
At first, this may sound surprising. After all, sacrifices were part of the worship God had commanded under the Old Covenant. David is not saying sacrifices were wrong or meaningless.
Instead, he is saying that outward worship is not enough when the heart is not right.
God Is Not Looking for Empty Religion
David says, “You do not desire sacrifice, or else I would give it.”
In other words, David knows he cannot simply bring an offering and act as if everything is fine. He cannot cover an unrepentant heart with religious activity.
It is possible to do the right outward things while avoiding honest repentance. A person can attend worship, say the right words, and keep up appearances while still refusing to humble themselves before God.
But God is not impressed by empty religion. He wants the heart.
A Broken and Contrite Heart
David says, “The sacrifices of God are a broken spirit, a broken and a contrite heart.”
A broken heart here does not mean hopeless despair. It does not mean self-hatred. It does not mean believing God is unwilling to forgive.
A broken and contrite heart is a humbled heart. It is the heart of someone who has stopped defending sin, stopped making excuses, and come low before God.
That kind of heart God does not despise.
This is one of the most encouraging statements in Psalm 51. God does not reject the person who comes to Him honestly, humbly, and repentantly.
Psalm 51:16–17 reminds us that true repentance is not religious performance. It is a humble heart before God. The Lord does not despise the broken and contrite heart that comes to Him for mercy.
Psalm 51:18–19 Do Good to Zion
Finally, let’s look at Psalm 51:18–19.
Do good in Your good pleasure to Zion;
Build the walls of Jerusalem.
Then You shall be pleased with the sacrifices of righteousness,
With burnt offering and whole burnt offering;
Then they shall offer bulls on Your altar.
Psalm 51 ends by widening the prayer.
David has been confessing his own sin, asking for cleansing, and praying for a renewed heart. But now he turns his attention to Zion and Jerusalem.
This matters because David’s sin did not affect only him. As king, his actions affected the people he led.
Do Good to Zion
David prays, “Do good in Your good pleasure to Zion.”
Zion refers to Jerusalem, the city closely connected with David’s reign and the worship of God.
David knows he needs mercy personally, but he also longs for God’s people to be blessed. His repentance does not make him think only about himself. It also makes him concerned for the spiritual good of the people.
That is another mark of true repentance. Sin often makes us self-focused, but repentance begins to turn us outward again toward God and others.
Build the Walls of Jerusalem
David also prays, “Build the walls of Jerusalem.”
This can be understood as a prayer for God to strengthen, protect, and establish His people. David’s sin had brought damage and danger, but he asks God to show favor to Zion.
Rather than assuming his sin was a private matter with no wider effect, David recognizes that his life before God matters for others too.
Sacrifices of Righteousness
The final verse mentions sacrifices again.
Earlier, David said God did not desire sacrifice if his heart was not right. But here, he speaks positively about sacrifices offered in righteousness.
That helps us understand the point. God was not rejecting the sacrificial system itself. He was rejecting outward worship without repentance.
When the heart is right before God, worship is no longer empty performance. It becomes a true offering of praise, obedience, and devotion.
Psalm 51:18–19 reminds us that repentance does not end with private relief. It leads us back into right worship, renewed concern for God’s people, and a desire for God to be honored among His people.
Conclusion
Psalm 51 is one of the clearest pictures of repentance in all of Scripture.
David does not come to God with excuses. He does not minimize his sin or blame someone else. He comes honestly, asking for mercy, cleansing, renewal, and restored joy.
That is what makes this psalm so helpful for us today.
Psalm 51 reminds us that sin is serious. It stains, damages, deceives, and separates us from the joy of close fellowship with God. But it also reminds us that sin is not stronger than the mercy of God.
The same God who exposes sin is also the God who cleanses repentant sinners. He can blot out guilt, wash away defilement, create a clean heart, renew a steadfast spirit, and restore the joy of salvation.
David’s prayer teaches us not to hide from God when we sin. The safest place to go with guilt is not away from Him, but to Him.
A broken and contrite heart is not despised by God. When we come to Him honestly and humbly, we find mercy, cleansing, and restoration.
Continue the Conversation
I’d love to hear how God used this blog post in your life.
If you’re on my email list, simply reply to one of my emails and share what stood out to you. I read every reply, and hearing how God is at work in the lives of readers is always an encouragement to me.
If you’re not yet subscribed, you can join below.
