When a comedy character is upset, they'll lock themselves in the bathroom (or a bathroom stall) to escape the unpleasantness of dealing with what has made them upset. Alternately, a wanted character may lock themselves in the bathroom while being chased to avoid their pursuers. This is not an effective means of evading capture as bathroom doors are meant for privacy rather than as a physical barrier.
The character certainly can't stay inside forever, making this an unviable means of escaping their troubles in the long-term. Since bathrooms usually have only one door and no other means of egress, the other characters could effectively leave the upset individual alone and allow them exit when they ultimately become bored from the lack of attention.
As this would not be an entertaining solution, the other characters will attempt to coax them out using Closed Door Rapport. Sometimes, there are other circumstances requiring the troubled character's immediate removal to up the stakes, such as another character needing to use the bathroom. If negotiations break down, the frustrated onlookers may attempt to open the door with a Skeleton Key Card.
- In a chapter of the Sgt. Frog manga, Keroro locks himself in the toilet to escape the wrath of Natsumi for messing with her favorite shirt.
- Hiyokoi: It happens in the OVA during a sad panty shot incident during class. She (Hiyorin) felt so sad and embarrassed that she ran into the washroom. The poor girl!
- In one Calvin and Hobbes strip, Calvin takes Rosalyn's science notes when she is babysitting him and locks himself in the bathroom with them, threatening to flush them down the toilet. Rosalyn ignores Calvin for a while and, thinking she has gone to call the fire department to axe open the door, he comes out to see the fire trucks.
- Lizzie locked herself in the bathroom once in For Better or for Worse when she was very young.
- The Iron Giant: Hogarth hides the giant's lost hand in the bathroom from his mother and Kent. After he gets it out the window, he pretends to be in the toilet when Mom and Kent force open the door.
- In The Room, Johnny locks himself in the bathroom after his birthday party when he discovers his girlfriend and best friend have been having an affair.
- In Neil Simon's Plaza Suite, a bride with cold feet locks herself in the hotel bathroom on her wedding day.
- In The Kid, The Musical of the book by Dan Savage, the song "Terry..." is an attempt to coax Terry out of the bathroom after a fight.
- In a cross between this and Locked in a Room, in Can't Hardly Wait Kenny (Seth Green) and Denise (Lauren Ambrose) lock themselves in the upstairs bathroom...and can't get out because the door's broken.
- The Shining: Wendy locks herself in the bathroom to hide from the now (literally!) Ax-Crazy Jack. The lock holds. The door doesn't.
- Going Overboard: Dickie Diamond locks himself in a bathroom because he felt like he's going to puke. After that, he just stays there locked, but later on, the door opens and Dickie is so happy to reclaim his job as a comedian.
- In Komarr, Nikki locks himself in the bathroom and refuses to go to school the morning after he learns that he's a mutant; Miles ends up talking him out.
- Junie B. Jones: In Yucky Blucky Fruitcake, Junie B. locks herself in the bathroom to pretend throwing sponges at her principal at the school's carnival. She actually throws them at the toilet, but then they get stuck in the drain, causing the toilet to flood the bathroom by accident.
- This Alien Shore: While fleeing from the smugglers who gave her a ride and now plan to sell her, Jamisia hides in a public bathroom to change her clothes and cut her hair.
- Leave It to Beaver: The first-season episode "Child Care" sees a 4-year-old girl that Beaver and Wally are supposed to be watching lock herself in the bathroom. After an attempt by Beaver to have a friend try to unlock the door fails, they resort to calling the fire department. Wally and June learn about this and the boys eventually explain things (they held off for fear they might not get to babysit again), and the folks are mighty impressed things went so well.
- Full House: The Season 3 episode "The Greatest Birthday on Earth" sees Jesse, Stephanie and Michelle accidentally get locked in a gas station bathroom while on the way home for Michelle's third birthday party. "No more happy birthday to me?" Michelle asks when she realizes they might be trapped awhile.
- Cheers had an episode where Frasier and Lilith have Sam and Diane over for a dinner party. The episode had several instances where one of them got offended and locked themselves in the bathroom. Near the end of the episode, Diane and Lilith both go in. Having had enough of this, Frasier locks the door from the outside, then invites Sam to join him in watching I, Claudius.
- In Three's Company, Jack's date locks herself in the bathroom while Jack is having a food critic over for dinner. Mr. Furley, attempts to unlock the door with his credit card, but she takes it when he pushes it through the crack.
- In the Monk episode "Mr. Monk Gets Cabin Fever," Stottlemeyer uses a set of handcuffs to lock Agent Grooms in the witness protection cabin's bathroom so Grooms cannot interfere while Monk, Natalie and Stottlemeyer leave to investigate a potential murder.
- Supernatural: In "The Devil You Know", Sam does this to Dean so he can slice on Brady.
- Drake & Josh is a subversion. In the episode "Vicious Tiberius", the two titular characters are trapped in Mrs. Hayfer's bathroom, not because the door was locked, but because they were trying to avoid their aforementioned teacher's vicious pet rottweiler.
- In Danish series Klovn, when Frank by accident doodles on Mia's croquis drawings, she gets unusually upset and locks herself into the bathroom. Frank lampshades it by saying that he didn't know women may actually lock themselves into the bathroom in real life when they are upset.
- DCI Banks: In "The Buried", DI Morton locks herself in a stall in the ladies room after she receives divorce papers from her husband. Banks somewhat timorously follows her in to find out what is wrong.
- Leverage: In "The Fairy Godparents Job", Widmark locks himself in a bathroom stall while suffering from extreme stage fright. It is up to Sophie to talk him out so the con can go ahead.
- In The Golden Girls, Rose locks herself in the bathroom at a prestigious party after finding out that Blanche and Dorothy impersonated her date as a pen pal. Since she was occupying the only stall that wasn't out of order, a large group of attendees have gathered offscreen by the time Blanche and Dorothy coax her out.
- In Red & Ted's Road Show, the trip to Atlanta is delayed when a worker gets trapped in a porta-potty. Red and Ted help blast him out with explosives.
***BOOM!*** Ted: "See, that didn't hurt a bit."
- In the SuperMarioLogan episode, "Shrek's Bath Problem!", Mario is trapped in the bathroom with Shrek, who called him over in the first place because he pooped in the bathtub. The Brooklyn Guy shows up as a locksmith, but the lock is too complicated for him to figure out, so Toad slips a mini mushroom under the door, causing Mario to shrink and get out from under the door. At the end of the episode, Shrek opens the door easily by jiggling the doorknob.
- DeliciousCinnamon: The gang theorizes that Dubz accidentally locked himself in Bert's bathroom during the Paper Mario stream.
- In one episode of The Amazing World of Gumball, Gumball and Darwin literally get locked in the school bathroom. They decide to tell each other a secret they'd been keeping, but they're rescued by the janitor before Dawin can tell his. Gumball spends the rest of the episode being driven crazy by not knowing the secret, until Darwin tells him that he was only going to tell him because it looked like they were going to die. So, Gumball locks them in the bathroom again, only to find out that the secret Darwin had been keeping was that he didn't like some food Gumball made. They get out this time by flushing themselves down the toilet, arguing the whole way, finally ending by angrily yelling that they love each other.
- In the Chowder episode "The Vacation", Chowder, Mung, and Schnitzel end up getting locked in Chowder's bathroom. To make it worse, Chowder has a Potty Emergency, but can't go unless he's alone.
- FETCH! with Ruff Ruffman: Happens to Ruff, Blossom and Chet in a Season 3 episode where Ruff's cousin, Roxie, lets a giant herd of sheep burst into the doghouse and staynote . This trope lasts for the majority of the episode.
- Steven Universe: In the episode Catch And Release, Peridot locked herself in the bathroom while running from the Crystal Gems, intending a Bathroom Break-Out. She quickly discovered there was no other way out, and it became her new place of residence for a while. As an alien who doesn't eat or drink, she's unaware of the room's purpose.
- Subverted in The Wild Thornberrys. In the episode where Eliza finds herself in the Australian Outback a ranger locks her in the bathroom so she does not cause an interference. Unfortunately his parrot spoils his plan by revealing that she had been locked in the bathroom.
- Kaeloo: In the Musical Episode, Mr. Cat steals a song Stumpy wrote for his girlfriend by making a Deal with the Devil and decides to turn it into a Broadway production. Stumpy locks himself in the bathroom and starts crying until Kaeloo and Quack Quack decide to help him, at which point he leaves the bathroom.