Psalm 23 explained: the Lord is my shepherd, line by line
A line-by-line walk through Psalm 23 in the BSB and KJV: the Shepherd who provides, stays close in the dark valley, and welcomes his people home.
1 A Psalm of David. The LORD is my shepherd; I shall not want. 2 He makes me lie down in green pastures; He leads me beside quiet waters. 3 He restores my soul; He guides me in the paths of righteousness for the sake of His name. 4 Even though I walk through the valley of the shadow of death, I will fear no evil, for You are with me; Your rod and Your staff, they comfort me. 5 You prepare a table before me in the presence of my enemies. You anoint my head with oil; my cup overflows. 6 Surely goodness and mercy will follow me all the days of my life, and I will dwell in the house of the LORD forever.
— Psalm 23:1-6 (BSB)
1 A Psalm of David. The Lord is my shepherd; I shall not want. 2 He maketh me to lie down in green pastures: he leadeth me beside the still waters. 3 He restoreth my soul: he leadeth me in the paths of righteousness for his name’s sake. 4 Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me. 5 Thou preparest a table before me in the presence of mine enemies: thou anointest my head with oil; my cup runneth over. 6 Surely goodness and mercy shall follow me all the days of my life: and I will dwell in the house of the Lord for ever.
— Psalm 23:1-6 (KJV)
Psalm 23 is a song of trust written by David, who spent his youth keeping sheep. Its message is simple: because the Lord is his shepherd, he has everything he truly needs. God gives rest, restores the weary, leads in right paths, stays close in the darkest valley, honors his servant in front of his enemies, and pursues him with goodness all his life, until he is at home in God’s presence. The psalm moves from the fields to a banquet hall, and from the present to the far future. It does not deny danger. The valley and the enemies are real. What it denies is that anyone who belongs to this Shepherd is ever alone in them. Christians read the psalm in the light of Jesus, who called himself the good shepherd who lays down his life for the sheep. That is why these six verses are read at bedsides and gravesides alike.
A shepherd knew exactly what he was saying
David was the youngest son of Jesse and was out tending the flock when the prophet Samuel came to anoint Israel’s next king (1 Samuel 16:11). He knew what sheep need: grass, water, protection from wild animals, and someone to find them when they wander. When he calls the Lord his shepherd, he is not reaching for a sentimental picture. He is saying that God does for him everything a good shepherd does for helpless animals.
The image runs through the whole Bible. Rulers in the ancient world were often called shepherds of their people, and Israel’s leaders were meant to be shepherds too. When they failed, God promised to do the job himself.
11 For this is what the Lord GOD says: ‘Behold, I Myself will search for My flock and seek them out. 12 As a shepherd looks for his scattered sheep when he is among the flock, so I will look for My flock. I will rescue them from all the places to which they were scattered on a day of clouds and darkness.
— Ezekiel 34:11-12 (BSB)
Psalm 23 is one man’s experience of that promise.
Verses 1 to 3 show a Shepherd who provides
The Lord is my shepherd. Look at the name. LORD in small capitals stands for God’s covenant name, the name he made known to Moses. David is not trusting a vague higher power but the God who bound himself to Israel by promise. And look at the possessive. The psalm is personal from its first line.
I shall not want. This is the thesis of the whole psalm, and everything after it explains why it is true. It does not mean David will get everything he wishes for. It means he will lack nothing he truly needs, because the Shepherd knows what that is.
Green pastures and quiet waters. Sheep do not lie down when they are hungry, afraid or restless. A shepherd who makes them lie down has fed them and made them feel safe. The waters are quiet, the kind a sheep can drink from without being swept away. God’s care includes rest, not just survival.
He restores my soul. The Hebrew word can mean bringing back, the way a shepherd brings back a stray. It also carries the sense of reviving someone who is worn out. Either way, the renewal is God’s work, not ours.
Paths of righteousness for his name’s sake. God leads in right paths, and his motive is his own name, his character and reputation. That is good news. His faithfulness to us rests on who he is, not on how well we follow.
Verse 4 shows a Shepherd who stays
The valley of the shadow of death. The phrase describes deep darkness, a ravine where the light does not reach. It includes death but is wider than death: any season when danger feels close and the way ahead is hidden. The psalm does not say the Shepherd leads around such valleys. It says we walk through them.
For you are with me. Here the psalm changes its grammar. Up to this point David has spoken about God as he. In the valley he begins speaking to God directly. In the dark, the Shepherd is not a subject of discussion but a companion. Presence, not explanation, is what the psalm offers.
Your rod and your staff. A shepherd carried a club to drive off predators and a long staff to guide the sheep and pull them back from danger. Both tools comfort the sheep because both are used for them. God’s protection and his correction are both expressions of care.
Verses 5 and 6 show a Host who welcomes
A table in the presence of my enemies. The picture shifts from pasture to banquet. In the ancient Near East, a host who took in a guest was bound to protect him. God sets a meal for David while his enemies can only watch. They are not yet gone, but they cannot touch the guest.
You anoint my head with oil; my cup overflows. Oil on the head was a sign of honor and refreshment for a welcome guest. The overflowing cup means more than enough. The Shepherd who promised that David would lack nothing now gives abundance.
Goodness and mercy will follow me. The Hebrew verb behind follow often means to pursue. Enemies may chase David, but something stronger is on his trail: God’s goodness and his steadfast covenant love, every day of his life.
I will dwell in the house of the LORD forever. The psalm ends at home. For David this meant God’s presence among his people at the sanctuary. The Hebrew phrase is literally for length of days, and Christians have long read it, in the light of the whole Bible, as a hope that reaches beyond death.
The psalm finds its fullest meaning in Jesus
Jesus picked up this shepherd language and applied it directly to himself.
I am the good shepherd. The good shepherd lays down His life for the sheep.
— John 10:11 (BSB)
David’s Shepherd walked with him through the valley of the shadow of death. Jesus, the good shepherd, went into death itself for his sheep and came out the other side. Peter wrote that believers who had gone astray like sheep have now returned to the Shepherd and Overseer of their souls (1 Peter 2:25). And the Bible’s last book pictures the Lamb on the throne as a shepherd who leads his people to springs of living water and wipes away every tear (Revelation 7:17). The one who sets the table is also the one who gave his life so that we could sit at it. Read this way, Psalm 23 is not only David’s song. It belongs to every believer. Our guide to John’s Gospel traces how Jesus fills out this picture.
How to live by Psalm 23
Pray it slowly. Take one line a day for a week. Ask what it would mean to trust God for that line today.
Learn it by heart. Believers have long memorized this psalm so they can say it when they cannot read, at night, in a hospital bed, or beside a grave. Either the BSB or the KJV wording will serve you well.
Notice the switch in verse 4. When you are afraid, stop talking about God and start talking to him. That is exactly what David does.
Let it shape your gratitude. Make a short list of the green pastures and quiet waters in your life right now, and thank the Shepherd for them by name.
Be a sign of the Shepherd to others. Visit someone who is in a valley. Bring a meal. Sit with them. You cannot replace God’s presence, but you can remind someone of it.
Where faithful Christians differ in reading it
Christians broadly agree on how to read this psalm. They differ mainly in how directly they read it as speaking of Christ. Some read it first as David’s own testimony and then apply it to Christ through the New Testament’s shepherd language. Others read David’s words as already pointing forward to the Messiah. Both approaches honor the text, and both lead to the same comfort. This site leans toward reading the psalm in its own setting first and then letting Jesus’s words in John 10 fill it out.
The road ends at the Lord’s house
Psalm 23 has been prayed by shepherds and kings, by the dying and by those who sat with them. It does not promise that you will never enter the valley. It promises that you will not enter it alone, and that the road ends at the Lord’s house. Read it aloud today, pray it back to God in your own words, and find a local church where the good Shepherd is preached and his people care for one another. For the book as a whole, see our guide to the Psalms, and for comfort in loss, what the Bible says about death and grief.