Can I do dhikr in the bathroom?

No, not out loud while you're using the toilet, but yes in your heart. Most scholars say it is disliked (makruh) to say Allah's name or dhikr aloud while relieving yourself or inside the toilet area. Remembering Allah silently in your heart is fine anywhere, and the short duas for entering and leaving are said at the door.
What the Sunnah shows
The Prophet ﷺ remembered Allah at almost every moment, yet he paused it in the toilet:
- No reply while urinating: "A person happened to pass by the Messenger of Allah (ﷺ) when he was making water and saluted him, but he did not respond to his salutation" (Sahih Muslim 370). The greeting "as-salamu alaykum" contains one of Allah's names.
- A preference for purity: in a similar report he replied after making wudu and said: "I disliked remembering Allah except in the state of purification" (Sunan Abi Dawud 17).
Based on this, most scholars across the four schools consider speaking dhikr in the toilet disliked rather than forbidden. It isn't a sin that ruins anything, just something to avoid out of respect.
The duas at the door
- Before entering: Allahumma inni a'udhu bika minal-khubuthi wal-khaba'ith, meaning "O Allah, I seek Refuge with You from all offensive and wicked things (evil deeds and evil spirits)" (Sahih al-Bukhari 142). Say it before you step in.
- After leaving: "Ghufranak", meaning "Grant me Thy forgiveness" (Sunan Abi Dawud 30).
Forgot to say it before going in? Most scholars say you can still say it in your heart.
Common situations
- You sneeze in the toilet: praise Allah in your heart and say "Alhamdulillah" aloud once you're out.
- Someone greets you through the door: reply after you come out, as the Prophet ﷺ did.
- Making wudu in a bathroom: many Western homes have the toilet and sink in one room. If you are not relieving yourself and the room is clean, many scholars allow saying "Bismillah" quietly for wudu; others prefer saying it in your heart. See How do I make wudu in a school bathroom?
- Showering: scholars are more relaxed in a separate shower or bathroom where no one is using the toilet, but quiet or heart-only dhikr is still the safer habit there.
- Thoughts of Allah pop up: no problem. Thinking of Allah is never blameworthy.
Why this matters
It's about honoring Allah's name, not about fear. Muslims simply keep the spoken mention of Allah's name for clean, dignified places. Everywhere else, from the kitchen to the car, dhikr is open to you. See Can I listen to the Quran while driving or doing chores?
- Saying dhikr aloud in the toilet is disliked (makruh), not forbidden.
- Silent remembrance in the heart is fine anywhere.
- Say the entering dua before you go in and "Ghufranak" after.
- Reply to greetings and sneezes once you're out.
People also ask
Can I make dua silently in my head?
Yes, Allah hears a silent dua in your heart. In salah and for adhkar with set rewards, most scholars say you should at least move your lips.
Read the full answer →What dua do I say when entering the bathroom?
Yes, say "Allahumma inni a'udhu bika minal-khubuthi wal-khaba'ith" before you go in, and "Ghufranak" when you come out again.
Read the full answer →What does "SubhanAllah" mean and when do I say it?
Yes, it means "Glory be to Allah", declaring Him free of every imperfection. Say it when amazed, in prayer, after salah and in dhikr.
Read the full answer →What should I say after every prayer?
Yes, there's a short routine: Astaghfirullah 3 times, Allahumma antas-salam, then SubhanAllah, Alhamdulillah, Allahu Akbar 33 times each.
Read the full answer →Is it okay to keep making the same dua for years?
Yes, it's encouraged. Don't give up: every sincere dua is answered, turned into protection from harm, or saved as reward for you.
Read the full answer →