Go Back
three sorting hat cupcakes with bites taken out, one with green filling, one with gold and one with red with a candle and potion bottles in the background

Harry Potter Sorting Hat Cupcakes

These are the best Harry Potter sorting hat cupcakes! They're moist chocolate cupcakes filled with the Hogwarts house colors and topped with mini sorting hats!
5 from 14 votes
Prep Time 2 hours 30 minutes
Cook Time 18 minutes
Course Dessert
Cuisine American
Servings 12 cupcakes

Ingredients
 

For the Chocolate Cupcakes

  • 1 cup (125 g) all-purpose flour, spooned and leveled
  • 5 tablespoon (25 g) Dutch process cocoa powder
  • ½ teaspoon baking powder
  • ½ teaspoon baking soda
  • ¼ teaspoon salt
  • 1 teaspoon espresso powder (optional)
  • ¼ cup (56 g) unsalted butter, softened
  • ¾ cup (150 g) granulated white sugar
  • 1 egg, at room temperature
  • 1 egg yolk, at room temperature
  • 1 teaspoon vanilla
  • ¼ cup (60 g) sour cream, at room temperature
  • ½ cup (120 ml) whole milk, at room temperature

For the Sorting Hats

  • ½ cup (112 g) unsalted butter, softened
  • pinch of salt
  • ¼ cup (20 g) Dutch process cocoa powder
  • 1 cup (130 g) powdered sugar
  • 2 tablespoon (30 ml) heavy cream
  • 6 Oreos, with filling removed
  • 6 oz dark chocolate bars, chopped
  • 1 teaspoon coconut oil

For the Cream Cheese Frosting

  • 1 cup (224 g) unsalted butter, softened
  • 8 oz (226 g) cream cheese, cold
  • 3 cups (390 g) powdered sugar
  • blue, green, gold and red gel food coloring
  • sprinkles for decorating

Instructions
 

For the Chocolate Cupcakes

  • Preheat the oven to 350 degrees and line a cupcake pan with 12 cupcake liners.
  • In a small bowl whisk together the flour, cocoa powder, baking powder, baking soda, salt and espresso powder. Then set aside.
    1 cup (125 g) all-purpose flour, spooned and leveled, 5 tablespoon (25 g) Dutch process cocoa powder, ½ teaspoon baking powder, ½ teaspoon baking soda, ¼ teaspoon salt, 1 teaspoon espresso powder (optional)
  • Cream the butter and sugar together in a large bowl with an electric mixer on high speed until fluffy, about 2-3 minutes. (If using a stand mixer, use a paddle attachment.)
    ¼ cup (56 g) unsalted butter, softened, ¾ cup (150 g) granulated white sugar
  • Then add in egg, egg yolk and vanilla and mix on medium-high speed until pale in color and smooth, about 1 minute.
    1 egg, at room temperature, 1 egg yolk, at room temperature, 1 teaspoon vanilla
  • Next mix in the milk and sour cream on low speed until combined. The mixture will look curdled but don't worry, it will pull together once the dry ingredients are added in.
    ¼ cup (60 g) sour cream, at room temperature, ½ cup (120 ml) whole milk, at room temperature
  • Add the dry ingredients to the wet ingredients and combine on low speed. Scrape the sides and bottom of the bowl as necessary with a rubber spatula.
  • Divide the batter evenly among the 12 liners, each should be about three-quarters full. Bake the cupcakes for 17-19 minutes.
    Let the cupcakes cool in the pan for 10 minutes, then transfer to a wire rack to cool completely. 

For the Sorting Hats

  • While the cupcakes are baking and cooling make the sorting hats. Make the frosting by adding softened, unsalted butter and salt to a medium sized bowl. Mix the butter with an electric mixer until it is pale in color and fluffy, about 5 minutes. (If using a stand mixer, use a whisk attachment.) Then sift in the cocoa powder. Mix until combined. Then sift in the powdered sugar a little at a time until it is all combined. The frosting will be thick at this point. Add in the heavy cream and mix until the frosting is light and fluffy, about 1-2 minutes. Transfer the frosting to a piping bag fit with a medium circular tip like Wilton 2A.
    ½ cup (112 g) unsalted butter, softened, pinch of salt, ¼ cup (20 g) Dutch process cocoa powder, 1 cup (130 g) powdered sugar, 2 tablespoon (30 ml) heavy cream
  • Remove the filling from 6 Oreos. Pipe the icing into the center of each Oreo to resemble the sorting hat. Move your piping hand in a very small circle to build up the frosting. (I recommend practicing on a plate until you get the hang of it.) Once all the hats have been made, pop them in the freezer until they are frozen solid.
    6 Oreos, with filling removed
  • Once the hats are frozen, melt the chocolate and coconut oil together. Let the chocolate cool slightly until warm and liquid, but not super hot. Put the frozen hats on a wire rack on top of parchment paper. Spoon the chocolate over the hats until completely covered. While the chocolate is still liquid on the hats, carefully move each hat at the base just a little bit so they're not sitting in a huge pool of chocolate on the wire rack. This will make it easier to remove them from the wire rack later. Let the hats sit until the chocolate is completely set. You can pop them in the fridge to speed this up.
    6 oz dark chocolate bars, chopped, 1 teaspoon coconut oil

For the Cream Cheese Frosting

  • Add the butter to a large bowl and whip on high speed until pale in color and fluffy, about 5 minutes. Then mix in the cold cream cheese. Add the powdered sugar in a little at a time until all is combined. Whip the frosting on high speed until light and fluffy.
    1 cup (224 g) unsalted butter, softened, 8 oz (226 g) cream cheese, cold, 3 cups (390 g) powdered sugar

Assembling the Cupcakes

  • Transfer about ½ cup (90 g) of frosting to four different bowls. Dye one bowl red, one gold, one blue and one green. (If you add in a little Dutch cocoa powder it really helps to deepen the colors.) Transfer each colored frosting to a piping bag and cut off a bit of the tip.
    blue, green, gold and red gel food coloring
  • Remove the center of each cupcake using a cupcake corer. Fill 3 cupcakes with red frosting, 3 with gold, 3 with blue and 3 with green.
  • Rewhip if necessary, then transfer the remaining cream cheese frosting to a piping bag fit with a decorative tip. Pipe frosting on top of the cupcakes and sprinkle with sprinkles if you wish.
    sprinkles for decorating
  • Once set, place a sorting hat on top of each cupcake, then serve! Bite into one to reveal the hidden house colour and to be sorted!
Keyword chocolate cupcakes, cream cheese frosting, harry potter, harry potter cupcakes, harry potter sorting hat cupcakes
Tried this recipe?Let us know how it was!