The dua before entering the toilet is a short prayer the Prophet Muhammad (ﷺ) encouraged us to say for protection when entering the bathroom.
Anas bin Malik reported that “Whenever the Messenger of Allah entered the toilet, he would say: ‘A‘ūdhu billāhi min al-khubuthi wal-khabā’ith’”.
In other words, the Prophet would seek Allah’s protection from impure or evil influences before relieving himself. It is a Sunnah (Prophetic practice) that Muslims are advised to follow each time they enter a restroom or bathroom.
Arabic: بِسْمِ اللَّهِ، اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخُبْثِ وَالْخَبَائِثِ
Transliteration: Bismillāh, Allāhumma innī a‘ūdhu bika mina l-khubthi wal-khabā’ith
Translation: “In the name of Allah. O Allah, I seek refuge with You from the male and female devils (evil beings).”
In this supplication, we begin with “Bismillāh” (“In the name of Allah”) and then ask Allah for protection.
The core of the dua “Allāhumma innī a‘ūdhu bika mina l-khubthi wal-khabā’ith” means “O Allah, I seek refuge with You from al-khubth wal-khabā’ith.”
The words al-khubth wal-khabā’ith are often translated as “the male and female devils” or broadly “all kinds of evil impure things”.
Essentially, we are asking Allah to guard us from any evil or harmful entities (such as shayāṭīn, i.e. devils) that lurk in unclean places like toilets.
The dua should recited quietly just before entering the restroom, as a way of remembering Allah and seeking His protection at a time and place where one will be vulnerable and unable to verbally remember Him.
Using the toilet is a routine act, but Islam even provides guidance for such mundane activities.
Prophet Muhammad (peace and blessings be upon him) taught specific duas (supplications) and manners for relieving oneself, highlighting that no aspect of life is outside the remembrance of Allah.
In fact, a disbeliever once mockingly said to Salman al-Farsi (may Allah be pleased with him), “Your Prophet has taught you everything, even how to defecate!” . Salman replied that indeed the Prophet had taught them even this, forbidding practices like facing the Qiblah (direction of prayer) while relieving oneself.
Saying the dua before entering the toilet carries important spiritual benefits.
The Prophet ﷺ taught that toilets are places where evil influences may be present: “These toilets are haunted (inhabited by devils), so when any one of you goes to the toilet let him say, ‘A‘ūdhu Billāhi min al-khubthi wal-khabā’ith’” (I seek refuge with Allah from the male and female devils).
By reciting this prayer, a Muslim seeks Allah’s protection from any harmful or impure beings (such as jinn or devils) that might be present in such dirty places.
Islamic scholars explain two main reasons for this practice. Firstly, bathrooms and toilets by their nature are impure places, and impure, evil spirits (devils) tend to frequent these areas.
Secondly, while in the toilet a person avoids verbal remembrance of Allah out of respect, so one’s guard is somewhat lowered; the devil could try to take advantage of this moment. Therefore, the Prophet ﷺ instructed us to seek refuge in Allah before entering, so that Allah’s protection covers us throughout the time in the bathroom.
Shaykh Ibn ‘Uthaymeen, a renowned scholar, said that since the washroom is an “evil and unclean place,” it is appropriate to say this dua when entering “so that no khubth (evil) or khabā’ith (evil spirits) will affect him”. In essence, this dua acts as a spiritual shield, keeping any devils or harmful influences at bay while one is vulnerable.
Another wisdom mentioned by scholars is that saying “Bismillāh” at the start of this dua veils a person’s nakedness from the eyes of the jinn. According to one report, the Prophet ﷺ said: “To say, ‘In the name of Allah’ when one goes to the toilet is to ensure that the jinn cannot see the private parts of humans.” . In other words, invoking Allah’s name creates a barrier of privacy from the unseen beings. Although this particular narration has some weakness, all four schools of Islamic law agree that it is mustaḥabb (recommended) to begin by saying “Bismillah” and then reciting the seeking-refuge dua. Thus, by following this practice, a believer guards both their spiritual and physical privacy.
Overall, the significance of this dua lies in seeking Allah’s help and protection in all matters, even during basic acts like using the toilet. It turns a mundane activity into an act of worship and remembrance. By consciously making this dua, a Muslim maintains a connection to Allah and adheres to the Prophetic example, earning rewards for following the Sunnah while also ensuring safety from any unseen harms.
The dua for entering the toilet is well-established in authentic hadith sources. As mentioned, it is narrated from companions like Anas ibn Malik and Zayd ibn Arqam. Imam al-Bukhari and Imam Muslim both recorded that the Prophet (ﷺ) used to seek refuge with Allah when entering the lavatory.
For example, one hadith in Sahih al-Bukhari (Hadith no. 142) and Sahih Muslim (Hadith no. 375) notes that the Prophet said “Allāhumma innī a‘ūdhu bika min al-khabā’ith…” upon entering the bathroom.
Another narration in Sunan Abi Dawud and Sunan Ibn Majah also confirms this dua, and scholars like Imam al-Nawawi and Ibn Hajar have agreed that the tradition is sahih (authentic).
Hadith scholars have classed this supplication as authentic. In fact, when asked about the authenticity of this dua, one hadith expert replied, “Yes, this du’a is authentic” , referencing the hadith in Fath al-Bari (which is Ibn Hajar’s commentary on Bukhari) under hadith no. 142. Given that it is recorded in multiple reliable collections (Bukhari, Muslim, Abu Dawud, Ibn Majah, etc.), we can be confident that this dua is a confirmed Sunnah of the Prophet ﷺ.
By observing this practice, we are emulating the Prophet’s example. Citing these hadith references not only assures us of the dua’s authenticity, but also reminds us that this simple act carries the weight of prophetic guidance. It is a small but significant sunnah that has been preserved in our rich hadith literature and passed down through generations of Muslims.
After one has finished and is leaving the toilet, there is another short dua to recite. The Prophet ﷺ taught us to say “Ghufrānaka” (غُفْرَانَكَ) when exiting the bathroom. Ghufranaka means “I seek Your forgiveness.”
This may be understood as seeking Allah’s forgiveness for any human shortcomings, such as being unable to remember Allah verbally while in the toilet.
Aishah (may Allah be pleased with her) said that “When the Prophet exited the toilet, he used to say ‘Ghufrānaka’”.
So, just as we begin by asking Allah’s protection, we end by asking His forgiveness. Remember to step out with your right foot first (the opposite of when you entered) as part of the etiquette.
In summary, to properly observe this Sunnah:
By consistently doing this, you not only protect yourself spiritually but also earn reward for following the Prophet’s beautiful example in one of the most private moments of daily life.
In addition to reciting the dua, Islam outlines several toilet etiquettes to maintain cleanliness, modesty, and dignity.
Observing these manners completes the prophetic way of answering the call of nature. Here are some key toilet etiquettes in Islam that every Muslim should be aware of:
By observing these etiquettes along with the dua, a Muslim turns an ordinary bathroom trip into an act of worship and obedience. These practices ensure physical cleanliness and spiritual mindfulness, which are both highly valued in Islam. The Prophet Muhammad ﷺ said “Purity is half of faith”, and these guidelines help us maintain that purity in a practical way.
References: The above points are drawn from authentic hadiths and scholarly recommendations. For instance, the rules about facing the Qiblah, using the left hand, and concealing oneself are recorded in collections like Bukhari, Muslim, Abu Dawud, and Tirmidhi. The recommendation to enter with the left foot and exit with the right is noted in various Fiqh books and derived from the general Sunnah of the Prophet (PBUH). The importance of cleaning oneself is emphasized in hadiths in Ibn Majah and others.
By learning and practicing the dua before entering the toilet and the related etiquettes, we not only protect ourselves from spiritual and physical harm, but also earn the pleasure of Allah by following the beloved Prophet’s example. Such small acts, done consistently, bring barakah (blessing) into our lives and remind us that no act is too trivial to be done in the remembrance of God.
So the next time you head towards the bathroom, remember to pause and say this short dua – it’s a few seconds of effort that opens the door to Allah’s protection and mercy insha’Allah.
Allah knows best.