When this happens a bathroom will be empty but locked.
How to unlock a bathroom door handle.
How to unlock your push button bathroom door lock push button locks generally present on the outside of the door as a small round hole centered in the middle of the knob.
To pick this kind of lock select a bobby pin or straightened paper clip.
For the knobs with a flat slot a small flat head screwdriver provides a handle to turn the lock to release it.
For an interior door that has a small hole in the handle you can use a small screwdriver to unlock it.
Make sure the pick is small enough in diameter to fit inside the hole and long enough to access the release trigger.
How to unlock a bathroom door lock.
Remove the door handle if you cannot unlock the door otherwise.
Just insert the screwdriver into the small hole and press the button on the inside of the handle with it to unlock the door.
If the door handle has exterior screws that you can see use a drill or screwdriver to undo these.
This type of lockout will sometimes happen at the worst possible moment such as when there is a house full of people.
You may need to turn the screwdriver in order for the door to unlock.