Zimt

DIY Unicorn Cake: Magical Layered Birthday Treat

· 7 min read · Cakes

In this article
  1. Ingredients
  2. Instructions
  3. Tips
  4. Serving Suggestions
  5. Variations
  6. Storage and Reheating
  7. Frequently Asked Questions

A DIY unicorn cake brings a burst of color and whimsy to any celebration. With rainbow‑streaked layers, pastel buttercream, and edible glitter, this cake looks as enchanting as it tastes, and the step‑by‑step method keeps the process manageable even for bakers who are new to multicolored desserts.

Ingredients

  • 2 9‑inch round cake pans
  • 2 ½ cups (310 g) all‑purpose flour
  • 2 ½ teaspoons baking powder
  • ½ teaspoon baking soda
  • ¼ teaspoon salt
  • 1 ½ cups (300 g) granulated sugar
  • ½ cup (115 g) unsalted butter, softened (for the batter)
  • 3 large eggs, room temperature
  • 1 cup (240 ml) whole milk, room temperature
  • 2 tablespoons (30 ml) vanilla extract
  • ½ cup (120 ml) sour cream (adds moisture and tenderness)
  • 1 cup (240 ml) rainbow sprinkles (optional, for a fun surprise inside)
  • 2 cups (480 ml) unsalted butter, softened (for frosting)
  • 5 cups (600 g) powdered sugar, sifted
  • 2 tablespoons (30 ml) heavy cream
  • 1 teaspoon vanilla extract (for frosting)
  • Gel food coloring – pink, blue, purple, green, yellow (about ¼ teaspoon each)
  • Edible glitter (silver or gold)
  • Additional pastel sprinkles for decorating the top
  • Optional: white chocolate or fondant for a unicorn horn

Instructions

  1. Preheat your oven to 350 °F (175 °C). Generously grease the two 9‑inch round pans with butter or non‑stick spray, then line the bottoms with parchment paper. This double layer of protection ensures the cakes release cleanly after baking.
  2. In a medium bowl, whisk together the flour, baking powder, baking soda, and salt. Set aside. This dry mixture will be incorporated later to give the cake a light, even crumb.
  3. Using a stand mixer fitted with the paddle attachment, cream the softened butter (the ½‑cup portion for the batter) and granulated sugar on medium‑high speed for 3–4 minutes, until the mixture is pale, fluffy, and has increased in volume. Scrape down the sides of the bowl as needed.
  4. Add the eggs one at a time, allowing each egg to fully incorporate before adding the next. After the last egg, beat for an additional 30 seconds. The batter should look smooth and glossy.
  5. Combine the milk, vanilla extract, and sour cream in a separate measuring cup. With the mixer on low, add the wet mixture to the butter‑egg mixture in two additions, alternating with the dry flour mixture you prepared earlier. Begin and end with the dry ingredients. Mix only until just combined; over‑mixing can develop gluten and make the cake dense.
  6. If you are using the rainbow sprinkles inside the cake, fold them in now with a rubber spatula, being careful not to break the color‑coded sprinkles.
  7. Divide the batter evenly into five small bowls (or three if you prefer fewer colors). Add a few drops of gel food coloring to each bowl—pink, blue, purple, green, and yellow—and stir gently until the color is uniform. Gel colors are best because they provide vivid hue without adding extra liquid.
  8. For a true “unicorn” effect, bake three separate layers, each a single color, in the prepared pans. Spoon each colored batter into its own greased pan, smoothing the top with a spatula. Bake for 22–25 minutes, or until a toothpick inserted into the center comes out clean. Rotate the pans halfway through baking for even rise.
  9. Allow the cakes to cool in the pans for 10 minutes, then run a thin knife around the edges and invert onto a wire rack. Let them cool completely—at least 45 minutes—before frosting. A warm cake will melt buttercream and cause it to slide.
  10. While the cakes are cooling, prepare the buttercream. Beat the 2 cups of softened butter on medium speed until creamy, about 2 minutes. Gradually add the sifted powdered sugar, one cup at a time, beating on low to avoid a sugar cloud. Once all sugar is incorporated, increase speed and beat for 1 minute.
  11. Add the heavy cream and vanilla extract to the butter‑sugar mixture, then beat on high for 2–3 minutes until the frosting is light, fluffy, and holds soft peaks. If the frosting is too stiff, add a teaspoon of milk; if too soft, add a little more powdered sugar.
  12. Divide the finished buttercream into five equal portions for coloring. Add the same gel colors you used for the cake layers, mixing each until the hue is even. You now have pastel pink, blue, purple, green, and yellow buttercream ready for piping and layering.
  13. Level each cake layer with a long serrated knife or a cake leveler, removing the domed tops so the layers sit flat. Place the pink layer on your serving plate, spread a thin “crumb coat” of plain white buttercream (use a small amount of the uncolored frosting) to seal in crumbs, and refrigerate for 15 minutes.
  14. Repeat the stacking process: spread a thin layer of pastel buttercream (matching the next color) over the crumb‑coated pink layer, then place the blue layer on top. Follow with a crumb coat, chill, then add the purple layer. If you baked only three colors, you can alternate the tinted frosting for visual interest.
  15. Once all layers are stacked, apply a final, generous coat of the plain white buttercream. Use an offset spatula to smooth the sides and a bench scraper for a clean top edge. Chill the assembled cake for another 20 minutes; this firms the buttercream and makes piping easier.
  16. Now comes the fun decorating stage. Transfer the pastel buttercreams to piping bags fitted with large star tips. Pipe rosettes, swirls, or “cloud” shapes across the top and sides, varying the colors for a rainbow‑soft effect. Sprinkle additional pastel sprinkles over the rosettes for texture.
  17. Dust the entire cake lightly with edible glitter using a fine sieve. The glitter catches the light and gives the unicorn its magical sparkle.
  18. If you want a horn, melt white chocolate (or shape white fondant) and roll it into a thin cone about 4‑5 inches tall. Attach the horn to the front of the cake with a dab of buttercream, smoothing any seams.
  19. Allow the finished cake to sit at room temperature for about 30 minutes before serving. This lets the buttercream soften just enough for clean slicing while retaining its decorative shape.

Tips

  • Substitutions: Use almond milk and a plant‑based butter if you need a dairy‑free version. Replace sour cream with Greek yogurt for a similar tang and moisture.
  • Color intensity: Gel colors are highly concentrated; start with a small amount and add more if needed. Too much liquid will thin the batter and affect rise.
  • Preventing crumb loss: A thin crumb coat before the final frosting is essential. It traps loose crumbs and gives you a smooth canvas for the final layer.
  • Common mistake: Over‑mixing the batter after adding the flour creates a dense texture. Mix just until the flour disappears.

Serving Suggestions

Serve the unicorn cake alongside vanilla bean ice cream or a dollop of whipped cream flavored with a splash of raspberry puree for a pop of color that complements the pastel palette. Fresh berries—strawberries, blueberries, and raspberries—add a refreshing contrast to the sweet buttercream, while a drizzle of white chocolate ganache can elevate the dessert for a more indulgent finish.

Variations

Swap the vanilla cake for chocolate or red‑velvet if you prefer richer flavors; just keep the same frosting colors for a striking contrast. For a seasonal twist, use peppermint‑flavored buttercream in winter or incorporate citrus zest into the batter for a spring‑time version. Vegan bakers can replace the eggs with flax‑egg (1 tbsp ground flaxseed + 3 tbsp water per egg) and use a plant‑based butter and milk.

Storage and Reheating

Cover the assembled cake tightly with a cake dome or a large piece of plastic wrap and refrigerate. It will stay fresh for up to 4 days. For longer storage, wrap each layer in plastic and then foil, and freeze for up to 2 months. To serve from the freezer, thaw overnight in the refrigerator, then bring to room temperature for 30 minutes before slicing. If a slice feels too firm, microwave it on a plate for 10–15 seconds; the buttercream will soften quickly.

Frequently Asked Questions

Can I use regular powdered sugar instead of sifted?

Yes, but sifted powdered sugar prevents lumps in the buttercream. If you skip sifting, whisk the frosting a minute longer on high speed to dissolve any grainy bits.

Do I need to bake the cake layers separately?

Separating the colors into individual pans yields the cleanest rainbow effect and makes it easier to control each layer’s doneness. If you prefer a marbled swirl, you can layer the colored batters in a single pan, but be careful not to over‑mix, or the swirl will turn muddy.

Is it safe to eat raw cake batter?

No. Raw flour may contain harmful bacteria, and raw eggs can carry salmonella. Always bake the batter fully to an internal temperature of at least 190 °F (88 °C) before tasting.

How do I keep the cake from drying out when stored?

Store the cake in an airtight container or tightly wrapped in plastic wrap. The buttercream acts as a moisture barrier, but additional covering prevents the cake from absorbing fridge odors.

Can I replace the edible glitter with something else?

Yes—shimmering sugar crystals, mica dust, or even finely crushed freeze‑dried gold leaf work well. Just ensure any alternative is labeled as food‑grade.

What’s the ideal serving temperature?

Buttercream is best at room temperature (68‑72 °F/20‑22 °C). Allow the cake to sit out for about 30 minutes after removing it from the fridge; this prevents the frosting from feeling overly firm on the palate.