This post may contain affiliate links. For more information, read my disclosure policy.

Learn how to make Rainbow Frosting in a swirl pattern for cupcakes, cakes, and cookies! I’m sharing all of my secrets for the best rainbow frosting – it’s so pretty and easy to make.

Pin it now to save for later

Pin Recipe
Rainbow swirl frosting on top of vanilla cupcakes

Beautiful Rainbow Frosting Swirls

One of my favorite frosting techniques is rainbow swirl frosting, and I think you’ll be surprised how easy it is to do. Next to sprinkles, swirl frosting is one of my favorite ways to decorate cakes, cupcakes, and cookies. I just love a cupcake frosting swirl!

  • You can make rainbow colors or combine your favorite colors to make any colorful swirl frosting that you like.
  • You can use homemade buttercream frosting to make this rainbow frosting recipe or frosting in a can – either way, you will love how easy it is!
  • Perfect for Cakes, Cupcakes, Cookies or anywhere frosting is needed.
Overhead shot of all ingredients needed to make rainbow swirl frosting

Rainbow Swirl Frosting for Cupcakes

You can use this rainbow frosting for cake, cupcakes, cookies – anything you like!

You will need one batch of vanilla buttercream frosting, or you can use three cans of store-bought white or vanilla frosting.

For the best vibrant colors, use GEL food coloring. Here are the colors I use:

  • Red
  • Orange
  • Yellow
  • Green
  • Blue
  • Purple

If you can’t find all of these colors, you can follow the instructions on the box and mix the ones you have to create the colors you want.

Once you know how to swirl frosting, you can use any combination of colors to create your own unique swirl frosting.

Overhead shot of four photos showing process of making rainbow swirl frosting

How to Make Rainbow Swirl Frosting

  1. Divide the frosting into six bowls and tint each a different color. Stir well, so the colors are even.
  2. Transfer each frosting color to a sandwich-sized resealable bag and snip off one corner for piping.
  3. Lay a piece of plastic wrap on your work surface and pipe a straight vertical line of each color. Pipe them right next to each other in this order: red, orange, yellow, green, blue, and purple.
  4. Form the frosting into a log by rolling up the plastic wrap and twisting the ends. Cut off one end of the plastic wrap.
  5. Fit a piping bag with a tip (I use a Wilton 1M, a star tip). Place the frosting log in the bag, and then pipe the swirl frosting onto your cupcakes or cake.
Overhead shot of rainbow swirl frosting on top of vanilla cupcakes

Expert Tips

  • I’ve already mentioned it, but it’s worth mentioning again: use GEL food coloring for the best results. Generic grocery store food coloring will not produce the same vibrant colors.
  • When you’re tinting your frosting, it’s always good to start with less and then add more to get your desired color.
  • This rainbow frosting is freezer-friendly! Once you’ve rolled it up in the plastic wrap and twisted the ends, place it in a freezer bag, and it will keep for two months. Thaw it in the refrigerator before using it.
  • Once you’ve frosted your cake or cupcakes, keep them loosely covered, and they will keep at room temperature for two days or in the refrigerator for four days.

More Rainbow Inspired Desserts

Have you made this recipe?

Tag @crazyforcrust on Instagram or hashtag it #crazyforcrust

Overhead shot of rainbow swirl frosting on top of vanilla cupcakes

Rainbow Swirl Frosting Recipe

5 from 1 vote
Rainbow Swirl Frosting is an easy rainbow buttercream recipe perfect for cupcakes, cakes or cookies! Learn how to make swirl frosting – it’s so pretty and easy to do.
Prep Time 30 minutes
Total Time 30 minutes
Yield 16 cupcakes
Serving Size 1 serving



  • Divide frosting among 6 bowls.
  • Tint each bowl of frosting a different color, stir to mix.
  • Place each frosting color in a sandwich bag and cut off one tip.
  • Lay a sheet of plastic wrap on your work surface.
  • Pipe a straight vertical line in each color, right next to each other, in the order of the rainbow: red, orange, yellow, green, blue, purple.
  • Roll up the plastic wrap and twist the ends. Cut off one end.
  • Fit a piping bag with desired tip. Add the frosting log.
  • Frost cupcakes or cake as desired.

Recipe Video

Recipe Notes

  • Substitute 3 cans vanilla or white icing from the store.
  • Use GEL food coloring for best results. If you don’t have all 6 colors, refer to the box or website of the brand you’re using to find the color chart for mixing desired colors.
  • Want pink in your rainbow? Skip the red and use pink instead.
  • My cupcakes are frosted with a Wilton 1M tip (open star).
  • Store cupcakes or cake loosely covered on the counter for up to 2 days, in the refrigerator for 4 days or freeze frosting for up to 2 months. Thaw in refrigerator.

Recipe Nutrition

Serving: 1serving | Calories: 50kcal | Carbohydrates: 1g | Fat: 1g | Saturated Fat: 1g | Polyunsaturated Fat: 1g | Monounsaturated Fat: 1g | Sodium: 1mg | Potassium: 1mg | Sugar: 1g | Calcium: 1mg
Nutritional information not guaranteed to be accurate
Course Dessert
Cuisine American
Overhead shot of rainbow swirl frosting on top of vanilla cupcakes with recipe title on top of image

Are you ready to make some fun treats with this rainbow cake frosting? It’s such a fun technique, and no one will guess how easy it is to do. Have fun trying it out!

Dorothy Kern

Welcome to Crazy for Crust, where I share recipes that are sometimes crazy, often with a crust, and always served with a slice of life.

Learn to Bake in 4 Days!
Get my tips, tricks and recipes to take your baking to the next level for FREE!

Leave a Comment

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

Recipe Rating


  1. Thank you for the recipe. I will definitely use this method the next time I make anything that needs frosting. So clever and I love the vibrant colors.