Allahumma Khalaqta Nafsi: The Dua for Your Soul at Bedtime

بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ
Dua & Azkar · Before Sleeping

Allahumma Khalaqta Nafsi — the Dua for Your Soul at Bedtime

A short bedtime dua that the lists tend to bury in the middle, without its story. Ibn ‘Umar taught it to a man going to bed — and when the man asked where he had heard it, the answer became part of the narration. Both stand here, in full.

Short answer: Ibn ‘Umar taught a man to say at bedtime: ‘O Allah, You created my soul and You take it; its death and its life are Yours. If You keep it alive, protect it; if You cause it to die, forgive it. O Allah, I ask You for well-being’ (Sahih Muslim 2712).

Translations on this page: the translation printed at sunnah.com. ImanAtlas presents sources, not fatwas; for a ruling on your own situation, ask a qualified scholar you trust.

The dua, as Muslim 2712 prints it

Sahih Muslim’s chapter “Supplication When Going To Sleep” carries a dua of two requests, taught not in a gathering but to one man at the point of sleep. ‘Abdullah ibn ‘Umar — the Companion whose care in following the Prophet’s ﷺ practice was famous among the Companions themselves — commanded him to say it as he went to bed. The block below prints the narration as Muslim gives it: the command, the dua in its Arabic, and then the question the man asked, which the next section takes up.

اللَّهُمَّ خَلَقْتَ نَفْسِي وَأَنْتَ تَوَفَّاهَا لَكَ مَمَاتُهَا وَمَحْيَاهَا إِنْ أَحْيَيْتَهَا فَاحْفَظْهَا وَإِنْ أَمَتَّهَا فَاغْفِرْ لَهَا اللَّهُمَّ إِنِّي أَسْأَلُكَ الْعَافِيَةَ

Allahumma khalaqta nafsi wa anta tawaffaha, laka mamatuha wa mahyaya. In ahyaytaha fahfazha wa in amattaha faghfir laha. Allahumma inni asaluka al-‘afiyah

“Abdullah b. ‘Umar commanded a person that as he went to bed, he should say: ” O Allah, Thou created my being and it is for Thee to take it to its ultimate goal. And its death and life is due to Thee, and if Thou givest it life, safeguard it; and if Thou bringst death, grant it pardon. O Allah, I beg of Thee safety.” A person said to him: Did you hear it from Umar? Thereupon he said: (I have heard from one) who is better than Umar, viz. from Allah’s Messenger (ﷺ).”

Sahih Muslim 2712 · Book 48, Hadith 81 · sunnah.com/muslim:2712

The dua’s shape is worth seeing plainly. It opens by handing the soul back to its Maker — created by Him, taken by Him, its death and its life both His. Then it makes its two requests, one for each way the night can end: if He keeps the soul alive, safeguard it; if He brings its death, forgive it. And it closes by asking for ‘afiyah — safety, well-being — in a single word. Nothing is added here to what the words say: no outcome is promised in this site’s voice, because the narration itself promises none; it teaches a man what to say, and the saying is the page’s whole subject.

The transliteration line above follows the romanisation printed at IslamQA (answer 145543, item 13), checked word by word against the Arabic; sunnah.com prints no romanisation for this narration, and none was constructed here.

Who taught it, and how we know

The narration does something unusual: it records its own checking. The man who was taught the dua asked his teacher where it came from — “Did you hear it from Umar?” The question was a fair one. ‘Umar ibn al-Khattab was Ibn ‘Umar’s father, and a son’s first source for the Prophet’s ﷺ words would naturally be his father. The answer is printed in the block above, and it is the heart of this page: “(I have heard from one) who is better than Umar, viz. from Allah’s Messenger (ﷺ).”

So the chain the narration itself gives is short and direct: the Prophet ﷺ, then Ibn ‘Umar, then the man he commanded at bedtime — and through Muslim’s book, every reader since. Muslim places the narration in his Book of Remembrance, in the chapter named for going to sleep (Book 48, Hadith 81). Its neighbour in that chapter is the long surrender dua taught to al-Bara’ ibn ‘Azib — “Allahumma aslamtu wajhi ilayk”, I have surrendered my face to You (Muslim 2710a) — which stands on its own page here: Allahumma Aslamtu, the last words dua. The two narrations sit side by side in Muslim’s chapter; on this site, they now sit side by side as pages.

Its place among the bedtime duas

This dua is one item of the bedtime set, and the set stands whole on the Duas Before Sleeping page — the Quls blown into the palms, Ayat al-Kursi in Abu Huraira’s story, Surah al-Kafirun, Surah al-Mulk, the tasbih taught to Fatimah, and the duas said lying down. This page exists because 2712 was the set’s missing member in one way: the pillar names the bedtime duas it prints, and this one it did not print — it stood only in lists elsewhere, usually without the exchange that carries its authority. Here it has its own home, and the pillar’s set is the wider one.

Two of its companions have pages of their own beside it: the surrender dua of the same chapter, Allahumma Aslamtu, and the Tasbih of Fatimah, the three phrases taught at a bedside for the same hour of the night. One more dua of Muslim’s bedtime chapter is named here so the chapter’s map is honest: the gratitude dua, “Alhamdu lillahilladhi at’amana” — Praise is due to Allah who fed us (Sahih Muslim 2715). It is named, not printed; this page prints 2712 alone, in full.

Questions, answered from the sources

What is the dua “Allahumma khalaqta nafsi”?

It is a short dua for going to bed, printed in Sahih Muslim (2712): “O Allah, Thou created my being and it is for Thee to take it to its ultimate goal. And its death and life is due to Thee, and if Thou givest it life, safeguard it; and if Thou bringst death, grant it pardon. O Allah, I beg of Thee safety.” Ibn ‘Umar commanded a man to say it as he went to bed, on the authority of the Prophet ﷺ himself.

Did Ibn ‘Umar hear this dua from ‘Umar, or from the Prophet ﷺ?

The narration asks the question itself. “A person said to him: Did you hear it from Umar? Thereupon he said: (I have heard from one) who is better than Umar, viz. from Allah’s Messenger (ﷺ).” ‘Umar was Ibn ‘Umar’s father; the answer carries the dua past him, to the Prophet ﷺ.

Which hadith is the dua for the soul before sleep?

Sahih Muslim 2712, in Muslim’s Book of Remembrance — the chapter “Supplication When Going To Sleep” (Book 48, Hadith 81). The same chapter carries the long surrender dua of al-Bara’ ibn ‘Azib, “Allahumma aslamtu wajhi ilayk…” (Muslim 2710a), which has its own page on this site.

Why does the bedtime dua mention dying?

Because the dua itself joins the two states in one sentence: “its death and life is due to Thee.” The one going to bed hands the night to Allah either way — if He gives life, the request is safeguarding; if He brings death, the request is pardon — and closes by asking for safety (‘afiyah). This page prints the words as they stand; what they promise any one person is not a claim it adds.

Allahumma Khalaqta Nafsi — the bedtime dua of Sahih Muslim 2712, taught by Ibn 'Umar on the Prophet's authority: “O Allah, You created my soul and You take it; its death and its life are Yours. If You keep it alive, protect it; if You cause it to die, forgive it. O Allah, I ask You for well-being.”
The dua’s two requests at a glance — save it or share it.

Sources

Every text and claim on this page comes from these pages, read on 28 November 2026. Translation: sunnah.com’s printed translation.

Found an error? We correct mistakes within 24 hours, with a note on the page — write to us through the website.