Entering the Bathroom
اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ
Allahumma inni a'udhu bika minal-khubuthi wal-khaba'ith.
O Allah, I take refuge with You from the male and female devils.
What it means
These places are described in the hadith as frequented by devils, and since a person enters uncovered and without dhikr, the Prophet ﷺ taught a short refuge to say at the door. It is a reminder that protection is asked for even in the most ordinary moments.
When and how
Say it before stepping in, and enter with the left foot. Do not carry anything bearing the name of Allah in unless it is covered.
Its virtue
This is what the Prophet ﷺ said on entering the toilet, reported in Sahih al-Bukhari 142 and Sahih Muslim 375.
Source
Al-Bukhari 142; Muslim 375sahih