Dthikr of entering and leaving the bathroom
Dthikr of entering the bathroom:
One who enters the bathroom should say the Dthikr that is narrated in the following Hadeeth reported in Saheeh Al-Bukhāriy and Saheeh Muslim:
Anass (ABPWH) said,
“Whenever the Prophet (PBUH) entered the bathroom he would say, ‘O Allāh, I seek refuge with you from Khubuth/Khubth and Khabā’ith.’.”
(Al-Bukhāriy no. 6322, Muslim no. 375)
Khubuth in Arabic (pronounced with letter u after the letter b) means male devils, and in this case Khabā’ith would mean female devils.
On the other hand, Khubth in Arabic (pronounced without letter u after the letter b) means evil, and in the this case Khabā’ith would mean evil-doers. This meaning according to the latter spelling is more general and is the most narrated by the scholars.
Dthikr of exiting the bathroom:
‘Ā’ishah, may Allāh be pleased with her, mentioned that when the Prophet (PBUH) used to step out of the bathroom, he would say,
“Ghufrānak” (i.e. I ask Your forgiveness, O Allāh)
(Ahmad 6/155 no. 25220, Abū Dāwood no. 30, and At-Tirmidthiy no. 7