Not necessarily confined to a villain confessing a crime, sometimes it's just information someone had wanted to keep secret, or information that someone wasn't ready to share yet.
Type 1: The villain has the goody-goody face on, but someone has provoked him into a moment of rage, at which point the anger does the talking and, in a Moment of Weakness, the confession of the dastardly deeds spills out along with all the vitriol. Different from an Engineered Public Confession because the villain's mental state has rendered him/her temporarily unaware/uncaring that there's an audience. The audience may or may not have any idea there's going to be a confession.
Type 2: The most unfortunate kind of Accidental Public Confession comes from someone blithely blurting out something they thought the other party already knows.
Type 3: "Is This Thing Still On?" Somebody doesn't realize there's a live microphone to pick up their confession. See also some examples in Did I Just Say That Out Loud?.
See also You Just Told Me for when the confessor is tricked into believing the other person already knows, and Engineered Public Confession for when the hero secretly arranges and records/broadcasts the confession. May overlap with Easily Overheard Conversation. I'll Never Tell You What I'm Telling You is a variation of this.
Anime and Manga
Rosario + Vampire Capu2: After all of the chaos caused by Lilith's Mirror, including a Literal Split Personality situation with Inner and Outer Moka, is resolved by Ruby, Kokoa angrily chews Ruby out for ruining everything, revealing that she was the one who stole Lilith's Mirror from the academy in the first place. Ruby promptly drags her off to be punished.
Monsters, Inc. - the Corrupt Corporate Executive reveals his plan to capture all human children and scare them shitless for a lifetime to solve the city's power issues. Fortunately, a protagonist has the whole thing on record and reveals it to the authorities, who promptly arrest the executive. This is also an example of Type 3.
Counts as 1 and Type 3. This is how Darla gets her comeuppence in Cats Don't Dance when after all her attempts to ruin the animals final number fail (if anything, they just make the show more spectacular). She rants to Danny how she sabotaged a earlier scene in the movie by flooding the stage with water, not knowing there a stage mic on her person and she just blurted it out to the whole audience. It doesn't help that said flood also destroyed most of the studio. By the end of the film, she's been demoted to a janitor. Being the Sore Loser she is, she gives a Death Glare at the camera.
In the German post-war Black ComedyRoses For The Prosecutor, a peddler recognises a prosecutor working in a court in Kassel as a former Wehrmacht judge who had (unsuccessfully) sentenced him to death after the end of the war for stealing some military issue chocolate, making the judge a war criminal. When he tries to blackmail the prosecutor with his knowledge, the latter has him arrested, and all evidence of the death sentence destroyed. The peddler, in a fit of rage, steals some more chocolate from a shop, and lets himself get tried for theft in the prosecutor's courtroom. The prosecutor, completely exhausted by whole debacle, drifts off during the hearing and absent-mindedly sentences him to death again, exposing his own guilt.
A Few Good Men: Col. Nathan R. Jessup angrily admits to ordering the code red in this famous speech.
In Legally Blonde, Elle starts out Chutney's interrogation rather comically as she has no idea what she's doing. That quickly changes when she finds an inconsistency in the story. She catches Chutney off guard and Chutney reacts with an unintentional confession.
At the end of Big Fat Liar, Jason Shepherd has teamed up with all of the people Marty Wolf has either mistreated or abused in order to put Wolf through the wringer. At the end, Jason confronts Wolf and demands he admit to plagerizing Jason's essay for his movie, and Wolf, at the end of his rope, screams YES, he did it. He finds out too late that the whole confrontation was being filmed and shown live to the rest of Hollywood's bigwigs.
A minor version occurs in Scrubs when Turk does this to Marco. Marco knows what Turk is trying to do, and Turk knows that he knows it, and yet Marco reveals his secret in a moment of blind rage regardless.
There's a bit in The Order of the Stick where Vaarsuvius, faced with Elan and his evil twin Nale and no way to tell them apart, gives a little speech that culminates in a flat assumption that Nale just isn't smart enough to pull off a good con—at which point Nale blurts out "Oh, yeah? So, what, you think you could have come up with something more clever than Nale did?" Vaarsuvius blasts him with lightning and replies, "Apparently."
In Bob and George, the Helmeted Author disguises himself as George, and blows up Proto Man's weapons cache, with Proto Man still inside. Still acting as George, he's questioned by Dr. Light, who doesn't seem shocked or even at all concerned with what's happened, prompting Helmut to scream, "BUT I JUST (BLEEP)ING VAPORIZED HIM!!!" Cover blown.
Tom in El Goonish Shive does it — with the quirk that while it still fits in the 'accidentally revealed publicly something he doesn't want known' department, the confession is proof against itself being true: Susan ends up more-or-less inadvertently baiting him into yelling that he is a fantasticliar. Well, a liar he might be, but a fantastic one wouldn't have unravelled so in the face of a mark spotting a mistake...
Sideshow Bob from The Simpsons does this, most notably when he reveals in open court how he rigged the mayoral election after Lisa implies he was just the face and the Rush Limbaugh expy was the real Man Behind the Man. But Bart and Lisa are pretty good at getting him to do this almost every time.
In the Gummi Bears episode, "Princess Problems", after Calla and her snobbishrival Princess Marie get into an argument in the midst of a war between their two kingdoms that was caused by a misunderstanding, whilst in the midst of it, Marie then starts ranting to Calla about how if she tricked King Gregor and King Jean-Claude (Marie's father) into thinking that Calla ripped her dress, which Marie actually did herself, then Calla would be forced to give Sunni (pretending to be a doll at that time) to Marie. However, once Marie realized that she said this out loud in front of the entire kingdom, her father becomes outraged, telling his daughter that he does not abide anyone telling him lies in his kingdom.
Non-verbal example in The Legend of Korra. Amon is knocked into the ocean and subconsciously waterbends himself out. Only after he's standing on a pillar of water does Amon realize that all of his anti-Bender followers can see him.
The Little Mermaid: Triton asks Sebastian about Ariel being in love. Sebastian thinks he knows that she is in love with a human, and blurts it out.
Sebastian: I tried to stop her, sir! She wouldn't listen! I told her humans were bad! They are bad, they are... Triton: Humans? What about humans?! Sebastian: Humans? [chuckles] Who said anything about humans?
From Kinky Boots: Lauren, who has been falling in love with Charlie but makes nice with his wife anyway mentions with sincere appreciation that he put his house up for mortgage in order to save the factory. Nicola didn't know, and is less than pleased he kept it from her. Lauren is mortified; she had no idea Charlie hadn't discussed it with Nicola first.
A chilling version occurs at the beginning of Once Upon a Time in the West. Frank and his men have just finished massacring a family, only to exit the house and find a small boy staring at them.
Done in Life Unexpected: The female lead Cate thinks her fiance discovered her cheating on him and tries to talk him out of leaving her. When in fact the fiance is blissfully unaware of the unfaithfulness at the moment. The truth reveals and chaos ensues.
Buffy the Vampire Slayer: Happens to Buffy in the episode "Angel" where she accidentally reveals what she's been writing in her diary when she thinks Angel has read it.
Bones: Dr. Goodman reveals to the rest of the squints that Booth has a kid in the episode "The Man in the Fallout Shelter", thinking that they, who work with Booth every day, would already know this. They, of course, do not.
Dexter's mind: I'm going to choose not to misinterpret that.
Deep Space Nine. Unaware that the Alien Invasion scare on Earth is just part of a Day of the Jackboot scheme, Captain Sisko calls a colleague about an irregularity in the security system. To his surprise the colleague thanks him and promises to cover things up so no-one else would find it.
Graduados is a comedy where Everyone Went to School Together. Back in the school, the fat girl Jimena Benitez was insulted by everybody, especially Pablo, the school bully. She got thin after graduation, changed her face, her name was now Patricia Longo... and destiny put her along her former schoolmates. Pablo fell in love with her, had a son with her, and left his wife for her, without knowing her identity. This began as a big secret, but in time it turned into an Open Secret, known by everybody, except Pablo. Even the guy who was Put on a Bus and was Back for the Finale knew it, thanks to chats with friends. Which led to...
Guillermo: And what about the son you had with Jimena?
Pablo: Jimena? Don't you mean Patricia?
Guillermo: Jimena, Patricia, Patricia, Jimena, what does it matter? You know what? I would have killed to see your face at the exact moment when you heard that Patricia Longo was Jimena Benitez!
In Fullmetal Alchemist Edward does this to the priest who is fooling the townspeople about his philosopher's stone and his ability to bring the dead back to life, he hides a microphone in his office while he rants his evil plans.
In The Curse of the Were-Rabbit, when Victor Quartermainefails to kill the titular monster, he tries to tell the chief of police that "The beast isn't actually dead yet" while he's presiding over a festival with a megaphone. The chief promptly repeats what Victor has said to him in pure shock, not realizing he has shouted it through the megaphone. Cue a prolonged pause from the townspeople, followed by widespread panic.
In A Face in the Crowd (1957). the downfall of Larry 'Lonesome' Rhodes is caused by an opened mike allowing the TV public to learn of his evil nature.
Also from Kinky Boots: Charlie's wife Nicola confronts Charlie when she discovers that Charlie has mortgaged the house rather than sell the ailing shoe factory he inherited from his father. When Nicola screams and kicks out Lola the Drag Queen, Lola scampers, and drops the prototype boot. Purely by accident, the dropped boot lands on the factory's PA system switch. So the entire staff hears Charlie's impassioned speech, wherein he tells Nicola that he can't just abandon the factory because he grew up knowing these people. Charlie shouts that he doesn't actually enjoy making people redundant, and that he has to try saving the factory. He tells her that if she can't get that, then she may neverget Charlie Price. This has the result of the entire factory gaining new respect for the kid they scoffed at for trying to help the factory with no idea how to make shoes.
This troper got the impression that Lola did it intentionally as a way of discreetly getting the workers' waning support back.
Happens at the end of The Adventures of Ford Fairlane.Julian Grendel, the antagonist, reveals his diabolical plan involving a Condom Factory front operation to Ford Fairlane, while standing backstage at an event. During his tirade, Zuzu Petals stands behind him with a microphone, which broadcasts the confession to a crowd outside.
"I even pissed in the punch bowl!"
Max Keeble's Big Move: A rather hilarious example happened shortly after Jindrake finished his first telerecorder school announcement: When doing the announcement that requires all of the student body and faculty/staff meet at the auditorium for a special, mandatory announcement, he is dressed like either the President of the United States or probably the Governor of California with the Capitol Building seen behind him from the window. Shortly after Jindrake apparently cuts the transmission, he then takes off the suit, revealing that it was actually a fake, velcro-strapped bodysuit while bragging about himself in a manner similar to a Movie reviewer in a editorial column in the local newspaper, and revealing that even the background was actually fake, a makeshift curtain, all of which was caught on-feed to the students and to their uproar, up until Mrs. Rangoon, his secretary, revealed that the camera's red light was still operating. Max uses this to expose his plan on using most of the school budget to build a football field to make himself superintendent.
In Mister Roberts, Morton leaves the mike to the ship's PA switched on when screaming at Roberts. This lets the crew know the truth about Roberts strange behaviour and that Morton is really the one to blame.
There was a particularly crazy take on the trope in Polish TV series Plebania (The clergy house) that is borderline creating its own type, but fits no. 3 the most. A mafia-connected entrepeneur tells his evil plans to completely paralyzed, mute old man, presumably to depress him. Some episodes later, the old man focuses himself to blink Morse code to other people, and the plans get out.
The famous "coming out" episode of Ellen: the title character accidentally whispers "I'm gay" into the microphone of the airport PA system.
In one scene in Chalk, Suzy Travis walks into a classroom and confesses to headmaster Eric Slatt that she had an erotic dream about him. Eric Slatt stares at her with a shocked expression on his face, and slowly moves aside to reveal the (switched on) microphone of the school's PA system.
An example from Yes, Prime Minister. When Sir Humphrey (the originalThe Humphrey) gives a standard (that is, vague and uninformative) radio interview to the BBC about unemployment, he has a conversation with the interviewer afterwards, and confesses that the government could probably reduce unemployment by eliminating welfare, unaware that the conversation is still being recorded. Not a standard example, since the broadcast wasn't live, and the BBC apparently wanted to blackmail Humphrey with the tape. When Jim Hacker finds out, he berates Humphrey with "Always treat every microphone as though it wereon!"
Subverted in The West Wing where President Bartlett makes a rather snarky comment about his opponent on a camera that was still live - of course, he knew it was live when he did it. As CJ says admiringly, "That was old-school."
In 8 Simple Rules, Bridget accidentally activates the school PA when Kerry reveals that she lost her virginity. Oops.
In the Gossip Girl episode "Enough about Eve", Vanessa has a hidden microphone and gets Blair to confess to her machinations to be the one giving the freshman toast.
Also, in "The Studio Job", the villain is savvy enough to make sure none of the live mics right in front of him can pick up his whispered confession/threat to Elliot. Unfortunately for him, he whispered it directly into Elliot's ear (and thus his tiny two-way ear-piece communication device), so Hardison is able to record it and play it over the sound system for everyone to hear.
Metal Gear Solid 2 had a variation: Raiden, after learning from Otacon in an optional codec call, that the rumors about the Big Shell being a big cover up are all true, and especially that Solid Snake said that Raiden was a weak, simple-minded, stubborn fool, exploded about it and insulted Snake, not realizing that Snake was right next to Otacon while angrily insulting Snake until Otacon told him. Also counts under Engineered Public Confession.
South Park has the boys engineering confessions this way, including having a totally not Mickey Mouse boss explain how he exploits the Jonas Brothers into selling sex to preteen girls.
In the Fairly OddParents episode "The Secret Origin of Denzel Crocker!", Timmy goes back in time to try and prevent what turned his teacher into such a miserable, evil and crazy person and learns that young Denzel was once a happy, popular kid who had none other than Cosmo and Wanda as his fairy godparents. Timmy deduces that Crocker must have accidentally revealed that he had fairies and had them taken away, and that a celebration of Denzel's good deeds is when it happens, and tries to keep Crocker away from the microphone. Thanks to a double dose of Cosmo's stupidity, Timmy ends up accidentally revealing Crocker's fairies to the crowd himself while trying to keep Crocker from doing so.
In an episode of SpongeBob SquarePants, Plankton says that his customers are "Doo-Doo Dunderheads" and "The dumbest of the dumb" on the microphone he used to transmit the sounds of his cash register.
In Doug, Roger Klotz is dealt this combined with a Hoist by His Own Petard moment. After he successfully frames Doug for stealing Assistant Principal Bone's yodeling trophy, he goes to gloat about it to Doug, only to unwittingly activate the intercom while he was talking! To his credit, Doug did try to warn him.
This was also used in the Garfield and Friends episode "Supermarket Mania". When Jon confronts Corrupt Corporate Executive Mr. Baggit about why the prices of his Food Monster supermarket are high, Mr. Baggit then proceeds to explain to Jon about his true intentions, which are to put Gramps' Supermarket out of business so that he could charge the customers a lot more than they normally pay. However, he didn't count on Garfield holding the microphone directly in front of him while he was explaining this, resulting in hundreds of angry customers immediately leaving the Food Monster afterwards once they've learned the actual truth.
In an episode of American Dad!, the school's announcement readers have a tendency to get Drunk with Power and go nuts, eventually getting taken down by Engineered Public Confession. After going through four such changes in as many days, the Principal grumbles about "stupid kids" and about how it was so much easier being a drug dealer in South America, where you got money, drugs, and girls — "Not women, girls, itty bitty things!". After he's said all this, a teacher enters the room to point out that the intercom mike has been on the whole time. The principal's reaction? "Aw, motherfucker."
In the tenth season finale of Family Guy this happens to Joe after he cheats on his wife Bonnie out of revenge for an affair that she'd had in Paris last season. During a birthday party at the Swanson house Joe goes upstairs to talk privately with Peter and Quagmire and confesses to them about his affair and how guilty he feels about it. It isn't until an angry Bonnie bursts into the room that the guys realize that she - and everyone else at the party - had overheard the whole thing over Suzie's baby monitor.
An example of this happened in Real Life when then UK Prime Minister Gordon Brown was finished talking to a woman voter and then rushed off to his car and muttered to himself that she was a "bigoted woman". While his mic was still on. For the whole of a television audience to hear. Whoops.