St. Patrick's Day Top Hat Cake

Category: Impressive Recipes for Celebrations and Gatherings

This St. Patrick's Day cake boasts vibrant rainbow layers shaped to resemble a top hat, complete with a hidden marshmallow center for a delightful surprise. Thin and thick layers come together, each baked in 6" or 8" pans, then carefully cut and assembled with smooth buttercream frosting. The outer coat is tinted green, with black and yellow accents creating a hatband and buckle. Leftover cake scraps transform into tasty cake balls, making the most of every bite. This showstopping centerpiece blends classic baking steps with colorful presentation for festive celebrations.

A woman wearing a chef's hat and apron.
Created By Sarah
Last updated on Tue, 28 Oct 2025 23:32:13 GMT
A St. Patrick's Day cake with a green hat and a leprechaun on top. Save
A St. Patrick's Day cake with a green hat and a leprechaun on top. | sarahmeal.com

Celebrate St. Patrick’s Day with this show-stopping top hat-shaped rainbow cake filled with a surprise center of Lucky Charm marshmallows. It’s a festive treat that combines vibrant colors and a fun twist inside, perfect for impressing friends and family. While it takes some time to prepare, the layering and decorating process is straightforward and rewarding. The cake layers include a special thinner rim to mimic the brim of a hat, and the leftover cake scraps turn into delightful cake balls that make for a perfect side snack.

I first made this cake last year when hosting a family party and was amazed at how everyone loved both the look and the flavors. It quickly became a highlight that everyone asks for again.

Ingredients

  • Cooking spray: easy pan release
  • All-purpose flour: structure
  • Baking powder: ensure a light and airy texture
  • Kosher salt: balance sweetness
  • Granulated sugar: sweetness and tender crumb
  • Unsalted butter: richness and moisture
  • Vegetable oil: keep the cake moist
  • Large eggs: binding and lifting the batter
  • Pure vanilla extract: depth to the flavor
  • Whole milk: moisture and tenderness
  • Sour cream: a moist texture and slight tang
  • Food coloring: red, orange, yellow, green, blue, and purple for the rainbow effect
  • Powdered sugar: smooth frosting
  • Unsalted butter: for creamy frosting
  • Heavy cream: achieve the perfect frosting consistency
  • Pure vanilla extract: flavor in the frosting
  • Kosher salt: the sweetness of the frosting
  • Lucky Charm marshmallows: the surprise inside
  • Green, black, and yellow food coloring: decorating the hat embellishments

Step-by-Step Instructions

Preheat the Oven:
Preheat your oven to 350 degrees Fahrenheit. Prepare one 8-inch cake pan and five 6-inch cake pans by lining them with parchment paper and coating with cooking spray. In a large bowl, whisk together flour, baking powder, and salt. This is your dry ingredient base.
Mix the Batter:
Using a handheld mixer on medium high, cream the granulated sugar and butter until combined. Add vegetable oil and beat until the mixture is smooth and creamy. Incorporate the eggs one at a time, beating well after each addition, then add vanilla extract.
Combine Wet and Dry Ingredients:
Add about one third of the dry ingredients to the wet mixture and beat on medium low just until a few dry streaks remain. Pour in the milk and beat until combined. Add another one third of the dry ingredients and beat on medium low again until just streaks remain. Stir in the sour cream until incorporated. Fold in the remaining dry ingredients until just combined to keep the batter light.
Color the Batter:
Divide the batter evenly into six bowls. Dye one bowl of batter each red, orange, yellow, green, blue, and purple to create layers of the rainbow.
Bake the Cake Layers:
Pour the purple batter into the 8-inch pan to create the hat’s brim, which should be thinner than the other layers. Bake for 15 to 18 minutes, or until a toothpick inserted comes out clean. Let cool.
Bake Rainbow Layers:
Pour each of the remaining colors into the prepared 6-inch pans. Bake these for 30 to 35 minutes until a toothpick inserted comes out clean. Allow them to cool completely.
Make the Frosting:
In a large bowl using a handheld mixer on medium speed, beat powdered sugar and butter until smooth. Add the heavy cream, vanilla, and salt, and beat until fully combined and fluffy.
Trim and Cut Centers Out of Cakes:
Once cooled, trim the tops of cakes if needed to level them. Using a 3-inch round cookie cutter, carefully cut out the centers of orange, yellow, green, and blue layers. Save the centers for cake balls.
Assemble the Cake:
Place the purple layer on your cake stand or plate as the brim of the hat. Spread a thin layer of buttercream on top. Add the blue layer, then frost and repeat with green, yellow, and orange layers in that order, frosting the top of the orange layer. Fill the hollowed center with Lucky Charm marshmallows. Add the red layer on top.
Crumb Coat and Chill:
Frost the top and outside of the entire cake with a thin crumb coat of buttercream. Refrigerate for at least 30 minutes to firm up the frosting.
Decorate the Hat:
Dye about one and a half cups of buttercream green. Using an offset spatula and a bench scraper, cover the cake smoothing the green frosting all over the cake. Divide remaining frosting into one cup and a half cup. Dye one portion black and the other yellow.
Create the Hat Band and Buckle:
With the black frosting, frost a one-inch thick band across the base of the hat above the brim, using parchment paper to keep lines neat. Pipe a yellow buckle onto the black band using a piping bag fitted with a medium round tip.
A St. Patrick's Day cake with green frosting and a gold leaf. Save
A St. Patrick's Day cake with green frosting and a gold leaf. | sarahmeal.com

My favorite part of this recipe is the marshmallow surprise inside. When my kids discover it, their faces light up with pure joy. It really turns a festive cake into a magical experience.

Storage Tips

Store this cake covered in the refrigerator to keep it fresh and the marshmallows from melting too much. Leftover cake balls can be stored in an airtight container at room temperature or refrigerated. The cake layers freeze well individually if wrapped tightly in plastic wrap and foil, making advance prep possible.

Ingredient Substitutions

You can replace vegetable oil with melted coconut oil for a slightly different flavor and a dairy-free twist if you substitute the butter with a plant-based alternative. For the milk, use your preferred non-dairy milk but it may slightly alter texture. Sour cream can be replaced with plain Greek yogurt for similar moisture and tang.

Serving Suggestions

Serve this cake at your St. Patrick’s Day party alongside traditional dishes like corned beef and cabbage or Irish soda bread for a full festive meal. A cup of strong black tea or coffee pairs beautifully with the buttery sweet cake layers. The cake balls make an excellent fun finger food appetizer before the main dessert.

Cultural Context

This cake brings together Irish festive spirit with a modern American twist. The top hat symbolizes the iconic image of St. Patrick’s Day festivities, and the rainbow layers connect to the popular Irish myth of leprechauns' pot of gold at the end of the rainbow. Using Lucky Charms marshmallows adds a playful cultural nod to Irish-themed treats most associate with the holiday in the US.

Pro Tips

  • Make sure to thoroughly cool each cake layer before cutting or frosting to avoid tears and melting
  • I learned the hard way never to skip the crumb coat it makes the final frosting look smooth and professional
  • Use parchment paper as a guide when frosting the black hat band for clean, sharp edges

Common Recipe Questions

→ What pans are used to bake the layers?

An 8-inch pan is used for the base rim layer, while 6-inch pans bake the other layers that form the hat's top.

→ How are the rainbow colors achieved?

The batter is divided and dyed with red, orange, yellow, green, blue, and purple food coloring before baking each colored layer separately.

→ How is the marshmallow center created?

After layering and frosting, Lucky Charm marshmallows are poured into the hollowed centers of four layers, creating a surprising sweet core.

→ What frosting techniques are used for decoration?

Buttercream is dyed green for the crumb coat, then black and yellow tinted buttercream form a belt and buckle detail on the hat base.

→ Can leftovers be made from cake scraps?

Yes, cut-out centers are saved and combined with leftover frosting to form cake balls served alongside the finished cake.

St. Patrick's Day Top Hat Cake

A vibrant layered cake shaped like a top hat, filled with marshmallows and decorated in festive green hues.

Preparation Time
90 minutes
Cook Time
45 minutes
Total Duration
135 minutes
Created By: Sarah

Recipe Category: Special Occasions

Level of Difficulty: Moderate

Cuisine Style: Irish-American

Servings Yield: 12 Portion Size (One multi-layer 20 cm hat-shaped cake)

Diet Preferences: Vegetarian-Friendly

What You'll Need

→ Cake

Ingredient 01 Cooking spray
Ingredient 02 660 g all-purpose flour
Ingredient 03 1 tbsp baking powder
Ingredient 04 1 tsp kosher salt
Ingredient 05 600 g granulated sugar
Ingredient 06 225 g unsalted butter, softened
Ingredient 07 240 ml vegetable oil
Ingredient 08 6 large eggs
Ingredient 09 1 tbsp pure vanilla extract
Ingredient 10 240 ml whole milk
Ingredient 11 240 ml sour cream
Ingredient 12 Red, orange, yellow, green, blue, and purple food coloring

→ Frosting & Assembly

Ingredient 13 920 g powdered sugar
Ingredient 14 565 g unsalted butter, softened
Ingredient 15 80 ml heavy cream
Ingredient 16 2 tsp pure vanilla extract
Ingredient 17 1/4 tsp kosher salt
Ingredient 18 1 1/2 cups Lucky Charm marshmallows
Ingredient 19 Green, black, and yellow food coloring

How to Make It

Instruction 01

Preheat oven to 175°C. Line one 20 cm cake pan and five 15 cm cake pans with parchment paper and grease with cooking spray. In a large bowl, whisk together all-purpose flour, baking powder, and kosher salt.

Instruction 02

In a separate large bowl, beat granulated sugar and softened butter on medium-high speed until combined. Add vegetable oil and continue beating until smooth and creamy. Add eggs one at a time, beating well after each. Stir in vanilla extract.

Instruction 03

Add one-third of dry ingredients to wet mixture, mixing on medium-low speed until a few dry streaks remain. Add milk and beat until incorporated. Repeat with another one-third of dry ingredients, then add sour cream and mix. Finally, add remaining dry ingredients and beat until just combined.

Instruction 04

Divide batter equally into six bowls. Tint each portion with red, orange, yellow, green, blue, and purple food coloring respectively.

Instruction 05

Pour purple batter into prepared 20 cm pan and bake for 15 to 18 minutes, or until a toothpick inserted in the center comes out clean. Allow to cool completely.

Instruction 06

Distribute remaining batters into prepared 15 cm pans and bake for 30 to 35 minutes, or until a toothpick comes out clean. Let cool thoroughly.

Instruction 07

Using a handheld mixer on medium speed, beat powdered sugar and butter until smooth. Add heavy cream, vanilla extract, and kosher salt, then beat until fully combined.

Instruction 08

Level tops of cooled cakes if necessary. Using a 7.5 cm round cutter, remove centers from orange, yellow, green, and blue layers to create hollow rings.

Instruction 09

Place purple layer on serving platter and frost with a thin coat of buttercream. Stack blue, green, yellow, and orange layers in order, frosting between each. Fill central cavity with marshmallows. Top with red layer and apply a crumb coat over entire cake. Refrigerate for 30 minutes to 2 hours until firm.

Instruction 10

Tint approximately 1 1/2 cups of reserved buttercream green. Spread smooth green buttercream over cake surface using an offset spatula and bench scraper.

Instruction 11

Divide remaining buttercream into two portions: one cup dyed black and half cup dyed yellow for decoration.

Instruction 12

Using black buttercream, pipe a 2.5 cm thick belt around the base of the cake above the rim. Shield lower cake portion with parchment paper for clean edges.

Instruction 13

With a piping bag fitted with a medium round tip, pipe yellow buttercream buckle centered on the black belt to complete hat embellishment.

Additional Tips

  1. Cake layers can be prepared up to one day in advance and stored tightly wrapped in refrigerator or frozen for up to two weeks.
  2. Use cake scraps with extra frosting to form cake balls for serving alongside.

Essential Tools

  • 20 cm and 15 cm round cake pans
  • Parchment paper
  • Handheld mixer
  • Offset spatula
  • Bench scraper
  • 3 inch (7.5 cm) round cookie cutter
  • Piping bag with medium round tip

Allergy Details

Always review ingredient labels for allergens, and consult a professional if you're unsure.
  • Contains eggs, dairy, and gluten

Nutritional Breakdown (per serving)

These nutritional details are for informational purposes and shouldn't replace medical advice.
  • Calories: 520.5
  • Fat Content: 22.4 grams
  • Carbohydrate Content: 75.2 grams
  • Protein Content: 6.1 grams