NBC's The Office is often called the greatest workplace comedy of all time and is in fact one of the highest-rated and most popular TV shows in the world. Despite ending quite a while ago, the show still remains as beloved and well-watched as ever and has in fact been the most-streamed show of 2020, beating the likes of Ozark and The Mandalorian.

RELATED: The Office UK Vs. US: 15 Biggest Differences

As fans know, a large part of the humor of The Office is the various pranks Jim pulls on his coworkers (more often than not, on Dwight). While his pranks are usually hilarious, sometimes they come off as pretty mean, and not all of his pranks have been successful. Here are 5 of Jim's pranks on his coworkers that worked, and 5 times they backfired on him.

Worked: Set Up Andy with Pam

After Jim returns from Stamford, he decides to play a little prank on Pam to clear some of the tension between them. When Andy asks Jim for advice on how to ask out Pam, he tells him to talk about her "interests," including speaking in Pig Latin, hunting, and Frisbee-based competitions. Unbeknownst to Andy, these were all things Pam hated.

When Andy gets a moment, he decides to strike up a conversation with Pam, talking to Pam in pig Latin to playing The Rainbow Connection on his banjo while singing in a falsetto voice. Pam is speechless and just says "Wow. That was just...wow." before sharing a grin with Jim. This was one of their most light-hearted ones.

Backfired: The Tuxedo

jims tuxedo with charles miner - the office

After Dwight sends out a memo about proper attire in the workplace, Jim decides to go the extra mile and wears a tuxedo to work. While helping Michael plan his leaving party, he tries to make everything classy, much to Dwight's frustration.

Unfortunately for him, however, the new boss and Michael's replacement, Charles Miner (played by Idris Elba), shows up that very same day. Jim spends the whole day trying to convince him he can be an active worker and that this is a one-off. However, this just ends up making Charles dislike him even more.

Worked: Convinced Dwight It Was A Friday

the office

In the season 2 episode, "Performance Review," Dwight is mistaken about what day it was, thinking it was a Friday when it was Thursday. However, Jim, armed with this knowledge, gets to work, trying to convince Dwight it was a Friday.

RELATED: The Office: The 10 Best Plotlines, Ranked

When Friday actually rolls around, Dwight is seen running to the office building, half-dressed and half-shaved. He didn't realize he needed to be at work.

Backfired: Put Andy's Calculator in Jell-O

After Jim moves to Stamford, he decides to play a prank on his new coworker, Andy. In a hilarious callback to his prank in the pilot episode, he puts Andy's calculator in Jell-o. However, whereas Dwight has been accepting and tolerating Jim's pranks with inaction (for the most part) Andy does not take it as well.

He initially laughs loudly and calmly asks who did it, while Jim just smiles proudly at the camera. However, Andy soon starts freaking out, kicking trashcans and screaming for the perpetrator, and a terrified Jim just begs the camera to not reveal it was his doing.

Worked: Jammed Dwight's Desk

Todd Packer in The Office

In the season 7 episode, "Todd Packer," Packer has been promoted to a full-time sales position in the Scranton branch, much to the others' dismay. Dwight and Jim try to come up with pranks to annoy him, and Jim suggests jamming his desk drawer so that it only comes out 2 inches, so he can see everything but he can't pick anything up.

Dwight makes fun of him for suggesting it and sarcastically tells him to write his 100 best pranks on a piece of paper and hand it to him, and Jim gives him a list of 400 gibberish phrases. He also jams Dwight's desk like he wanted to do with Packer, which frustrates and annoys him, thus proving his prank works after all.

Backfired: The Work Bus

In "Work Bus," Dwight refuses to fulfill his responsibilities as a landlord to fix the wiring in the building, as it would be too expensive and he would have to give everyone one week off. Jim wants to make Pam happy as he didn't tell her about his new job, so he concocts a plan to convince Dwight that the faulty wiring is dangerous.

RELATED: The Office: 10 Scenes That Make Viewers Nervous When Rewatching

Jim pops a few kernels of popcorn and tells Dwight that magnetic power from the substandard wiring may have popped it, and it affects fertility. Dwight quickly shuts down the office, but instead of giving them a week off, he hires a work bus, which is soon overcrowded. Jim's prank to make Pam happy backfires.

Worked: Asian Jim

asian jim the office

When an Asian man walks into the office, claiming himself to be Jim, Dwight is seen to get confused. He is certain that this man isn't his co-worker and continuously questions who he is. However, he freaks out when "Jim" is able to access the voicemail passwords on the phones and starts to question reality when Pam kisses him and he sees a picture of their kids.

Turns out, this "Jim" is actually Steve, an actor friend of Pam and Jim. Played by the hilarious Randall Park, "Asian Jim" is one of the most mind-boggling pranks Jim has ever played on Dwight (which includes the elaborate prank where he tried to convince Dwight he was living in the Matrix).

Backfired: "You've Been Meatballed!"

Dwight and Stanley holding meatballs

When Pam takes maternity leave, Jim turns to Stanley to be his audience for his various pranks on Dwight. However, he discovers Stanley is only amused by pranks involving meatballs, weirdly enough. Jim puts Dwight's stapler in a huge meatball and fills his drawers to the brim, which Stanley loudly laughs at.

Cut to the end of the workday, and fans discover that the actual masterminds are Stanley and Dwight, who have been goading Jim into using meatballs for his prank and then taking home. Jim never finds this out, but this prank certainly backfired on him, albeit unknowingly.

Worked: The Quad-Desk

After Jim returns from paternity leave, he discovers that Dwight has turned his desk, along with 2 others, into a workstation called Mega Desk. Dwight has found a use for each desk - gaming, surveillance, and business. Jim promptly takes his desk back, but Dwight has gotten hooked onto Mega Desk and begs Jim to let him use it for a while longer, which he refuses.

RELATED: The Office: Jim's 10 Shadiest Burns, Ranked

Later, Jim stacks the desks together to show Dwight a creation of his own - Quad Desk (which Dwight points out has only 3 desks). However, Jim shows him the fourth desk - a tiny, miniature desk for Dwight, complete with a tiny chair and a ringing phone. Dwight simply accepts his fate and answers the phone.

Backfired: Trying to Trick Dwight into Using His Credit Card

After getting fed up with Jim and Dwight's constant pranking and bickering, he says that the next person to prank the other will lose their Christmas bonus. So obviously, the two get to work trying to goad the other into pranking them. Dwight makes it seem like Jim put a porcupine on his desk, but fails.

Jim tries to get Dwight to order something by loudly saying his credit card information, but Dwight is one step ahead. He uses Jim's credit card information... to order an expensive bouquet of flowers for Pam. This was one of the rare times Jim got owned by Dwight, and it was sure hilarious.

NEXT: The Office UK Vs. US: 15 Biggest Differences