Answered by Shaykh Amjad Rasheed
I like to make dhikr (remembrance of Allah) at all times. I heard it is offensive to do so in the bathroom. However, someone informed me that Imams Shafi’i and Malik hold it to be permissible. Is this correct? What if the bathroom is joined [to a toilet]?
If bathroom here means the place for relieving oneself, then in our madhab it is offensive to mention Allah, Most High therein. However, if what is meant is a place for washing (not relieving oneself), then it is not offensive to do so therein. If the place for washing and the place for relieving oneself are both in one place, as is the norm today, then it is offensive to mention Allah’s name therein also, because the place is not suitable for this.
The questioner may remember Allah in his or her heart by bringing to mind glorification and praise, etc. without pronouncing it. Some scholars hold that one is rewarded for such [unpronounced dhikr], and at the same time one does not get into the offensive realm. And Allah is the granter of success.
– Amjad Rasheed
(Translated by Lida Kahi)