For an interior door that has a small hole in the handle you can use a small screwdriver to unlock it.
How to unlock a bathroom door handle.
How to unlock a bathroom door lock.
Make sure the pick is small enough in diameter to fit inside the hole and long enough to access the release trigger.
Remove the door handle if you cannot unlock the door otherwise.
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.
It s all too easy to accidentally lock a bathroom door and closing it behind you without noticing.
For the knobs with a flat slot a small flat head screwdriver provides a handle to turn the lock to release it.
When this happens a bathroom will be empty but locked.
You may need to turn the screwdriver in order for the door to unlock.
Once the screws are undone place the screwdriver into the lock mechanism of the door handle and twist it gently to undo the lock.
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.