Flag Cake Recipe photo by Taste of Home
Total Time
Prep: 1-1/2 hours + chilling Bake: 35 min. + cooling
This American flag cake recipe has fun touches like using vibrant red and blue gelatin for extra color, berries and a fluffy marshmallow buttercream to make a patriotic cake that will be an eye-catching centerpiece at any potluck.

Updated: Jul. 19, 2024

Show your red, white and blue with this stunning cake modeled after the American flag. This is an ideal cake for a summer birthday or the 4th of July. Make sure to use sparkler candles!

Boxed cake mix is enriched with tangy buttermilk, oil and extra eggs,  but the decorations is where this cake shines. Blueberry and strawberry gelatin create the blue field of stars and red stripes. A fluffy marshmallow buttercream is piped on to create the white stars and stripes.

Leave some time for decorating, but if you’re in a hurry we have alternatives for simpler embellishments that still taste and look incredible. And if you need more patriotic dessert inspiration, here’s our favorite collection.

Ingredients for Flag Cake

  • Boxed cake mix: We love the French vanilla flavor.
  • Buttermilk, canola oil and eggs: Make that boxed cake mix taste homemade with thick buttermilk, oil and extra eggs.
  • Blue and red gelatin: Prepare berry blue and strawberry gelatin according to package instructions. They will add a lustrous background for the fresh fruit.
  • Strawberries and blueberries: Along with the red and blue gelatin, these berries make the field of blue and red stripes for the flag cake.
  • Butter: A traditional buttercream gets body, flavor and richness from butter.
  • Confectioners sugar: This type of sugar melds into a frosting smoothly with no graininess.
  • Milk: Add just enough milk to make this frosting easily spreadable.
  • Marshmallow creme: The secret ingredient is a jar of marshmallow creme that makes this frosting extra fluffy.

Directions

Step 1: Prepare pan and cake

Preheat oven to 350°F. Line a 13×9 inch pan with parchment paper, then grease to ensure a smooth release. In a large bowl beat cake mix ingredients together. Pour into prepared pan.

Step 2: Bake cake

Bake for 35 to 40 minutes until a toothpick inserted in the center comes out clean. Cool for 10 minutes, then turn out onto a wire rack and cool completely.

Step 3: Prepare cake for decorations

Use a paring knife to cut a 5×4 inch rectangle, a half inch deep in the top left corner where the blue field of stars is located. Make sure to leave a 1/2 inch border around the entire cake. Cut red stripes 3/4 inch wide, leaving 1/2 inches between each stripe. Use a fork to lift out the cut pieces.

Step 4: Make gelatin

Dissolve the blueberry gelatin in 3/4 cup boiling water. Add 1/2 cup cold water to a 2 cup measuring cup and add ice cubes to 1-1/4 cups. Stir it into the gelatin until thickened and then remove ice cubes. Repeat with the strawberry gelatin.

Step 5: Add berries and let gelatin set

Add the strawberries to 1 cup red gelatin and the blueberries to 1 cup blue gelatin. Chill for 20 minutes until just soft-set.

Step 6: Make the cake colorful

Add the blueberry gelatin to the rectangle. Add  the strawberry gelatin to the prepared stripes.

Step 7: Make fluffy frosting

In a large bowl, beat butter until light and creamy. Gradually add confectioner’s sugar and milk and mix until smooth. Add marshmallow creme and beat well until soft and pillowy. Spread over sides and 1/2 inch border on the top of the cake. Chill the remaining frosting for 20 minutes.

Step 8: Finish decorating flag cake

Fill a pastry bag, with a star tip, with chilled frosting and pipe it in between the red stripes of strawberry gelatin and along edges of cake. Refrigerate for one to two hours before serving to set gelatin.

Flag Cake Variations

  • Get rid of the gelatin: If you’re in a hurry you can skip the gelatin although it adds striking color to this cake. Just use the blueberries and red strawberries to form the field of stars and the red stripes.
  • Skip the buttercream: Another timesaver is to use whipped cream as the frosting; just follow the directions as they are written.
  • Make a Poke cake: There are a lot of variations of this cake, and one of the most fun is making it a poke cake. After the cake cools, use a skewer to poke holes all over and then mix up extra red and blue gelatin. Use a squeeze bottle to add a little gelatin to each hole. When you cut the cake, the inside will be red, white and blue.

How to Store Flag Cake

The cake will keep for two to three days, covered in the refrigerator. Although, it will look best the day it’s made. Consider getting a cake box so that it’s easy to store the cake covered and not ruin the decorations.

Can you make a flag cake ahead of time?

The cake can be made ahead of time and ideally you decorate it the day you are serving it. If you need to decorate ahead of time, get a cake box for storage or find a container large enough to flip over and use it as a lid or use toothpicks to drape plastic wrap over the cake so it doesn’t rest on the decorations.

Flag Cake Tips

What’s the best way to prepare your cake pan?

The best way to ensure your cake turns out of the pan perfectly every time is to grease, flour, and line the cake pan with parchment. Then grease and flour the parchment. Here are detailed instructions.

Are there different ways to pipe frosting?

A pastry bag and tip are the easiest way to pipe frosting. You can buy disposable or reusable bags. If you don’t have any you can use a zipper top bag and snip the corner or fold parchment paper into a piping bag.

How can you tell when a cake is done?

Over or undercooking a cake is a sad way to end your baking adventure. But there are strategies to prevent this. Always check a cake at the lower end of the recommended time (or a bit sooner) as all ovens are a little different. When a cake is finished, it will slightly pull away from the edges. The edges may be lightly golden-brown and the center will be set and a toothpick or skewer inserted in the center will come out clean.

Flag Cake

Prep Time 90 min
Cook Time 35 min
Yield 15 servings

Ingredients

  • 1 package French vanilla cake mix (regular size)
  • 1 cup buttermilk
  • 1/3 cup canola oil
  • 4 large eggs
  • FILLING:
  • 1 package (3 ounces) berry blue gelatin
  • 1-1/2 cups boiling water, divided
  • 1 cup cold water, divided
  • Ice cubes
  • 1 package (3 ounces) strawberry gelatin
  • 2/3 cup finely chopped fresh strawberries
  • 1/4 cup fresh blueberries
  • FROSTING:
  • 3/4 cup butter, softened
  • 2 cups confectioners' sugar
  • 1 tablespoon 2% milk
  • 1 jar (7 ounces) marshmallow creme

Directions

  1. Preheat oven to 350°. Line a 13x9-in. baking pan with parchment paper and grease the paper; set aside. In a large bowl, combine first 4 ingredients; beat on low speed for 30 seconds. Beat on medium for 2 minutes. Pour into prepared pan.
  2. Bake 35-40 minutes or until a toothpick inserted in center comes out clean. Cool for 10 minutes before removing from pan to a wire rack to cool completely.
  3. Transfer cake to a covered cake board. Using a small knife, cut out a 5x4-in. rectangle (1/2 in. deep) in top left corner of cake, leaving a 1/2-in. border along edges of cake. For red stripes, cut out 3/4-in. wide rows (1/2 in. deep), leaving a 1/2-in. border between stripes and around edges of cake. Using a fork, carefully remove cut-out cake pieces.
  4. In a small bowl, dissolve berry blue gelatin in 3/4 cup boiling water. Pour 1/2 cup cold water into a 2-cup measuring cup; add enough ice cubes to measure 1-1/4 cups. Stir into gelatin until slightly thickened. Scoop out and discard any remaining ice cubes. Repeat, making strawberry gelatin.
  5. In a small bowl, combine strawberries and 1 cup strawberry gelatin. In another bowl, combine blueberries and 1 cup blue gelatin. Refrigerate for 20 minutes or just until soft-set. (Save remaining gelatin for another use.)
  6. Stir gelatin mixtures. Slowly pour blueberry mixture into rectangle; spoon strawberry mixture into stripes.
  7. In a large bowl, beat butter until fluffy; beat in confectioners' sugar and milk until smooth. Add marshmallow creme; beat well until light and fluffy. Spread 1 cup over sides and top edges of cake. Refrigerate remaining frosting for 20 minutes.
  8. Cut a small hole in corner of a pastry bag; insert a large star tip. Fill bag with remaining frosting. Pipe frosting in between rows of strawberry gelatin and around edges of cake. Refrigerate 1-2 hours or until gelatin is set.

Nutrition Facts

1 piece: 438 calories, 18g fat (8g saturated fat), 81mg cholesterol, 363mg sodium, 67g carbohydrate (51g sugars, 0 fiber), 4g protein.

Get ready to hear oohs and aahs! This stars-and-stripes cake is sure to light up your Fourth of July party or other patriotic celebration. —Taste of Home Test Kitchen
Recipe Creator