Gotham is full of characters out to get a big payday - or to at least survive the night. When the FOX series reimagined the origins of Batman for the small screen, it made Gotham one of the most dangerous cities in the fictional DC world. While its events unfolded, Gotham didn’t yet have a costumed vigilante to protect it either. Despite that, it still had a lot of brave souls willing to stand up for its people.

If those brave souls had been admitted to Hogwarts School Of Witchcraft and Wizardry in the Harry Potter universe, they would have landed in some very interesting places. Some villains would be Gryffindors and some heroes would be Slytherins.

A recap for those who need the Hogwarts house refresher: Gryffindors are motivated by morality and bravery. Slytherins are cunning, but with an ambitious nature. Hufflepuffs are motivated by loyalty and are usually the hardest working characters. Ravenclaws have curious minds and a thirst for knowledge.

We’ve taken a look at where 10 of Gotham’s heroes (some unlikely ones at that) fit in at Hogwarts.

Barbara Kean: Gryffindor

Gryffindor might seem like a surprising choice for one of the longest running villains on Gotham. Barbara Kean wasn’t always a villain, however. In fact, she had a pretty strict code about what bad things she would and wouldn’t do.

Despite the trauma (and murder) that came with it, Barbara stepping out of her safe Stepford wife role was actually a very brave thing to do early on the show. She became a completely different person when she embraced her dark side and gave up her addictions. Barbara was still always willing to help a woman in need. She gave both Selina and Ivy a place in her apartment, and later, her club when they were struggling on the street. When push came to shove, Barbara wasn’t willing to let other villains destroy the city she loved or the people that lived in it.

Oswald Cobblepot: Slytherin

Is there anyone in Gotham who is a bigger Slytherin than the Penguin? Oswald climbed his way through the ranks of the Gotham criminal element with surprising efficiency. He began season one as the man who held Fish Mooney’s umbrella for her, and by the end of the series, he was one of the most well known criminal leaders.

Perhaps that’s because Oswald was a pragmatist. He would quite literally change alliances at the drop of a hat. If he saw a situation that could benefit him more than the one he was in, he didn’t agonize over loyalty or worry about the consequences. 

Edward Nygma: Ravenclaw

This sorting is a bit of a no-brainer. With a love for riddles and trivia, Edward Nygma absorbs knowledge like a sponge. He never tired of what others might deem useless information. The Riddler is definitely a Ravenclaw.

Nygma didn’t simply study up and let all his knowledge go to waste. Instead, he used it, initially, to help in police investigations. When his genius went unappreciated for too long, and after his other personality broke through, that knowledge began to find other avenues of use. He penned riddles and created scavenger hunts for his crimes. Nygma even built a functioning submarine in season five.

Ivy Pepper: Hufflepuff

Ivy is a bit of a difficult Gotham resident to sort. She began her time on the show as a lost little girl who only trusted Selina Kyle. Ivy lost her family and ended up on the streets, but through some series sci-fi, she endured not one, but two transformations that aged her up and drastically changed her.

With Ivy’s final transformation came the belief that she slowly formed over the years: humanity couldn’t be trusted. She loved plants, and believed they were better than any person. That kind of belief shows an intense loyalty, though in an unusual way. For that, and for her considerable effort to raise a whole new kind of flora in the middle of Gotham, the sorting hat places her in Hufflepuff.

Alfred Pennyworth: Gryffindor

A former military man who became a butler, Alfred is very much a caregiver type. The sorting hat would be tempted to place him in Hufflepuff, but his pragmatic approach to conflicts does make his loyalties flexible. Instead, Alfred lands in Gryffindor.

Much like his charge Bruce Wayne, Alfred spent a lot of the series willing to do just about anything to save the day. He frequently wound up in sticky situations, but he never backed down. He imbued that sense of bravery in Bruce as well, though Bruce was even more morally flexible than Alfred in some situations.

Leslie Thompkins: Ravenclaw

One of the only people in the series who could keep up with the Riddler’s word play is Leslie “Lee” Thompkins. That alone is enough to get her sorted in Ravenclaw.

Lee began her time on the series as a psychologist. Her medical prowess allowed her to become the Gotham coroner as well. She even switched things up and opened a clinic in one of Gotham’s worst neighborhoods where she accidentally became its crime boss. If she had done it all on purpose, we might have thought her a Slytherin instead.

Harvey Bullock: Hufflepuff

Hufflepuff might seem like a strange fit for Harvey. After all, he wasn’t exactly a squeaky clean member of the force when Gotham introduced him. He also frequently took the easy way out of solving cases. That all changed thanks to Jim Gordon, and the audience got to see the real Harvey.

The Hufflepuff had a deep love for Gotham. His inaction early in the series was a result of him believing Gotham couldn’t be changed. A partnership with Jim Gordon opened his eyes and he became one of the hardest working detectives on the force. Not to mention, Harvey acted as the one person who could quickly get everyone in the room on the same page. 

Jim Gordon: Gryffindor

If there’s anyone who strived to be Gotham’s moral center, showed bravery at every turn, and constantly placed himself at the center of everything, it’s Jim Gordon. There’s no doubt he’s a Gryffindor.

Yes, he showed a great aptitude for detective work, a loyalty to the people of the city, and even some particularly cunning plans. All of that stemmed from his need for the good in Gotham to outweigh the bad. He never washed his hands of a former ally - not even Barbara or Oswald - preferring to believe that everyone could eventually choose to do the right thing.

Selina Kyle: Slytherin

Selina often protested that she’s no good guy. She’s not exactly right. Yes, she’s definitely a Slytherin, but that doesn’t mean she didn’t spend a large part of the show as one of Gotham’s heroes.

Selina grew up on the mean streets of Gotham when her mother abandoned her. She learned to pick pockets and scale buildings in order to survive. Those skills came in handy when she became friends with Bruce Wayne. Despite that friendship, and a sense of loyalty to Bruce, Selina knew when to cut ties with him and strike out on her own. That didn’t stop her from repeatedly helping other women with Barbara, or saving the lives of other kids living on the street. 

Bruce Wayne: Slytherin

Plenty of fans might expect Gotham’s Dark Knight to end up in Gryffindor. That is usually the fitting house for those with heroic sensibilities. For all his heroic posturing, however, Bruce is a lot more like Selina than he would care to admit. He’s a good fit for Slytherin as well.

The future Batman spent a lot of his formative years hiding parts of himself from everyone around him. He trained in secret with Alfred, and then with Selina. Bruce wore a mask to save the day. He also knew how to trick people into getting what he wanted. That cunning nature is certainly a Slytherin trait. There’s also the fact that his pragmatic nature meant that he could ally with Oswald in one episode and put him in jail in the next. As for his ambition - unlike Selina, he didn’t need to get rich, but he wanted to protect Gotham from any and all threats.