This rainbow swirl cake is way easier than it looks - a little food coloring goes a long way in creating a magical, swirly cake. Perfect for any celebration!

Commission links below. If you shop through these links, I get a small percentage of the sale, at no extra cost to you! Thank you for your support.

rainbow swirl cake

Nothing says celebration quite like a crazy, decadent, layered cake – and this rainbow swirl cake fits the bill. I made this cake to celebrate my blog passing 40,000 followers (ah!!!), and it is a slam dunk. Perfect for your next party, this cake looks impressive, but it WAY easier than you’d think.

40,000 followers – what!

I need to take a second to just FREAK OUT because I am in shock. When I started this blog, it was just a place to take photos of food I ate throughout the city of Philadelphia. I was fortunate to grow my page to 10,000 followers eating out at amazing restaurants and sharing it along the way. I go into my story more here. Then, I found myself super burnt out and wanting nothing more than a home cooked meal. So I got back in the kitchen, and the rest is history.

Then a global pandemic hit. All of the sudden, people couldn’t really eat out anymore. More people were forced to cook at home, and I get that not everyone likes to cook. So I set out to share the foods I actually make at home – with some tasty treats in between- showing people that cooking can be simple, fun, and delicious. And, most of all, I want to show people that you can have your cake and eat it too. Enjoy a light, delicious dinner followed by a decadent slice of cake. Really, you’ll be fine. The fact that my message resonates with over 40,000 people is absolutely amazing. I’m so thrilled about the community I’ve built, and want to thank each and every one of you for being here.

Ok, back to cake.

Making Rainbow Swirl Cake

This cake looks super intricate, with layers of colors and a beautiful swirl. But it’s actually super easy (promise).

First things first, make your cake batter. Then, decide how many colors you want to have. Split your batter into that many separate bowls or containers. Then, using a gel food coloring, put a little bit (literally use a toothpick) in each batter, and mix well, adding color as needed until to get your desired shades. With gel coloring, a little goes a long way, and it gives you gorgeous, vibrant colors. Regular food coloring gives you dull colors and affects texture.

Once you’ve mixed your batters, spray your cake pans, and it’s time to start creating the swirls. Take your first color, and put about 2 tbsp in the center of the cake pan. Then, take your next color, and using a different spoon so as not to mix colors, put another 2 tbsp dollop right in the center of the first color. Then, take your next color, and put a 2 tbsp dollop right in the center of the last color, and so on. Continue this process until you’ve run out of batter. See below for a visual on what this should look like.

Frosting and decorating

Once your cake layers are baked and cooled, you’ll want to level them so that you can easily stack them. I take a large kitchen knife and put my hand on top of the cake, gently slicing through so I end up with flat layers. If you’re fancy, you can use a cake leveler.

Next, you’ll want to frost on top of your bottom layer, and then stack your next layer. Repeat for however many layers you have. I chose to cut my cake to have four thin layers, but you can also do two thick layers. Once you have your layers filled with frosting, you’ll want to crumb coat the cake, which is when you put a thin layer of frosting over the entire outside of your cake to cover any crumbs. This ensures that your exterior layer of frosting goes on nice and smooth.

vanilla almond buttercream frosting
Cake with initial crumb coat

Once crumb coated, you can then pipe frosting all over the exterior, smoothing it to achieve a cleaner look. To frost, I prefer to put a piping bag in a tall glass to fill it, which helps keep it upright and makes it easier to fill the piping bag. For frosting cakes, I use a basic cake decorating kit, which has a turntable and some frosting tools that make smoothing and scraping much easier. I smoothed my exterior frosting, piped some fun swirls on top, and a ribbon of frosting along the base. I then added some rainbow sprinkles on the top and bottom to give it some color, and voila! A rainbow swirl cake.

rainbow swirl cake

Rainbow Swirl Cake

Jacklin Altman
This cake screams fun, with mesmerizing rainbow swirls and an incredible vanilla almond buttercream. It's way easier than it looks, and it's sure to impress at your next event.
5 from 2 votes
Prep Time 25 minutes
Cook Time 35 minutes
Decorating Time 25 minutes
Total Time 1 hour 25 minutes
Course Dessert
Cuisine American
Servings 12
Calories 521 kcal


  • Mixing Bowls
  • 8" Cake Pans
  • Oven
  • Stand Mixer
  • Cake Turntable


  • 2 1/4 cups all-purpose flour
  • 1 cup sugar
  • 2 tsp baking powder
  • 1/2 tsp salt
  • 1/2 cup unsalted butter softened to room temperature
  • 1 tsp vanilla extract
  • 1 cup milk can substitute plant milk
  • 2 large eggs
  • Gel food coloring various colors
Vanilla Almond Buttercream
  • 1 cup Unsalted butter softened to room temperature
  • 3.5 cups Powdered sugar
  • 1 tbsp Milk or heavy cream
  • 1 tsp Vanilla extract
  • 2 tsp Almond extract
  • 1/2 tsp Salt


To make the cake
  • Preheat oven to 350F
  • Beat together butter and sugar until creamed together, then add egg, vanilla, and milk and beat to combine
  • In a separate bowl, combine flour, salt, and baking powder and pour into the wet ingredients, stirring to combine
  • Divide batter into 2-6 parts (depending on how many colors you want), and dye each part with gel food coloring. Then, create a swirl by pouring one color after another into the center in 2 tbsp increments (see blog post for details).
    rainbow swirl cake
  • Pour into greased cake pans. Bake 25-30 minutes at 350F, until a toothpick comes out clean
  • Allow cake to cool while you work on your frosting.
  • Before frosting, level your cake layers. Optional: cut layers in half to create 4 layers.
    rainbow swirl cake
To make the frosting
  • Add butter into stand mixer and beat on medium-low speed until butter is whipped.
  • Mix in vanilla extract, almond extract, and salt and beat until mixture is smooth, scraping down the sides as needed.
  • Add powdered sugar 1/2 cup at a time, until fully incorporated.
  • Add milk or cream and mix on medium speed to combine.
  • To thicken thin frosting, add powdered sugar. If frosting is too thick, add a more milk or cream 1 tsp at a time.
    vanilla almond buttercream frosting


Calories: 521kcalCarbohydrates: 71gProtein: 4gFat: 25gSaturated Fat: 16gTrans Fat: 1gCholesterol: 92mgSodium: 422mgPotassium: 73mgFiber: 1gSugar: 52gVitamin A: 800IUVitamin C: 1mgCalcium: 78mgIron: 1mg
Keyword almond, vanilla, rainbow, Cake, funfetti, buttercream, frosting
Tried this recipe?Add your thoughts below in the comments or post on social media and tag @foodbythegram!

3 thoughts on “Rainbow Swirl Cake”

  1. Davina Browning

    I haven’t tried this yet but I remember when I tried to make a rainbow cake before the colour went all odd…. I got told it’s cos of the eggs making it a yellow batter and changes the colour of the food colouring.
    Is that correct? Or is it the quality of the colouring I am using?
    Many thanks

    1. Hi Davina! The key is to use a gel based food coloring, which is much more vibrant. Eggs will definitely add a tinge of yellow, but you could opt for an egg-white based cake recipe to keep it lighter in color. However, I find that using regular cake mix + gel based food coloring works great!

5 from 2 votes (1 rating without comment)

Leave a Comment

Your email address will not be published. Required fields are marked *

Recipe Rating

Other Recipes You May Like

oreo fluff dip

Oreo Fluff Dip

This dip is quick and easy to throw together, but is so indulgent, creamy, and satisfying. A perfect no-bake dessert!

View Recipe

Subscribe Today

You’ll get updates of my best new content and you can unsubscribe at any time.