Night Prayer

Tahajjud Prayer: How to Pray It and Its Virtues

The Niyyara TeamAugust 4, 202619 min read

Tahajjud prayer is the quiet night prayer that Muslims rise for after sleeping, in the still hours before dawn, to stand before Allah when the rest of the world is asleep. This guide explains what tahajjud is, when its time falls and how to work out that window from Isha and Fajr, how to pray it step by step, how many rak'ahs to pray and how witr fits in, what to recite, the qualities that make it so beloved, and honest, practical ways to actually wake up for it.

Know when the last third of the night begins

Niyyara is a free, private, ad-free companion that calculates the last third of the night for your exact location, with accurate prayer times, the azan, and gentle reminders. No subscriptions, no ads, ever.

What's in this guide

  1. What is tahajjud prayer?
  2. When is the time for tahajjud?
  3. How to work out your window from Isha and Fajr
  4. How to pray tahajjud, step by step
  5. How many rak'ahs, and where witr fits
  6. What to recite and how to make dua
  7. The virtues of the night prayer
  8. How to actually wake up for tahajjud
  9. Tahajjud, qiyam, and Ramadan
  10. How Niyyara helps you keep the night prayer

What is tahajjud prayer?

Tahajjud prayer is a voluntary night prayer that you offer after you have slept for part of the night and then wake up to pray. That detail, sleeping first and then rising, is what gives tahajjud its particular character. The word itself carries the sense of shaking off sleep to stand in worship. It is not one of the five obligatory prayers, so there is no sin in missing it, yet it is one of the most beloved of the voluntary acts a Muslim can offer, precisely because it costs something. You leave a warm bed in the dark to turn to your Lord when nobody is watching and nothing is forcing you.

The night prayer is honored throughout the Quran. In Surah Al-Isra, the Prophet Muhammad, peace be upon him, is told to keep vigil in prayer during part of the night as an additional act for him, with the promise that his Lord may raise him to a praised station (see Quran 17:79). In Surah Al-Muzzammil, the opening verses call the Prophet, who is addressed as the one wrapped in his cloak, to stand the night except for a little, and to recite the Quran slowly and with measure (see Quran 73:1 to 73:6). These passages set the tone for why so many Muslims across the centuries have loved the last hours of the night as a time for prayer.

There is also a gentle description of the righteous that many people hold close. In Surah Adh-Dhariyat, they are described as sleeping only a little of the night and seeking forgiveness in the hours before dawn (see Quran 51:17 to 51:18). And in Surah Al-Furqan, the servants of the Most Merciful are described as spending the night before their Lord in prostration and standing (see Quran 25:64). None of this is presented as a burden. It is presented as a privilege, a quiet closeness available to anyone willing to rise for it.

Here is the reassuring part for anyone who feels daunted. Tahajjud is flexible by design. There is no fixed number of rak'ahs you must reach, no minimum length of recitation, and no requirement to pray it every single night. Two short, sincere rak'ahs before Fajr count as tahajjud. The prayer meets you where you are. What it asks for is not endurance but sincerity, and a willingness to trade a little sleep for a little nearness.

The one-line version

Tahajjud is a voluntary night prayer offered after sleeping and then rising, prayed in pairs of rak'ahs with no fixed maximum, best performed in the last third of the night, and often finished with witr.

When is the time for tahajjud?

The time for tahajjud begins after the Isha prayer and continues until the start of Fajr, on the condition that you sleep first and then get up to pray. The entire span of night after Isha is valid for the night prayer, so if you can only manage the earlier part of the night, that is still accepted and still good. But the most virtuous portion, the part that the sources single out again and again, is the last third of the night, the stretch of darkness just before dawn arrives.

Why the last third? Because it is described in the teachings of the Prophet Muhammad, peace be upon him, as a time when Allah turns toward His servants in a special way, drawing near and answering those who call upon Him, ask of Him, and seek His forgiveness. This is a widely known and cherished description of that hour among Muslims. Rather than quote an exact wording here, it is enough to know the meaning that has reached us: the final third of the night is a time of unusual mercy and closeness, and prayer offered then carries a special weight.

Practically, that means the ideal tahajjud is not simply "sometime at night." It is the deliberate act of setting an alarm, sleeping, and rising in that final stretch. That said, do not let the pursuit of the very best time stop you from praying at all. If the last third feels out of reach on a given night, praying before you sleep, or in the middle of the night, still counts. The last third is the summit. Any sincere standing in the night is a step up the mountain.

One clarification worth making early. Tahajjud is different from the sunnah prayers you might pray right after Isha before bed. Those earlier voluntary units are good in their own right, but tahajjud specifically involves that break of sleep. If you pray a few rak'ahs after Isha and then go to bed, that is a voluntary night prayer, and if you then wake later and pray again, that later prayer is your tahajjud in the fuller sense.

How to work out your window from Isha and Fajr

Working out the last third of the night is simpler than it sounds. The night, for this purpose, is the span between the start of Isha and the start of Fajr. You take that span, divide it into three equal parts, and the final part is the last third of the night. Here is the method in plain steps.

  1. Find the start of Isha. This is when the night prayer window opens, once the red twilight has left the sky. Use an accurate prayer time source for your city and date.
  2. Find the start of Fajr. This is the moment of true dawn, when the first light appears along the horizon before sunrise.
  3. Measure the span between them. Count the hours and minutes from the start of Isha to the start of Fajr. This whole span is the night.
  4. Divide by three. Split that span into three equal parts. Each part is roughly the same length in hours.
  5. Take the last part. The final third, ending right at Fajr, is the most virtuous window for tahajjud.

A worked example makes it concrete. Say Isha begins at 9:00 in the evening and Fajr begins at 4:30 in the morning. The span between them is 7 hours and 30 minutes. Divide that by three and each third is 2 hours and 30 minutes. Counting back from Fajr, the last third begins at 2:00 in the morning and runs until 4:30. So on that night, the best time for tahajjud would be any point from around 2:00 up to just before Fajr. The middle third would be roughly 11:30 in the evening to 2:00, and the first third from 9:00 to 11:30.

Two things shift this window through the year. First, the length of the night changes with the seasons, so in summer the night is short and the thirds are small, while in winter the night is long and the last third can be a wide stretch. Second, your location changes everything, since Isha and Fajr times depend on your latitude and the date. That is the practical reason to lean on a tool. Calculating the last third by hand every night gets tiresome, and it is easy to be off. This is exactly what accurate prayer times are for, and knowing when Maghrib and Isha begin is the foundation the whole night schedule sits on.

A gentle note on differences

Muslims follow several respected schools of jurisprudence, and small details around the night prayer, such as the exact way witr is prayed or the finer points of timing, can differ between them. All are valid. This guide sticks to the widely agreed essentials. For rulings on your particular situation, follow the guidance of qualified scholars or a trusted local teacher.

Let the app do the math for you

Niyyara calculates the last third of the night automatically from your local Isha and Fajr times, sounds the azan, and can remind you when the night window opens. Free, private, and ad-free.

How to pray tahajjud, step by step

The good news is that if you already know how to pray your daily salah, you already know how to pray tahajjud. The movements are exactly the same. Tahajjud is prayed in ordinary two-rak'ah units, just like the two rak'ahs of Fajr. If you are still learning the mechanics of a rak'ah, our full walkthrough on how to pray salah covers every position in detail, and everything there applies here. Below is the sequence for a night prayer from waking to finishing.

Step 1: Wake, and renew your wudu

When you rise for tahajjud, wash the sleep from your face and renew your wudu, since sleep breaks it. Some people find that a few moments of remembrance on waking, praising Allah for returning them to life after the little death of sleep, settles the heart before prayer. Wear something clean and modest, and find a clean, quiet spot facing the Qibla.

Step 2: Form your intention

Intention, or niyyah, lives in the heart. You simply mean, within yourself, to pray the voluntary night prayer for the sake of Allah. There is no fixed spoken formula you must say aloud. Turn your attention fully to the prayer and away from the day behind you and the day ahead.

Step 3: Pray two rak'ahs at a time

Begin with the opening takbir, raising your hands and saying Allahu Akbar, then pray a normal two-rak'ah unit: stand and recite Surah Al-Fatihah followed by whatever portion of the Quran you wish, bow in ruku, rise, prostrate twice with a brief sitting between, and after the second rak'ah sit for the tashahhud and close with the salam to the right and the left. That is one complete pair. Tahajjud is built entirely from these pairs.

Step 4: Repeat as many pairs as you wish

After finishing a pair, you may stand and pray another two rak'ahs, and another, for as long as you have the time and the energy. Each pair is a self-contained two-rak'ah prayer with its own opening takbir and closing salam. There is no upper limit set for you. Pray two, or four, or more, according to what you can offer with presence of heart rather than rushing to hit a number.

Step 5: End the night with witr

When you are ready to finish, conclude your night prayers with witr, the odd-numbered prayer. Witr is a highly emphasized night prayer that seals the others. Many people pray it as a single rak'ah, or as three, and it is what closes out the night's worship. If you happened to pray your witr earlier, right after Isha before sleeping, and then woke for tahajjud, you do not repeat witr; you simply pray your tahajjud in pairs. The general practice, though, is to save witr as the last thing you pray in the night.

Slow down and lengthen where you can

Tahajjud is one of the few prayers where you have room to stretch out. With no imam and no time pressure, you can recite more slowly, pause on the meanings, lengthen your bowing and prostration, and let the stillness of the hour work on your heart. A short prayer done with attention beats a long one raced through, but the night is the ideal time to let your prayer breathe.

How many rak'ahs, and where witr fits

One of the most common questions is simply how many rak'ahs tahajjud should be. The honest and freeing answer is that the number is flexible, and scholars are clear that there is no single obligatory count. Tahajjud is prayed in pairs, and you offer as many pairs as you are able. What matters is consistency and sincerity, not reaching a particular total.

To give you a sense of scale rather than a rule, many Muslims aim for something in the range of two to eight rak'ahs, followed by witr. Beginners often start with just two rak'ahs plus witr, which is a completely valid and praiseworthy night prayer. Others who have built the habit over years pray more. Take on the amount you can maintain night after night. A modest prayer you keep is worth far more than an ambitious one you abandon after a week.

Witr deserves its own note because it sits at the heart of the night prayer. The word witr means odd, and it refers to a night prayer with an odd number of rak'ahs, most commonly one or three. Its role is to be the final prayer of the night, the seal on everything you offered before it. If you pray tahajjud, you generally end with witr. If you are not confident you will wake for tahajjud, a common and sensible approach is to pray witr after Isha before bed so you do not miss it, and then, if Allah grants you the strength to wake, pray your tahajjud in pairs without repeating witr.

TermWhat it meansTypical rak'ahs
TahajjudVoluntary night prayer after sleeping and risingPairs, flexible total
WitrOdd-numbered prayer that seals the night1 or 3
Qiyam al-laylStanding in prayer at night, in generalFlexible
TaraweehCongregational night prayer in RamadanVaries by mosque

Read that table as a family of related things rather than four separate obligations. They overlap heavily. Tahajjud is a specific kind of qiyam al-layl, witr is what usually ends it, and Taraweeh is the Ramadan form many people pray in congregation. The common thread running through all of them is the same simple act: turning to Allah in prayer during the night.

What to recite and how to make dua

In each rak'ah of tahajjud you recite Surah Al-Fatihah, exactly as in any prayer, and then you may recite whatever portion of the Quran you wish after it. This is one of the quiet joys of the night prayer. There is no fixed passage you are required to read beyond Al-Fatihah, so you are free to recite the surahs you have memorized, to work slowly through longer passages, or to repeat verses that move you. Surah Al-Muzzammil advises reciting the Quran slowly and with measure at night (see Quran 73:4), and tahajjud is the natural place to practice that unhurried, attentive recitation.

If your memorized portion is small, that is no barrier at all. You can pray beautiful tahajjud with Al-Fatihah and a few short surahs such as Al-Ikhlas, Al-Falaq, and An-Nas. The length of your recitation is not what is being measured. Some of the most sincere night prayers are short in words and long in feeling. Recite what you know, slowly, and let the meaning settle.

The heart of tahajjud for many people, though, is the dua, the personal supplication. The night, and especially its last third, is described as a time when Allah is near to those who call on Him, so this is the moment to pour out your heart. You can make dua in your prostration, where a person is closest to their Lord, and you can make a longer supplication after your witr or between your pairs. Ask in your own language for whatever you need, for forgiveness, for guidance, for the people you love, for ease in your difficulties. There is no script required. Speak plainly and honestly to the One who hears you.

The Quran ties the pre-dawn hours to seeking forgiveness in particular. The righteous are described as asking forgiveness in the last part of the night (see Quran 51:18), and those who are patient and truthful are described as seeking forgiveness before dawn (see Quran 3:17). Let that shape part of your dua. Alongside asking for your needs, ask for pardon. Saying Astaghfirullah, meaning "I seek forgiveness from Allah," from the heart in those quiet minutes is a fitting and time-honored way to spend the last third of the night.

A simple tahajjud at a glance

  • Wake in the last third of the night and renew your wudu.
  • Intend the voluntary night prayer in your heart, facing the Qibla.
  • Pray two rak'ahs at a time, reciting Al-Fatihah and any portion you wish.
  • Repeat as many pairs as you can offer with presence.
  • Make sincere, personal dua, especially in prostration.
  • Seal the night with witr.

The virtues of the night prayer

Why do Muslims love this prayer enough to leave their beds for it? The virtues of the night prayer are described qualitatively throughout the Quran and the teachings of the Prophet Muhammad, peace be upon him, and they center on one idea above all: nearness to Allah. When the distractions of the day are gone and the world is asleep, there is a rare stillness, and in that stillness the heart can turn to its Lord without competition. That closeness is the reward that draws people back night after night.

The Quran attaches a high station to the night vigil. In Surah Al-Isra, keeping the night prayer is linked to being raised to a praised standing (see Quran 17:79). Elsewhere, the difference between those who stand in the night and those who do not is drawn plainly. Surah Az-Zumar asks whether the one who is devoutly obedient through the night, prostrating and standing, fearing the Hereafter and hoping for the mercy of his Lord, can be equal to one who does not (see Quran 39:9). The implied answer runs through the whole tradition of the night prayer: this quiet effort raises a person.

The last third of the night carries its own honor. As mentioned earlier, it is described in the teachings of the Prophet, peace be upon him, as a time when Allah draws near to His servants and responds to those who ask of Him and seek His forgiveness. This is one of the most cherished descriptions of that hour among Muslims, and it explains why the pre-dawn window is prized so highly. Without putting an exact wording to it, the meaning that has reached us is a promise of unusual closeness and answered supplication for those who rise.

There is also an inward reward that people discover only by doing it. Tahajjud has a way of steadying the whole day. Beginning the day having already met your Lord in the dark, having asked forgiveness and poured out your heart, changes the texture of everything that follows. It builds sincerity, because nobody sees it. It builds discipline, because it asks you to master your own comfort. And it builds a private relationship with Allah that no one else is part of. These are qualities the sources point to again and again, and they are worth far more than any number of rak'ahs.

A word of balance belongs here too. The Prophet Muhammad, peace be upon him, taught that the deeds most beloved to Allah are the ones done consistently, even if they are small. That principle protects you from a common trap. It is better to pray two rak'ahs of tahajjud most nights than to pray for two hours once and then burn out and stop. The virtue is real, but it is unlocked by steadiness, not by intensity. Choose a portion you can keep.

How to actually wake up for tahajjud

Everything above is easy compared to the one real obstacle: getting out of bed. Intentions are strong at night and weak at three in the morning. So the honest work of tahajjud is mostly the work of waking, and there are practical, unglamorous habits that make it far more likely. None of them are secrets, but together they change the odds.

  1. Sleep early after Isha. This is the single biggest factor. If you go to bed soon after the night prayer, your body gets several hours of rest before the last third, and waking feels possible. If you stay up scrolling until one in the morning, no amount of resolve will get you up at three. Guard the start of your night and the end takes care of itself.
  2. Make a sincere intention before you sleep. As you lie down, genuinely resolve that you want to rise for tahajjud, and ask Allah to wake you and help you stand. Many people find that a heartfelt intention at bedtime has a real effect on whether they wake. Turning it into a request to Allah, not just a plan, changes it.
  3. Set an alarm, and put it out of reach. Calculate the last third of the night and set your alarm for somewhere inside it. Place the phone or clock across the room so you have to stand up to silence it, which is often the difference between waking and sleeping through. A prayer app that alerts you at the right time removes the guesswork entirely.
  4. Start small. Do not aim for eight rak'ahs on your first night. Aim for two, plus witr. A small target is easy to say yes to at three in the morning, and once you are standing in prayer you can always add more. Ambition kept in check is what makes the habit survive.
  5. Splash water and shake off the drowsiness. Renewing your wudu is itself a gentle way to wake the body. Cool water on the face, a few moments of remembrance, and a purposeful walk to your prayer spot help you cross from half-asleep to present.
  6. Do not despair if you miss it. There will be nights you sleep through, and that is not a failure of faith. Tahajjud is voluntary. If you miss it, some people pray a couple of rak'ahs in the daytime as a make-up out of love for the habit. Reset your intention for the next night and keep going. The people who pray tahajjud for years are simply the ones who did not quit after the nights they missed.

Notice the pattern in these tips. Almost all of them are decisions you make before you are tired, not feats of willpower in the moment. Sleep early, intend clearly, prepare your alarm, keep the target small. Set the night up well in the evening, and the hard part at three in the morning becomes much smaller than it looks.

Tahajjud, qiyam, and Ramadan

You will hear a few related terms used around the night prayer, and it helps to see how they fit together. Qiyam al-layl is the broad term. It literally means standing at night, and it covers any voluntary prayer you offer during the night. Tahajjud is a specific form of qiyam al-layl, the form where you sleep first and then rise to pray. So every tahajjud is qiyam al-layl, but the word tahajjud carries that extra sense of waking from sleep.

Witr, as covered above, is the odd-numbered prayer that usually seals the night's worship. It is closely tied to qiyam because it is the natural conclusion of the night prayers. Think of witr as the full stop at the end of the sentence you write with your tahajjud.

Ramadan is where all of this comes alive for the whole community at once. During Ramadan, many Muslims pray a congregational night prayer at the mosque, commonly called Taraweeh, in which long portions of the Quran are recited over the nights of the month. Taraweeh is itself a form of qiyam al-layl, prayed earlier in the night after Isha. Many people then also rise in the last third for tahajjud, and the final ten nights of Ramadan, when Muslims seek the Night of Decree known as Laylatul Qadr, see a special intensity of night prayer. If you have never prayed tahajjud, Ramadan is one of the most supportive times to begin, because the whole community is awake in worship with you and the habit is easier to catch.

A natural companion to the night prayer is the practice of daily remembrance. The words of morning and evening remembrance, the adhkar, help keep the heart connected to Allah across the whole day, not just in the night. If you want to build a rhythm of remembrance around your prayers, our guide to the morning and evening adhkar pairs well with tahajjud, since the same heart that turns to Allah at night is fed by remembrance through the day.

How Niyyara helps you keep the night prayer

The hardest parts of tahajjud are practical: knowing exactly when the last third of the night begins for your location, and remembering to rise. Those are the two problems Niyyara is built to solve, and it does so without costing you anything or getting in your way.

Niyyara is a free, private, ad-free companion for a practicing Muslim. It calculates accurate prayer times for your exact location and the current date, which means it also knows precisely when Isha ends and Fajr begins, the two edges you need to find the last third of the night. Instead of doing the arithmetic yourself every evening, you can see the night's thirds worked out for you. It can sound the azan when each obligatory time enters, and it offers gentle reminders so the intention you made before sleeping is met with a nudge at the right hour.

Beyond the timing, Niyyara supports the prayer itself. It includes the full Quran with audio, which helps you learn new surahs by ear so your tahajjud recitation can grow over time. It has a collection of everyday duas, the 99 names of Allah to deepen how you praise Him, a tasbih for remembrance in those quiet minutes, the Islamic calendar so you know when Ramadan and its final nights arrive, and a worship tracker to help you see your consistency build. Because it is completely free, with no subscriptions and no ads, nothing stands between you and your worship. That matters at three in the morning, when the last thing you want is a product competing for your attention.

Tahajjud is one of the quiet treasures of the faith, and it is open to anyone willing to trade a little sleep for a little nearness. You now have the whole picture: what tahajjud is, when its time falls and how to find the last third of the night, how to pray it in simple pairs, how witr seals it, what to recite and how to pour out your dua, the qualities that make it beloved, and honest ways to actually wake. The rest is one small, sincere step, taken on one night, and then again. May Allah make it easy for you, wake you gently, and accept your prayers. Try it tonight, even if it is just two rak'ahs before dawn.

Frequently asked questions

What is tahajjud prayer?

Tahajjud is a voluntary night prayer that you offer after you have slept for part of the night and then woken up to pray. It is one of the most beloved of the voluntary prayers, and the Quran encourages the night vigil in several places, such as Surah Al-Isra 17:79. It is prayed in pairs of rak'ahs, with no fixed maximum, and the best time for it is the last third of the night before the dawn of Fajr. Because it is voluntary, there is no sin in missing it, but it carries a special closeness to Allah for those who make the effort to rise.

When is the time for tahajjud prayer?

The time for tahajjud runs from after the Isha prayer until the start of Fajr, provided you sleep first and then get up. The whole night after Isha is valid, but the most virtuous portion is the last third of the night, the stretch just before dawn. To find it, take the hours between the start of Isha and the start of Fajr, divide that span into three equal parts, and the final part is the last third. An accurate prayer time app can show you this window for your exact location so you do not have to calculate it by hand.

How many rak'ahs is tahajjud?

There is no fixed number of rak'ahs for tahajjud, and scholars note that the count is flexible. It is prayed in pairs, two rak'ahs at a time, and you may pray as few or as many pairs as you are able. Many people pray two, four, or eight rak'ahs and then finish the night with witr. Even two short rak'ahs done sincerely count as tahajjud. Quality and presence of heart matter far more than a high number, so start with what you can sustain.

What is the difference between tahajjud, qiyam al-layl, and witr?

Qiyam al-layl means standing in prayer at night in a general sense, and tahajjud is the specific form of it that you pray after sleeping and then rising. Witr is an odd-numbered prayer, usually one or three rak'ahs, that concludes the voluntary night prayers, so many people end their tahajjud with witr. In Ramadan, the night prayer prayed in congregation is often called Taraweeh, which is another form of qiyam al-layl. They overlap in spirit, and the common thread is turning to Allah in prayer during the night.

How can I wake up for tahajjud?

Practical steps help more than willpower alone. Sleep early after Isha so your body has rest before you rise. Make a sincere intention before sleeping that you want to wake for tahajjud, and ask Allah to help you rise. Set an alarm for the last third of the night and place it out of arm's reach. Start small, even two rak'ahs, rather than aiming for a long prayer you cannot keep. A prayer reminder app can calculate the last third of the night for you and alert you at the right time so waking becomes a habit.

Is tahajjud obligatory?

No, tahajjud is a voluntary prayer, not one of the five obligatory prayers. There is no sin for a person who does not pray it. It was a confirmed practice of the Prophet Muhammad, peace be upon him, and is strongly encouraged for those who wish to draw nearer to Allah and seek His forgiveness in the quiet of the night. Because it is voluntary, the wise approach is to take on an amount you can maintain consistently rather than overburdening yourself. For rulings on your situation, follow the guidance of qualified scholars.

Rise for the last third of the night

Niyyara gives you accurate prayer times, the last third of the night worked out for you, the azan, the full Quran with audio, and gentle reminders, all free and ad-free. Make tonight the first night you try tahajjud.

The Niyyara Team

We build Niyyara, a free, private, ad-free worship companion with prayer times, the full Quran, Qibla, azan, duas, and more. Niyyara is a product of Four Cents. For religious rulings, always follow the guidance of qualified scholars.