The Star Trek universe contains a wealth of episodes over its half-century of history. The crews of that universe's starships and space stations have seen and done almost everything. And that includes delving into their humorous sides.

RELATED: Star Trek: Lower Decks: 10 Things You Need To Know Before Watching The Parody

The Star Trek universe has made us laugh from time to time. Though producers and writers needed to adhere to certain standards developed over the decades, they came up with several humorous moments. As proof, here's a ranked list of the 10 funniest episodes across all Star Trek programs.

TNG: Menage a Troi

captured Trois in Menage a Troi

When you have both Laxwana Troi and the Ferengi involved in an episode it's bound to be funny. Such is the case with the season three TNG episode Menage a Troi. And a good thing it was humorous, because Picard was kidnapped by the Borg two episodes later.

While on vacation, Laxwana Troi is captured by the Ferengi. It takes a boisterous proclamation of love by Captain Picard to have her returned to the Enterprise. Not only was the episode a giggle-fest but it also marked Wesley Crusher's field promotion to Ensign.

Voyager: Q2

Q had a different relationship with Voyager's Captain Janeway than he did with Picard. For the latter, Q was similar to his conscience. On the other hand, he had a fondness for Janeway.

So much so that Q asked her to watch his powered-down son while he took care of some things across the galaxy. Of course, hilarity and disaster followed. Nevertheless, the story had a happy ending for all involved.

TOS: I, Mudd

Star Trek - I, Mudd

Though Rainn Wilson does a fine job in his portrayal of Harcourt Fenton Mudd, actor Roger Carmel is the role model. While he only appeared in two original series episodes, Mudd established himself as Kirk's roguish nemesis.

RELATED: Which Star Trek Original Series Character Are You Based On Your Zodiac?

Of the two episodes, "I, Mudd" is more humorous than season one's "Mudd's Women." It's the back and forth between Harcourt and Kirk that make it memorable. Despite what his critics say, William Shatner has comedic chops.

DS9: Badda-Bing, Badda-Bang

This season seven episode of Deep Space Nine was the last one before the show began to close out the Dominion War. Not only is it funny, but it has shades of the original Ocean's Eleven built-in. Although, we're not sure if Chief O'Brien would have been strip-searched in the 1960s.

"Badda-Bing, Badda-Bang" takes place mostly in the holosuite program for Vic Fontaine's Las Vegas lounge. When a jack-in-a-box subroutine changes the program, it's up to Vic and the DS9 crew to take it back from members of a Philly mob. There are plenty of chuckles to be had, especially when the scheme goes down.

TNG: Qpid

Captain Picard Qpid Star Trek

From this fourth season episode of The Next Generation comes one of Worf's most famous quotes. Transported to Sherwood Forest by Q and adorned in the costume of Will Scarlett, one of Robin Hood's Merry Men,  Worf exclaims, "I am not a merry man."

"Qpid" has one of the series lightest touches, to the point it feels like an old Errol Flynn film. While Picard plays Robin Hood, the rest of his Merry Men try to get used to their temporary roles. One of the funniest parts is during the fight between Robin's friends and Nottingham's guards. Both Doctor Crusher and Counselor Troi knock two of the bad guys out by bashing large vases over their heads.

Voyager: Bride of Chaotica!

Many humorous episodes of TNG, DS9, and Voyager took place on the holodeck/suite. The last show mention featured one of the best uses of the technology thanks to Tom Paris. Lover of ancient pop culture, He and Harry Kim put together a program that simulated space opera shorts like Flash Gordon. 

RELATED: Star Trek: 10 Best Holodeck Characters

In this case, it was the Adventures of Captain Proton. Featuring scenes in black-and-white, Proton (Paris) and Harry try to defeat villains who are photonic beings interested in first contact. There are numerous references to the old movie serials and how they handled science fiction at the time.

DS9: Our Man Bashir

Bahir and Data in Star Trek

Here's another instance where a holodeck program features an entertaining story. This time, the focus is on Doctor Bashir and Garak as they work their way through a 60s spy setup. However, there's a complication.

Seems the transporter patterns of the DS9's admin staff are caught in the program. As a result, they take on forms of some of the characters. Not only is the dynamic between Bashir and Garak a joy to watch but also how the rest of the cast plays their new roles.

TOS: A Piece of the Action

Kirk in A Piece of the Action - Star Trek

The second season of the original Star Trek contained the three humorous episodes listed here. As a result, characters other than Kirk were given a chance to display their comedic chops. In "A Piece of the Action," both Kirk and Spock get to display their talents and New York accents.

A visit to the home planet of the Iotians reveals they have adopted the ways of 1920s mobs. Everyone carries a gun and tries to wipe each other out. Kirk needs to get the mob families all together to change their status quo. Besides their accents, the funniest part of the episode is when Kirk tries to drive an old stick-shift automobile.

DS9: Trials and Tribble-ations

Dax in Star Trek: Deep Space 9

The two funniest Star Trek episodes are based on those furry creatures that like to mate. The fact the DS9 episode incorporated the crew into the original "Trouble with Tribbles" made it even better.

RELATED: Star Trek: 10 Most Hilarious DS9 Memes

As part of Star Trek's 30th anniversary, the episode has the Defiant travel back in time to Kirk's era. Here, the crew needs to infiltrate the first Enterprise and Space Station K7 to ensure the good captain doesn't die from an explosive tribble planet by a Klingon operative. The episode must be watched several times to catch all the humorous moments.

TOS: The Trouble With Tribbles

There are many chuckle-worthy moments in this episode. For example, the bar fight and Scotty's reason why it started. Tribbles in Kirk's chicken salad is another. Of course, the most memorable moment is when Kirk is showered with engorged tribbles.

There are so many episodes of the original Star Trek that shine. However, "Trouble With Tribbles" is remembered the most because it gave viewers a sense of joy these actors had with each other and the environment.

NEXT: Star Trek: 10 Cities That Will Still Exist For Centuries