I properly learned the bathroom dua at thirty, which I find a bit embarrassing to admit. As a kid I'd mumbled it at top speed, like a password, never once thinking about what the words meant. Then my nephew, four years old, stopped in the hallway one day and asked me what "khubuth" is. I opened my mouth and absolutely nothing came out.
So this is what I've pieced together since, mostly from my sister, who is far better organized about all of this than me.
The dua, and what it's actually saying
The Prophet Muhammad, peace be upon him, taught us to say Bismillah and then ask Allah for protection from the evil ones, the male and female devils, before going in. It's in Bukhari. The Arabic is Allahumma inni a'udhu bika minal khubuthi wal khaba'ith, and my nephew's version swallows the middle every time, which I've decided Allah can handle.
Telling a four-year-old there are devils in the bathroom was a risk, so my sister said something closer to "it's a place where we're alone, so we ask Allah to stay close." He accepted that immediately. Fair enough. The quiet bit matters as well, you say it as you step in, or before you sit if you're outdoors, and not out loud once you're inside, since scholars say mentioning Allah is kept for outside the toilet area.
On the way out it's one word. Ghufranaka, forgive me, from Abu Dawud and Tirmidhi. My nephew says it like it's the last note of a song, with a little bow, and I'm not going to be the one to stop him.
Left foot, right foot
Left in, right out. Scholars teach it as a sunnah from the general idea that the Prophet liked the right side for honored things and the left for the opposite. Kids adore having something to do with their body, so now there's a hop at the door, and my sister says it's the best potty training thing that ever happened to her.
The not-so-glamorous bits
My sister has three bathroom rules and she calls the third one "the aim talk," which I'm not going to explain. The first is about phones and toys, they don't come in, and she's right, we've all failed at that one. The second is about hands. Right hand for eating and greeting, left for cleaning up, because there's a hadith in Bukhari and Muslim about not touching your private parts with the right hand in there, and I remember my niece finding that wildly interesting for about a week.
On top of that the Prophet warned people about being careless with urine, so wiping properly and washing up is really just part of taharah, the same cleanliness we're always going on about. Outside the house, say camping, you don't face the qiblah or turn your back to it. Indoors scholars differ, so I leave it alone and tell the kids it's mostly an outdoors thing.
And hands get washed with soap afterwards, every time, with another Bismillah if they want one. A trickle of water does the job. My nephew thinks it's a competition to see how fast he can turn it into a waterfall.
Privacy, which I'd put above all the rest
At five, my niece pushed open the bathroom door while her mother was in there. Nobody was upset, but my sister said "knock, and I'll knock for you too," and since then it's been a house rule both ways. Closed door means knock.
I think about this one a lot. A child who learns that the bathroom is private, and that nobody just walks in, is learning something much bigger about their own body and who gets to see it. If anyone ever makes them uncomfortable in there, they know they can tell a parent straight away.
Public toilets, and the masjid
Kids forget everything in a public bathroom. We just try to leave it cleaner than we found it, and not run the water for fun. If you're taking children to the masjid, our post on the adab of the mosque covers how to behave there, washrooms included.
What made it stick for us
My sister printed the two duas on a card and taped it next to the door, outside, not inside. For about a week they said them together every single time. By week two nobody needed the card.
Short videos help as well, because kids will watch a dua being shown when they'd glaze over at you explaining it. Our Islamic videos for kids are a good place to start.
Conclusion
My nephew still does the hop at the door. Last week he stopped halfway, turned to me, and said "Auntie, you forgot your dua," and I had. At thirty-something, corrected by a four-year-old in a hallway. I said thank you, went back, and did it properly. For more videos, games and activities that teach everyday duas and habits, you'll find everything at Islamic Galaxy.
FAQs
What dua do you say before the bathroom? It starts with Bismillah, then you ask Allah for protection from evil as you step in. It's in the post above in full. When you come out you say Ghufranaka, asking forgiveness. Say it quietly, outside the toilet area.
Which foot goes in first? Scholars teach left foot in and right foot out, since the right is kept for honored things. Kids pick it up quickly because it gives them a little hop to do at the door, and most of them love it, even the grumpy ones.
How do I teach my kid all this without it being awkward? Tape the two duas by the door outside, say them together for a week, and let them see you do it too. Keep it calm and light, with no shame about bodies, and they will ask questions when they're ready.