William Zabka to Katy Perry: Every How I Met Your Mother Celebrity Cameo, Ranked

The world of sitcoms got a breath of fresh air in 2005 when How I Met Your Mother premiered. While the show used a familiar premise, a group of friends who are also roommates hanging out at a favorite hangout and exploring life in the city, the modern-day twist, sharp humor, and relatable lifestyles made it stand out.

Created by Carter Bays and Craig Thomas, the series followed Barney’s outrageous, often misogynistic antics, Ted Mosby’s loverboy phase, Lily and Marshall’s high-school-like romance, and Robin’s nonchalant, tomboyish vibe making each storyline feel fresh and engaging.

To keep things exciting, the show regularly featured guest appearances from some of the biggest names in entertainment. And we are not talking minor actors, these were true legends, from The Karate Kid’s William Zabka and Breaking Bad’s Bryan Cranston to pop superstar Katy Perry.

These cameos added an unexpected turn to the series, giving fans moments they would never forget. Now, let us dive into every memorable celebrity cameo and rank them from least to most notable.

35. Judy Greer

Judy Greer is one of the most versatile actors to come up on the TV series scene. In How I Met Your Mother, she dons the role of Royce, one of Ted’s dates, whom he takes to watch The Wedding Bride. She appeared in Season 5, Episode 23–The Wedding Bride.

Beyond this cameo, she is widely recognized as a cameo legend, with her face popping up on some of the most popular shows like The Big Bang Theory and Modern Family. Recently, she starred in the Apple TV+ series Stick alongside Owen Wilson. With her mix of silly roles, playful cameos, and even the occasional dramatic turn, she keeps showing just how versatile she is as an actor.

34. Weird Al Yankovic

Weird Al Yankovic is a legendary musician, actor, and writer, best known for his comedic parodies of hit songs. In How I Met Your Mother, he appeared as himself in Season 7, Episode 7, Noretta, during a flashback where Ted Mosby(Josh Radnor) claims he inspired Yankovic’s hit Like a Surgeon.

His role was small and downright silly, not the kind of cameo that stretched across episodes or even the full runtime. Honestly, if you looked away for a few minutes, you might have missed that he was there at all. Still, Weird Al managed to leave his mark, turning the moment into something you’d remember. It almost played out like one of those Forrest Gump-style accidents, where he just stumbles into history without even trying.

33. Mandy Moore

You probably recognize Mandy Moore as Rebecca from This Is Us, or maybe her voice feels familiar because she brought Rapunzel to life in Disney’s Tangled. In How I Met Your Mother, she pops up in Season 3’s opener, Wait For It, playing Amy, a carefree party girl who loves teasing Barney.

What makes the cameo even funnier is her night out with Ted, which ends with him blackout drunk and waking up with a butterfly tattoo, one that quickly becomes a running gag since it’s the kind of tattoo often linked to sex workers. Mandy’s short appearance not only gave us laughs in the moment but also set up one of the show’s most memorable recurring jokes.

32. John Cho

John Cho hardly needs an introduction. Ever since Harold & Kumar hit theaters, he’s been a comedy legend, with the duo’s weed-fueled misadventures cementing his place in pop culture. And if that wasn’t enough, his turn as Sulu in the Star Trek films made sure everyone knew his name.

But Cho’s love for Earth pretty much ended with Harold & Kumar, because in How I Met Your Mother he made a short but memorable cameo as Jeff Coatsworth in Season 3, Episode 6, I’m Not That Guy. Jeff is a money-hungry corporate headhunter who convinces Marshall (Jason Segel) to ditch his passion for environmental law and instead channel that energy into chasing a big paycheck.

31. Jane Seymour

After making a name for herself as Dr. Quinn in the TV series Dr. Quinn, Medicine Woman, many were already familiar with her acting chops, but seeing her pop up in How I Met Your Mother caught quite a few fans by surprise. She appears in Season 2, Episode 6, Aldrin Justice, as a professor who leaves everyone with their mouths wide open.

She plays a tough teacher whose grading is stricter than Heimdall guarding Asgard, and Marshall quickly concludes it’s all tied to her messy divorce, making it a challenge for him. Channeling the same commanding presence she had as Dr. Quinn, she turns the role into a scene-stealer, proving that even in a guest spot, she can make a performance unforgettable

30. Tracey Ullman

Tracey Ullman might have seemed like an unexpected choice to play Robin’s mother, given Robin’s Canadian background, but she never let that gap show on screen. Any doubt only comes after you recognize her or know that she is British-American, a real testament to her acting skill.

With her immense experience in acting, singing, and screenwriting, she brings the same talent and presence to How I Met Your Mother in the final season as Genevieve Scherbatsky, Robin’s beloved mother.

Ullman appeared in Season 9, Episodes 19–Vesuvius and 20–Daisy, giving fans a heartfelt look into Robin’s family background. Her cameo added depth to Robin’s story arc during the show’s closing chapters, while Ullman’s dramatic skills made her a memorable late addition to the series.

29. Casey Wilson (Alongside Keegan-Michael Key)

Casey Wilson didn’t get typecast in How I Met Your Mother after her role in Happy Endings. Playing Kristen, the quirky and lovable best friend of the group, she stood out in a cameo alongside comedic legend Keegan-Michael Key. For those who didn’t recognize him, Key is one half of Key & Peele, the duo behind some of the most iconic comedy sketches.

The pair appear in Season 8, Episode 24, Something New, as a couple who are supposed to fight after Barney and Robin’s sabotage attempt, but instead end up growing closer, making their scheme pointless. While Wilson wasn’t typecast, she brought the same comedic energy that made her so popular, and Key’s signature timing made them a perfect duo, delivering a cameo full of chemistry and laughs.

28. Ralph Macchio

Robin always knew just the right prank to get under Barney’s skin, and she pulled it off perfectly. While the world sees Ralph Macchio as the hero of The Karate Kid, Barney has always insisted that William Zabka is the real star. To surprise and slightly disappoint Barney, Robin brought in Ralph Macchio himself.

Macchio appeared as himself in Season 8, Episode 23, Something Old, giving fans a fun twist and a nostalgic callback. The cameo was a treat for Karate Kid fans, especially after it highlighted Zabka in a new light, with Cobra Kai expanding the universe and showing Zabka’s side of the story. it only reinforced Barney’s longtime belief that Zabka was not so bad after all. He just knew it all along

27. William Zabka

If you thought the Karate Kid universe ended with Ralph Macchio, think again. How could the series wrap up without Barney getting what he wants? That is exactly what happened when William Zabka, the other Karate Kid legend, made his entrance in Season 8, Episode 22, Bro Mitzvah. Unlike Macchio, Zabka did not just show up for a quick cameo; he became a recurring presence.

He even got close to Barney, stepping in as his best man for Barney and Robin’s wedding. That role did not last long because Barney eventually made peace with Ted and returned the honor to him. Still, Zabka’s cameo left a memorable mark on the final season and added a hilarious twist for fans of both How I Met Your Mother

and The Karate Kid.

26. Candice King

This is one of those cameos where you might see the actor and think they look or sound familiar, but you only fully realize it when someone mentions it. Candice King’s role was similar, almost unrecognizable after she dyed her hair red. That change was essential for the plot, though, since it sold the idea that she is a hairdresser and leads to Marshall ending up with frosted tips for his wedding with Lily.

What makes it even funnier is that she is not just any hairdresser, but a family member. Candice King, who plays Amy, is actually Lily’s cousin. She appears in Season 2, Episode 21, Something Borrowed. Already a household name from her role in the fantasy series The Vampire Diaries, this silly cameo and her changed hairstyle show just how versatile she can be, making the moment both surprising and hilarious.

25. Morena Baccarin

More than just becoming famous, her cameo in How I Met Your Mother gave us a small preview of the kind of roles she would go on to take in major projects like the Deadpool movies and Gotham. Fans rewatching the show now can really appreciate Morena Baccarin’s performance as Chloe even more.

Just like in Deadpool, she plays an unhinged character, earning the nickname ‘Crazy Eyes’ from the gang. In Season 2, Episode 7, Swarley, Chloe is the girl Marshall shows interest in during his short-lived breakup with Lily. Baccarin gives Chloe an over-the-top intensity that starts off innocent but quickly drives Marshall insane, showing just how effortlessly she can shift from sweet to completely unpredictable.

24. Heidi Klum

Supermodel and television personality Heidi Klum made a cameo as herself in Season 3, Episode 10, The Yips. Barney meets her at a secret Victoria’s Secret afterparty, where Klum offers him unexpected advice on love.

While it did not require much acting, it was fun to see a supermodel bring unexpected energy to the show. Heidi Klum looked stunning, added extra glamour to the episode’s backdrop, and brought her star power to the series, appealing not just to TV fans but also to fashion enthusiasts.

23. Alex Trebek

It seems like monetary games just follow Alex Trebek wherever he goes. The same was true in Season 6, Episode 12, False Positive, where the Jeopardy! host played himself running a fictional game show called Million Dollar Heads or Tails. Unlike the episode where Barney thought a talk show host was his dad, this time it was for Robin, who was auditioning for the role of ‘Currency Rotation Specialist.’

It was a fun little nod to Trebek’s real-life legacy as one of the most beloved game show hosts. Seeing him bring that same energy to How I Met Your Mother raised the bar for celebrity cameos and added a memorable touch to the episode.

22. Maury Povich

Talk show host Maury Povich, best known for The Maury Show, made a cameo as himself in Season 6, Episode 4, Subway Wars. It really goes to show how small the world is, as the gang keeps spotting him in the most random places and at the most random times.

While we can all debate the resemblance or not, the energy he gave off fit perfectly with the comedic moment he was part of. Being a long-time New Yorker only added extra local flavor to the city-centric episode, making his brief appearance both funny and memorable.

21. Jennifer Morrison

Jennifer Morrison, well known for House and Once Upon a Time, had one of the more substantial guest arcs on How I Met Your Mother. She debuted as Zoey Pierson in Season 6, Episode 4, Architect of Destruction. Zoey is a mischievous activist who becomes Ted’s enemy-turned-girlfriend, sparking one of his most complicated relationships.

Executive producer Craig Thomas even called Zoey the biggest female character added to Ted’s life outside the main cast. It’s funny to think how Morrison’s role was just supposed to be a cameo but ended up being recurring. Her screen presence made it impossible for the creators to treat her as a minor guest, and she became central to one of Ted’s most memorable and complicated storylines.

20. Lucy Hale

Lucy Hale, best known for Pretty Little Liars and films like The Hating Game and Truth or Dare, played Katie Scherbatsky, Robin’s younger sister. She first appeared in Season 2, Episode 12, First Time in New York, where Robin helps guide Katie through an important moment in her early sex life.

Hale later returned in Season 9, Episode 19, Vesuvius, during Robin and Barney’s wedding. Her appearances gave fans a look into Robin’s family and allowed Hale to showcase the charisma that would later make her a household name.

19. Ashley Benson

Ashley Benson, best known as Hanna Marin on Pretty Little Liars, made a memorable cameo in How I Met Your Mother as Carly, Barney’s half-sister. She appears in Season 8, Episode 14, Ring Up!, where Ted briefly dates her without knowing her true identity.

Her role was a wild one, pushing the show’s boundaries with the joke about the age gap between Ted and Carly. Ted is hesitant at first, but Barney encourages him to continue the fling, until he finds out the shocking family connection. Watching Barney’s opinion flip instantly once he realizes Carly is his half-sister adds to the hilarity. Outside HIMYM, Benson is also known for Pixels alongside Adam Sandler, but it’s her unexpected and chaotic energy as Carly that makes this cameo unforgettable.

18. Alan Thicke

Alan Thicke, beloved for Growing Pains, had a recurring role in How I Met Your Mother as himself, first appearing in Season 3, Episode 16, Sandcastles in the Sand. He was tied to Robin’s hilarious pop-star past as Robin Sparkles, acting as a fatherly figure in her cheesy Canadian music videos.

Thicke’s appearances were some of the funniest callbacks to Robin’s teen idol days, making them stand out as more than just quick cameos. His presence brought extra charm and nostalgia, especially for viewers who grew up with his earlier television work.

17. Katie Holmes

Katie Holmes, best known for Dawson’s Creek, Batman Begins, and Miss Meadows, played Naomi, also known as the “Slutty Pumpkin.” She appeared in Season 7, Episode 8, The Slutty Pumpkin Returns. Naomi was the mystery girl Ted met years earlier at a Halloween party, and he spent seasons hoping to reconnect with her.

When they finally meet again, Ted realizes they have no real chemistry, creating a bittersweet but hilarious payoff to a long-running gag. Her role added a whole lot of sweetness to the episode, and she brought in some star power that made the moment even better.

16. Enrique Iglesias

International pop star Enrique Iglesias gave fans one of How I Met Your Mother‘s most fun musical cameos as Gael, Robin’s free-spirited boyfriend from Argentina. He first appears in Season 3, Episode 1, Wait for It and continues into Episode 2, We’re Not From Here.

Gael is easygoing, creative, and quickly wins over Marshall and Lily, but his relaxed attitude annoys Robin, who eventually kicks him out of her apartment. Iglesias, known for hits like Bailamos, Be With You, and Ring My Bells, brought his real-life fame to the role while adding a funny storyline that playfully poked fun at cultural stereotypes.

15. Danica McKellar

Danica McKellar, who rose to fame on The Wonder Years, appeared twice in How I Met Your Mother. She first showed up as Trudy in Season 1, Episode 10, The Pineapple Incident, one of Ted’s most infamous blackout nights. She later returned in Season 3, Episode 3, Third Wheel, sparking one of Ted’s wildest storylines.

Trudy became part of Ted’s drunken, mysterious pineapple night, a running gag fans still talk about. McKellar’s presence was both nostalgic and hilarious, making her cameo one of the standout appearances in the early years of the show.

14. James Van Der Beek

Another Dawson’s Creek alum to guest star, James Van Der Beek played Simon, Robin’s first boyfriend from her days as teen pop idol Robin Sparkles. He first appeared in Season 3, Episode 16, Sandcastles in the Sand. When Robin reunites with Simon, she falls for him all over again despite his obvious decline in looks and personality.

Simon’s washed-up charm makes for a hilarious contrast to Robin’s nostalgia. The episode also features Barney obsessively tracking down the music video for Robin’s second single, making it one of the show’s funniest pop-culture callbacks.

13. Lin-Manuel Miranda

Long before Hamilton turned him into a household name, Lin-Manuel Miranda had a cameo in Season 9, Episode 9, Bedtime Stories as Gus, a fellow bus passenger who also raps. Marshall spends the episode trying to tell baby Marvin bedtime stories entirely in rhyme, and Gus joins in by rapping his own rhyming tale.

While it’s a brief appearance, it’s extra special for fans now knowing Miranda went on to create Hamilton, In the Heights, and contribute music to Moana and Encanto. His HIMYM cameo feels like an early Easter egg for what was coming in his career.

12. Jorge Garcia

Known worldwide as Hurley from Lost, Jorge Garcia appeared as Steve “The Blitz” Henry in Season 6, Episode 10, Blitzgiving, and later in Season 9, Episode 21, Gary Blauman.

The Blitz was a Wesleyan University friend of Ted and Marshall cursed with always leaving before something amazing happened. His curse leads to one of the funniest Thanksgiving episodes in the series. HIMYM even dropped a Lost Easter egg, with Garcia shouting out the famous sequence of numbers–4, 8, 15, 16, 23, 42, making his cameo extra clever.

11. Bob Barker

Game show royalty made his way into How I Met Your Mother when Bob Barker appeared as himself in Season 2, Episode 20, Showdown. Known as the longtime host of The Price Is Right, Barker became central to one of Barney’s funniest storylines, as Barney was convinced that Barker was actually his father.

To prove it, he went on the show and hilariously played along while confronting the host. For fans who grew up watching Barker’s legendary career, seeing him appear as himself added a nostalgic punch and made the episode an instant classic.

10. Joe Manganiello

Before he became known for True Blood and Magic Mike, Joe Manganiello had a recurring role as Brad, Marshall’s friend from law school. First introduced in Season 2, Brad and Marshall bond after their breakups, even going to brunch together, which Ted and Robin lovingly tease as a “bromance.”

Over the series, Brad appears in several episodes, sometimes as Marshall’s ally and later as his courtroom rival. Long before this role, Manganiello made his film debut as Flash Thompson in Sam Raimi’s Spider-Man. Seeing him go from comic book bully to law school buddy gave HIMYM fans a fun glimpse of his range.

9. John Lithgow

The legendary John Lithgow joined How I Met Your Mother as Jerry Whitaker, Barney’s estranged father. His first appearance came in Season 6, Episode 18, Legendaddy, where Barney struggles to reconcile the wild dad he imagined with the suburban father Jerry has become.

Lithgow brought heart to the role, creating one of the show’s most emotional storylines. Outside HIMYM, Lithgow’s career is packed with iconic work, from Dexter to Third Rock from the Sun, to voice acting in Shrek, and comedies like Daddy’s Home. His addition to the cast elevated Barney’s backstory with gravitas only an actor like Lithgow could deliver.

8. Martin Short

Comedy legend Martin Short brought his trademark energy to How I Met Your Mother in Season 7, Episode 5, Field Trip. He played Garrison Cootes, a senior partner at the environmental law firm Honeywell and Cootes, where Marshall briefly worked.

By the time of his cameo, Short was already a household name thanks to classics like Father of the Bride and Three Amigos, but today’s audiences might know him best as Oliver Putnam from Only Murders in the Building. His presence on HIMYM was a treat for longtime comedy fans and gave Marshall’s legal storyline an extra jolt of star power.

7. Nicole Scherzinger

The Pussycat Dolls frontwoman swapped pop stardom for sitcom fun when she played Jessica Glitter, Robin’s former best friend and co-star on the fictional Canadian kids’ show Space Teens. She appeared in Season 6, Episode 9, Glitter, where it’s revealed that the two drifted apart after Jessica had a baby.

Their reunion, thanks to Lily and Marshall, became one of the show’s sweeter moments. Scherzinger, who also made her mark as a judge on The X Factor USA and UK, brought charm and nostalgia to her cameo, especially for fans who followed her music career.

6. Bryan Cranston

Before he became TV’s most iconic antihero in Breaking Bad, Bryan Cranston turned up on How I Met Your Mother as Hammond Druthers, Ted’s arrogant and condescending former boss. He first appeared in Season 2, Episode 6, Aldrin Justice. Druthers is everything Ted can’t stand: dismissive, egotistical, and terrible at managing people.

Cranston makes the role unforgettable with the same commanding presence that made Walter White so menacing. Already beloved from Malcolm in the Middle, Cranston’s HIMYM cameo hit even harder once Breaking Bad skyrocketed him into legend status. His later projects, from Your Honor to The Upside and his return in Better Call Saul, only make this early sitcom appearance more fun to revisit.

5. Bob Odenkirk

Breaking Bad fans weren’t just treated to Walter White; Saul Goodman himself also popped up in How I Met Your Mother. Bob Odenkirk appeared as Arthur Hobbs in Season 3, Episode 15, The Chain of Screaming. Nicknamed “Artillery Arthur,” he was Marshall’s tough, no-nonsense boss, constantly berating his employees.

Odenkirk nails the role with the same sharp edge and sass that later made Saul Goodman such an iconic TV character. Long before his Emmy-winning turn in Better Call Saul, his cameo here showed he could play the smug, abrasive type to perfection.

4. Carrie Underwood

Country superstar Carrie Underwood gave Ted false hope as Tiffany in Season 5, Episode 16, Hooked. Tiffany wasn’t really interested in Ted but kept him “on the hook” while she dated other men, leading to one of the show’s funniest and most relatable storylines.

Underwood rose to fame after winning American Idol Season 4 and went on to dominate country music with hits like “Before He Cheats” and “Blown Away.” Despite not being a professional actor, she pulled off a charming, hilarious performance that made her cameo one of the standout moments of the later seasons.

3. Jennifer Lopez

Pop culture powerhouse Jennifer Lopez guest-starred in Season 5, Episode 17, Of Course as Anita, a self-help author who became the one woman Barney couldn’t charm. Robin set the two up, knowing Anita’s “17-date rule” would drive Barney insane.

Watching J.Lo flip the tables and use Barney’s own tricks against him led to one of his most ridiculous moments, jumping into the Hudson River just to prove a point. Known globally for her music, dance, and acting career, Lopez brought star power and comedy flair that made her cameo unforgettable.

2. Katy Perry

The gang didn’t remember her real name, but fans definitely did. Katy Perry appeared in Season 6, Episode 15, Oh Honey as a sweet yet incredibly gullible character the gang simply called “Honey.” Ted’s friends used the nickname whenever they retold the story of meeting her.

Perry, already a megastar thanks to hits like Firework and Teenage Dream, leaned into the goofy role perfectly. Her wide-eyed innocence became one of the show’s funniest running gags, making her cameo one of the most talked-about guest spots.

1. Britney Spears

Topping the list is none other than Britney Spears, whose cameo was nothing short of legendary. She played Abby, the receptionist at Stella’s clinic, in Season 3, Episode 13, Ten Sessions. Ted tried to impress Stella by being overly nice to Abby, only for Abby to misread his kindness as romantic interest.

Britney brought her quirky comedic timing to the role, surprising fans who never expected to see the “Princess of Pop” in a sitcom setting. Known for era-defining hits like Toxic, Oops!… I Did It Again, and Gimme More, Spears’ appearance boosted the show’s popularity and gave fans a cameo that’s still remembered as one of HIMYM’s biggest cultural moments.

These are some of the most notable cameos in How I Met Your Mother. Which one’s your favorite? Or did we miss an important one? Share your pick in the comments below!

How I Met Your Mother is available to stream on Hulu in the U.S.