Near-Death Experience

A character almost dies, but is given a chance to or is forced to return. Often overlaps with It Is Not Your Time. Sometimes overlaps with Near-Death Clairvoyance. If the near-death is a near-suicide, may overlap with Wonderful Life. To some extent Truth in Television.

A Flatline Plotline is about deliberately inducing these.

Anime & Manga

 * This happening to the protagonist in Fate/stay night in his childhood is his primary motivation for most of the routes in the game, and indeed lost his own sense of self because of this. Having been the only survivor of the incident, he does not want anybody else to go through that, even if it means his own sacrifice.
 * Tsukihime loves this trope. The protagonist first narrowly escapes death as a child, then again when , and for the entirety of the game he is almost literally a papers-width away from death. He can sense his own death so well it borders on precognition, allowing him to barely survive against some of the strongest beings in the world.
 * He gets another one.
 * In a rare serious arc of Ranma 1/2, Ryouga dies when the superhumanly-strong Lime crushes his windpipe. He finds himself in a field of flowers with a river in the distance, and his grandpa and grandma yelling, from the other side of the river, not to come closer. But when he hallucinates Akane happily saying goodbye to him, together with Ranma, Ryouga is shocked back to life, depressed enough to summon the Shishi Hokodan and crush Lime with it.
 * Near-death experiences are a dime a dozen in Hell Teacher Nube. Once, a moribund Hiroshi ran into a cute girl while in the fields of the afterlife, and fought valiantly to bring her back with him... only to have her turn out to be an ancient old woman in a hospital who was suddenly quite smitten with him.
 * Nanoha in the Snow Means Death Flash Back of Magical Girl Lyrical Nanoha StrikerS. Caused her to reassess her training regimen to so that her trainees won't end up in a similar situation.
 * In the Magical Record Lyrical Nanoha Force manga,.
 * In the 4th novel of Suzumiya Haruhi, . In his own words: "Damn it, I'm about to die."
 * A major part of the manga Plus Anima, because you can only get an Anima if you're near death.
 * Hei in Darker Than Black, several times. He barely made it through the Phlebotinum War and the first season finale, and comes up against a couple of overpowered characters (Combat Clairvoyance and a Gravity Master, in particular) in the Interquel who very nearly manage to kill him. Though frankly, anyone with his job description is likely to have near-misses on a regular basis.
 * In Naruto.
 * Hyatt from Excel Saga, who has a near-death experience about once or twice a week. She has them so often that her senior Excel commented that one of them was 'pretty cliche'.
 * Happens to Mugen three times in Samurai Champloo. Each time it happens, he is shown floating in an empty white space surrounded by grim reaper like beings. And each time, he tells them that he's not ready to die, and that they can shove it.

Comics

 * Tony Stark.
 * The Joker nearly dies at the end of the Last Laugh crossover. This is possibly the first time the reader is able to experience one of his numerous brushes with death with him.
 * The Punisher has this in "The Punisher: Born".

Film

 * The entire film of Flatliners is a plot built around this.
 * In Hereafter, Cecile De France plays a French reporter who is caught in a tsunami and suffers a near death experience, causing her to become obsessed with the afterlife.

Literature

 * in Harry Potter.
 * A literal example of this trope tends to happen to Commander Vimes in the Discworld novels, as his version involves seeing the Grim Reaper himself, who on one occasion notes that Vimes having a near-death means that he has to undergo a "near-Vimes experience". The Grim Reaper in Discworld is Genre Savvy enough to see Vimes's Plot Armor and acknowledges him for it.
 * Rincewind also has more than his fair share of Near Death Experiences, though his first in the series is entirely accidental. He runs into Death in the middle of the street, much to their mutual surprise, as Death was expecting to see Rincewind in an hour or so halfway across the Disc. Death offers Rincewind a "very fast horse" to make the appointment, but Rincewind politely declines before hightailing it.
 * Rincewind undergoes a lot of these: As a result of all the implausible events he's been involved in, being Lady Luck's favourite game piece, Rincewind's hourglass isn't so much a 'hourglass' as a 'MC Escher creation in glass'. Even Death is unsure when he'll die, and consequently, he shows up every so often to check up on matters when it looks like it might happen.
 * Of course, due to there being more and more "Bloody Quantum" around these days, Death is increasingly unsure of when anyone will die. He makes the best of it, helped by the fact that apparently only main characters get a 'quantum out'.
 * He seems to be at least slightly dead during the course of the game Discword II: Missing Presumed..., having survived the explosion that tossed Death quite a ways and later commenting that if he stands still for too long, flies converge on him and he sees zooming star-fields (though considering the form the player's mouse pointer takes, this is more a case of Breaking the Fourth Wall).
 * Rincewind's seeming inability to just roll over and die is referenced and parodied by Death on one occasion, where Death remarks.
 * A rather strange example occurs in Ghost Hunter.
 * Passage centres around near death experiences.
 * Despite being marketed for children, Deltora Quest has quite a few of them, and they're all pretty jarring/frightening. In rough order,

Live Action TV

 * Jean-Luc Picard has a Near-Death Experience featuring Q and the origin of his artificial heart in the episode "Tapestry" on Star Trek: The Next Generation.
 * Nate on Six Feet Under.
 * In the fifth-season episode of Babylon 5 "The Very Long Night of Londo Mollari", Londo (naturally enough) had a Near-Death Experience in the wake of a near-fatal heart attack.
 * And Stephen Franklin's "walkabout" actually does end with him meeting himself, in a hallucination after being stabbed. And then there's what happens to Sheridan after he blows up Z'ha'dum, although how close he actually came to dying is an open question.
 * Meredith on Grey's Anatomy
 * Buffy (repeatedly) on Buffy the Vampire Slayer
 * on Tru Calling, though this was part of the character's backstory, and not revealed for some time.
 * Pretty much everyone on Supernatural.
 * Fraser in Due South, in the fourth season episode "Dead Men Don't Throw Rice".
 * In House, the main character had one, when he had the infraction in his leg which caused his limp ("Three Stories"). Always the skeptic, he believes that it was just a hallucination.
 * In the episode "97 Seconds", a patient had a near-death experience, which made him feel so good that he electrocutes himself to have another one. Intrigued, House also electrocutes himself, but pages Amber right before so he would be revived. He sees nothing. This doesn't make much sense, since House already had a near-death experience - or two, if you count his hallucinations in "No Reason". Wilson even tells this to him afterwards.
 * Hiro has one of these on Heroes  He's put on trial for irresponsible use of his powers.
 * Does that make this a What The Hell Hiro moment?
 * Happens to (or is mentioned by) several characters in The X-Files.
 * Wiseguy. Happens to Frank McPike after he gets shot. He sees a dog leading him towards the Tunnel of Light, only to be called back by the sounds of the long-silent churchbell his friends start ringing.
 * In the Curb Your Enthusiasm episode "The End", Larry dies and goes to Fluffy Cloud Heaven, but after getting into a petty argument with his guide angels, he's sent back to his body.
 * The Equalizer takes a class of juvenile delinquents to speak to a former hitman about his near-death experience. Later Mickey Kostmeyer scoffs at the idea and asks McCall if he saw anything on an occasion when he flatlined after getting shot in Africa. The episode ends on McCall's silent expression.
 * Mac on CSI: NY has a whole episode of this after being shot in 'Near Death'.

Tabletop Games

 * In Orpheus, a character must have at least one near-death experience to work for the Orpheus Group (or any of its rivals). The more you have gone through, the more likely it is the company will take an interest in you.
 * Likewise, Geist: The Sin Eaters, a spiritual successor to Orpheus, has it so that Sin-Eaters come into power after a near-death experience. Well, it's not so much a near-death experience as it is actually dying and being led back by a geist, but still.

Theater

 * Lucy in Avenue Q.
 * Mimi in Rent.

Video Games

 * The "plot" of Dance Dance Revolution tracks "Healing Vision" and "Healing Vision: Angelic Mix" (if you have the background animation turned on) suggest near death experiences. In Angelic Mix you even hear an explicit flatline about halfway through the song (and the arrows freeze momentarily) and a ghostly angel fades into view.
 * Metal Gear Solid 3 Snake Eater has an entire boss fight take place during one of these after Snake jumps off a cliff into a river some 50-100 feet below to escape from an enemy base. There you meet The Sorrow, a medium and  member of The Cobras, and you have to face everyone you've killed in the game before you can come back to life.

Web Comics

 * In Powerpuff Girls Doujinshi,
 * An important plot point in Wapsi Square is that Monica and Shelly both had near-death experiences on the same day long before the comic started. A third major character actually did die that day.
 * In The Beast Legion Xeus is almost killed at the hands of Dragos in Issue 04, before Brilight saves him.

Western Animation

 * Big Bob Pataki, Hey Arnold!!, "Big Bob's Crisis", which plays out as a Flowers for Algernon Syndrome.
 * Stewie Griffin in Family Guy Untold Story.
 * Mr. Krabs in SpongeBob SquarePants.

Real Life

 * While there many known cases, only a few have been well observed, with actual proof that the brain was inactive during the "experience." One of them is Pam Reynolds. Watch there: