This Show-Stopping Rainbow Layer Cake is an absolute crowd-pleaser and so much easier to make than you'd think. Rich, indulgent, and perfectly sweet, it's the kind of treat that disappears fast. Get ready for everyone to ask you for the recipe!
Did You Know?
Pro Tips
Storage & Meal Prep
Frequently Asked Questions
1. How many layers does a rainbow cake have?
A classic rainbow cake has 6 layers — red, orange, yellow, green, blue, and purple. Each layer is baked from the same vanilla batter tinted with gel food coloring.
2. What type of food coloring works best?
Gel food coloring (not liquid) gives vibrant, saturated colors without thinning the batter. Americolor and Wilton gel colors are the most reliable brands.
3. Do I need to bake each layer separately?
You can bake 2-3 layers at a time if you have enough pans. Use 6-inch or 8-inch round pans. Divide the batter evenly by weight for uniform layers.
4. What frosting works best for a rainbow cake?
White vanilla buttercream or cream cheese frosting is traditional — it provides a neutral backdrop that makes the rainbow colors pop when sliced open.
5. How do I stack layers without them sliding?
Level each layer with a serrated knife, add a thin crumb coat of frosting, refrigerate 30 minutes, then add full frosting and stack. Dowel rods help support taller cakes.
6. Can I make the cake layers ahead of time?
Yes, bake the layers, wrap tightly in plastic wrap, and freeze for up to 2 months. Thaw in the fridge overnight and assemble with fresh frosting.
7. How do I get even, flat cake layers?
Use bake-even strips around the pans, bake at 325°F instead of 350°F, and level with a serrated knife or cake leveler after cooling. Do not overfill the pans.
8. What vanilla cake recipe works best for rainbow layers?
A white or vanilla butter cake recipe with egg whites only gives the whitest base for coloring. Using whole eggs adds a yellowish tint that can muddy some colors.
9. How much batter does each layer need?
For 8-inch layers, you need about 1 to 1.25 cups of batter per layer. Weigh the total batter and divide by 6 for perfect consistency across all colors.
10. How far in advance can I assemble the full cake?
Assemble and frost 1-2 days before serving. Refrigerate uncovered for 1 hour to set the frosting, then cover loosely. Bring to room temperature 1 hour before cutting.
Watch How to Make This

Show-Stopping Rainbow Layer Cake
Ingredients
Method
- Preheat oven to 350°F (175°C). Grease and line six 8-inch cake pans with parchment paper. If you don't have six pans, bake in batches.
- In a medium bowl, whisk together flour, baking powder, and salt. Set aside. In a large mixing bowl, beat butter and sugar on medium-high until fluffy (3-5 minutes). Add eggs one at a time, beating well after each. Stir in vanilla extract. On low speed, add flour mixture in three parts, alternating with milk, starting and ending with flour. Mix until just combined.
- Divide batter evenly into six bowls. Add food coloring to each bowl, creating red, orange, yellow, green, blue, and purple batters. Mix until colors are vibrant.
- Pour each colored batter into prepared pans. Bake for 15-18 minutes, or until a toothpick inserted into the center comes out clean. Cool cakes in pans for 10 minutes, then transfer to wire racks to cool completely.
- Beat cream cheese and butter until smooth. Gradually add powdered sugar, beating on low speed until combined. Add vanilla extract and mix until fluffy.
- Place the purple layer on a cake board or plate. Spread a thin layer of frosting. Repeat with blue, green, yellow, orange, and red layers, adding frosting between each. Apply a thin crumb coat over the entire cake and refrigerate for 20 minutes. Apply the final coat of frosting. Decorate with sprinkles if desired.
Notes
Refrigerator: Store leftovers in an airtight container for up to 3-4 days.
Freezer: Freeze in a sealed container for up to 2-3 months. Thaw overnight in the fridge.
Reheat: Warm in a skillet over medium heat, in the microwave, or in a 350°F oven until heated through.
Nutrition Facts (Per Serving, Approximate)
Nutrition values are estimates and may vary based on ingredients and preparation.
You May Also Like
Never Miss a Recipe!
Subscribe to get new recipes delivered straight to your inbox.







