Mason Jar Rainbow Cake

Are you ready to taste the rainbow with a vibrant 6-layer cake?

Today we are whipping up a batch of my “melt in your mouth” white cake. I use this white cake as the base for so many cake recipes. It really is the PERFECT cake with a deliciously soft texture, just the right amount of wonderful vanilla flavor, and tastes like love with creamy vanilla buttercream on top.

Trust me, even if you’re not a cake person (if that type of person exists) you are going to love this Mason Jar Rainbow Cake: soft & airy, moist but not eggy, a touch of sweetness, stick to your fork tender, and an easy recipe.

Now I know homemade cakes can be a scary thing for many people. This recipe ideally skips all of the typical fuss and stress around baking a cake. A simplified cake base with a perfectly smooth vanilla buttercream frosting is all you need.

Be sure to grab the full recipe & check out the full video tutorial in the recipe card below. And if you try this recipe (I mean you totally should be), tag me on Instagram @imancake and use the hashtag #BakingWithMANCAKE.

Mason Jar Rainbow Cake

prep time: 5 MINUTES cook time: 30 MINUTES additional time: 10 MINUTES total time: 45 MINUTES


  • 2 1/4 cups flour
  • 2 1/4 teaspoons baking powder
  • 3/4 teaspoon salt
  • 1 stick butter at room temperature
  • 1 1/2 cup sugar
  • 1/4 cup vegetable oil
  • 5 egg whites at room temperature
  • 1 1/2 teaspoons clear vanilla
  • 1 cup whole milk at room temperature
  • 1 stick butter at room temperature
  • 1/2 cup vegetable shortening
  • 1 teaspoon vanilla
  • 4 cups powdered sugar, sifted
  • 4 tablespoons heavy cream at room temperature
  • 1 cup rainbow sprinkles
  • Food gel color (red, orange, yellow, green, blue, purple)
  • 4 wide-mouth mason jars, about 1 pint each
  • Rainbow sprinkles


  1. Preheat oven to 325 degrees.


  1. One batch will be enough to fill 4 jars. If you need to make more, simply double your batch.
  2. Whisk dry ingredients together.
  3. In another bowl, beat butter & sugar together until light & fluffy.
  4. Add oil & incorporate.
  5. Add egg whites & full incorporate.
  6. Add clear vanilla **regular vanilla will work just as well**
  7. Starting & ending with flour mixture, alternate between flour mixture & milk while being sure to whisk after each addition.
  8. Divide batter evenly between 5 bowls (there will be slightly under 1 cup of batter in each bowl).
  9. Use gel food coloring (red, orange, yellow, green, blue, purple) to color each bowl of batter to your desired vibrancy. Whisk in food coloring until evenly blended.
  10. Transfer each color of batter to its own piping bag and cut off the tips (careful not to spill the batter).
  11. Pipe about 1/4 cup of each color batter into each of the jars, layering the colors in this order: purple (first), blue, green, yellow, red (last).
  12. Place the jars in a glass baking dish. Add 1/4 inch of water to the bottom of the dish surrounding the jars. Bake for 35-40 minutes. Cake tops should spring back to the touch when done, but don’t bake so long that the cakes are brown. You can also use a long cake skewer to test doneness if you have one.
  13. Allow cakes to cool completely (about one hour) in their water bath. DO NOT attempt to cool faster with cold water or placing in the fridge because this will stress the glass if your mason jars are not tempered properly.


  1. Sift 4 cups of powdered sugar & set bowl aside.
  2. Cream butter & shortening.
  3. Add vanilla.
  4. Scrape down the sides.
  5. Place your mixer on the lowest speed & slowly add in your powdered sugar, 1/2 cup at a time.
  6. Do not worry if your buttercream looks crumbly & dry because we will fix that next.
  7. Scrape down the sides one last time.
  8. With your mixer on a medium high speed, slowly add in heavy cream.
  9. Turn mixer up to a high speed and whip your buttercream until you have light & fluffy consistency you are looking for.
  10. Give each cake jar a heavy dollop of whipped cream and a generous splash of rainbow sprinkles.


  • Room Temperature Ingredients: Be sure to allow your dairy ingredients to reach room temperature. Room temperature ingredients not only combine more effortlessly (no accidental over-mixing) but they also trap air so much better. This trap air then expands and produces a fluffy, light texture during your baking process.
  • Prepared Pan: There will always be the “next best way to prepare your pans” before baking. Simply put however, the most effective way I find in my kitchen is a light rum of shortening around the sides, parchment paper on the bottom of the pan, and a very light dusting of flour (cocoa powder for chocolate baked goods) all throughout.
Dan is the creator and sort of charming host of the YouTube Channel MANCAKE, dad to Gwennie the Corgi, downtown Pittsburgh resident, and an avid baker of all things delicious since he discovered his passion for it many years ago. (He / Him / His)