My cotton candy cake is far more exciting than a standard birthday cake. I layered cotton candy–flavored cake with swirled cotton candy buttercream to create a bright, unicorn-inspired centerpiece. Despite its picture-perfect appearance, this sweet, colorful cake is straightforward to make from scratch and simple to decorate.

Top Reader Review
I can’t believe the comments here— I followed the exact directions and my cake came out perfectly! I used gel food coloring.
–
Cotton Candy Birthday Cake
This colorful cotton candy cake captures the magic of childhood. Cotton candy flavoring infuses both the cake and the frosting, while the pink and blue swirls create a festive, whimsical look. It’s perfect for birthdays, baby showers, or any celebration that calls for a cheerful centerpiece.
The layered, swirled appearance is worth the little extra effort when you want to make an impression. I use a dab of blue and pink food coloring for the swirl effect and add cotton candy flavoring to both batter and buttercream for a balanced sweetness. For a dramatic finish, top the cake with small puffs of real cotton candy just before serving—keep them on until guests arrive so they don’t dissolve.

Below the recipe card you’ll find instructions for making this cake with boxed mix and tips for fixing common issues.

Cotton Candy Cake Recipe
30 minutes mins
20 minutes mins
50 minutes mins
Equipment
-
Kitchen Scale (optional)
-
3 8-inch Round Cake Pans
-
Stand Mixer
-
Piping Tip Set (optional)
Ingredients
For the Cake
- 4 cups cake flour
- 1 tablespoon baking powder
- 1¼ teaspoons kosher salt
- 1 teaspoon baking soda
- 1 cup unsalted butter room temperature (2 sticks)
- 3 cups granulated sugar
- 5 large eggs room temperature
- 1¾ cups milk room temperature*
- 1½ teaspoons cotton candy flavoring
- Blue and pink food coloring optional
For the Buttercream
- 2 cups unsalted butter room temperature (4 sticks)
- 7 cups powdered sugar
- ⅛ teaspoon kosher salt
- ¾ teaspoon cotton candy flavoring
- Pink and blue food coloring optional
Instructions
Bake the Cakes:
-
Preheat oven to 350°F. Line three 8-inch cake pans with parchment and spray with nonstick spray. Set aside.
-
Whisk together flour, baking powder, salt, and baking soda in a large bowl. Set aside.

-
In a stand mixer fitted with the paddle or whisk, beat butter and sugar on medium-high about 1 minute until combined and slightly fluffy.

-
Add eggs, milk, and cotton candy flavoring. Beat on high for 1 minute to combine.

-
Fold in the flour mixture until just incorporated. Divide batter into two bowls and tint one blue and one pink if desired.

-
Alternate spoonfuls of blue and pink batter into the pans and gently swirl. Take care not to over-swirl or the colors will mix and darken. Bake 20–23 minutes, or until a toothpick comes out clean or with moist crumbs. Cool completely on a rack.

Make the Buttercream:
-
While the cakes cool, prepare the frosting. In a stand mixer with the paddle attachment, combine butter, powdered sugar, salt, and cotton candy flavoring. Start on low for about 2 minutes so the powdered sugar doesn’t puff out, then increase to high and whip 4 minutes until smooth and fluffy.

-
Divide the frosting into three bowls. Tint one pink, one blue, and leave one white for a multi-colored buttercream.

Decorate the Cake:
-
Place one cooled cake layer on a stand and spread about ¼ cup buttercream to the edges.
-
Top with the second layer, add more buttercream, then place the final layer on top.
-
Frost the top and sides, alternating white, blue, and pink to create a cotton candy effect.
-
For neat multi-colored swirls, place small amounts of blue and pink into a piping bag, add white, then pipe swirls around the cake in a clock pattern (12:00, 3:00, 6:00, 9:00) and continue until complete.
-
If desired, finish with small clouds or pieces of cotton candy just before serving. Slice and enjoy.
Notes
**If you can’t find cotton candy flavoring locally, it’s commonly available from specialty flavor suppliers.
***Pink and blue food coloring make both the cake and frosting extra vibrant, but they’re optional.
Tips:
- If you prefer a shortcut, use two boxes of white or yellow cake mix in place of the homemade cake ingredients (instructions below).
- Always make sure the cakes are fully cooled before frosting, or the buttercream can melt.
- Bake layers a day ahead and assemble the next day for easier decorating.
- Check the expiration date on baking powder and baking soda to ensure proper rise.
- Measure dry ingredients using the spoon-and-level method or a kitchen scale for consistency.
- Use room-temperature dairy ingredients to avoid a lumpy batter.
- If topping with cotton candy, add it right before serving to prevent it from dissolving in the frosting.
Storage: Store the cake in an airtight container at room temperature up to 2 days or refrigerate up to 4 days.
How to Fix Common Mistakes
-
A Flat Cake: This can result from inactive leavening or under-baking. Use the listed amounts of baking powder and baking soda and check expiration dates. Bake until a toothpick comes out clean to prevent collapsing as it cools.
-
A Dry Cake: Over-mixing will make a cake dense and dry. Mix only until ingredients are combined and remove any large dry pockets without overworking the batter.
-
Buttercream Consistency: If the frosting is too thin, chill it 10–20 minutes and whip again, or add powdered sugar 1 tablespoon at a time. If it’s too thick, add milk 1 tablespoon at a time until it loosens.

How to Make Cotton Candy Cake with Cake Mix
If you’d rather use boxed cake mix, swap the homemade cake ingredients for two boxes of white or yellow cake mix (enough for three 8-inch pans). Prepare according to the package, then:
- Prepare batter per package directions.
- Stir in 1½ teaspoons cotton candy flavoring.
- Divide batter into two bowls and tint one blue and one pink, then swirl into pans as described above.
- Bake according to package instructions (or about 20–23 minutes), cool, then frost and decorate as directed.
How to Store
Store the decorated cake in a cake container or cloche, and keep slices in airtight containers. At room temperature it will keep up to 2 days; refrigerated, up to 4 days. If you top with real cotton candy, add it right before serving to preserve texture.
More Cake Recipes to Try!
-

Cotton Candy Cupcakes (Made with Cake Mix!)
-

Mango Cake
-

Doctored White Cake Mix (WASC Cake)
-

Airplane Cake










