There is a moment at every summer gathering when the dessert hits the table and everyone stops talking to stare. That is the power of this Flag Cake. It is not just a patriotic centerpiece; it is a flavor discovery waiting to happen. While the red, white, and blue design steals the show, the real magic is the “pop” of tangy cream cheese frosting against the sweet, soft yellow cake. I love adding a tiny pinch of extra salt to the frosting—it makes the vanilla sing.
This recipe takes a classic concept and ensures the flavor matches the visual hype. We are using a tender buttermilk base adapted from a brilliant method by Jennifer Segal, which keeps the crumb incredibly moist. The decoration looks impressive, but the secret lies in a simple trick: rolling raspberries in sugar to create the white stripes without needing fondant or tricky piping.
Why This Recipe is a Summer Stunner
The Flavor Pop
Most festive cakes are all looks and dry sponges. Not this one. The buttermilk in the batter adds a subtle tang that balances the sugar, while the cream cheese frosting provides that rich, cheesecake-like finish. It is the perfect balance of sweet and tangy.
Visual Magic, Zero Stress
The decoration relies on fresh fruit, not complicated piping skills. The genius hack of rolling raspberries in confectioners’ sugar to create “white” stripes is a game-changer. It gives the cake a frosted look and adds a lovely textural crunch.
Make-Ahead Friendly
Summer parties are busy. You can bake this sheet cake a day in advance, letting the flavors meld. In fact, the crumb often gets even softer after sitting wrapped overnight, making your prep day much smoother.
Print
Flag Cake
- Total Time: 1 hour 5 mins
- Yield: 15 servings
- Diet: Vegetarian
Description
This striking patriotic centerpiece features a tender buttermilk yellow cake base topped with a rich cream cheese frosting. Using fresh blueberries and sugar-coated raspberries to create the iconic flag design, it’s a refreshing and festive dessert that tastes even better than it looks.
Ingredients
- 1 cup unsalted butter, softened
- 2 cups granulated sugar
- 3 cups all-purpose flour
- 1 teaspoon baking soda
- 1/2 teaspoon salt
- 4 large eggs, room temperature
- 1 cup buttermilk, room temperature
- 2 teaspoons pure vanilla extract
- 8 ounces cream cheese, softened
- 1/2 cup unsalted butter, softened (for frosting)
- 4 cups confectioners’ sugar
- 1 pint fresh blueberries
- 2 pints fresh raspberries
Instructions
- Preheat your oven to 350°F (175°C) and generously butter and flour a 9×13-inch metal baking pan.
- In a medium bowl, whisk together the flour, salt, and baking soda until well combined.
- In an electric mixer, beat the softened butter and sugar on medium speed for 5 minutes until pale and fluffy.
- Mix in the vanilla extract, then add the eggs one at a time, scraping down the bowl as needed.
- Turn the mixer to low and add one-third of the flour mixture, followed by half of the buttermilk; repeat, ending with the flour mixture.
- Spread the batter into the prepared pan and bake for 30 to 35 minutes, or until a toothpick comes out clean.
- Let the cake cool completely on a wire rack before frosting to prevent melting.
- Whip the cream cheese, butter, vanilla, and salt until smooth, then gradually add confectioners’ sugar and beat until fluffy.
- Frost the cake and arrange blueberries in the upper left corner, then create stripes using rows of plain raspberries and raspberries rolled in confectioners’ sugar.
Notes
To ensure the most vibrant flag design, pat your berries completely dry with paper towels after washing; any residual moisture will cause the powdered sugar on the white stripes to dissolve. If you need to prep in advance, the cake base can be baked a day early and wrapped tightly, which often results in an even softer crumb.
- Prep Time: 30 mins
- Cook Time: 35 mins
- Category: Dessert
- Method: Baking
- Cuisine: American
The Simple Ingredients

For the Cake Base
- Unsalted Butter: Make sure this is truly softened so it creams properly with the sugar. This creates the air pockets needed for a light crumb.
- Buttermilk: This is the tenderness secret. The acidity breaks down gluten strands for a soft, velvety texture.
- Vanilla Extract: Use a high-quality pure extract here. Since the cake is simple, the vanilla flavor really shines through.
- All-Purpose Flour: Spoon and level it to avoid a dense cake.
For the Frosting & Topping
- Cream Cheese: Block style, full fat. This provides the structure and tang we need.
- Fresh Berries: You will need blueberries for the stars and raspberries for the stripes. Ensure they are completely dry before placing them on the cake.
- Confectioners’ Sugar: Used both for the frosting and for coating the raspberries to create the white stripes.
How to Make It
Step 1: Prep the Pan
Preheat your oven to 350°F (175°C) and set the rack in the middle. Generously butter and flour a 9×13-inch metal pan. You want this cake to release easily, so don’t skip the corners.
Step 2: Mix Dry Ingredients
In a medium bowl, whisk together the flour, salt, and baking soda. Getting these evenly distributed now prevents salty pockets later.
Step 3: Cream the Butter and Sugar
In your electric mixer, beat the softened butter and sugar on medium speed. Let this go for about 5 minutes until it looks pale and fluffy. This aeration is crucial for the cake’s lift. Beat in the vanilla, then add eggs one at a time, scraping the bowl down as you go.
Step 4: The Alternating Method
Turn the mixer to low. Add one-third of the flour mixture, followed by half of the buttermilk. Repeat, ending with the flour. Mix just until combined—overmixing here leads to a tough cake.
Step 5: Bake and Cool
Spread the batter into your prepared pan. Bake for 30 to 35 minutes until a toothpick comes out clean and the edges are golden. Let it cool completely on a wire rack. The frosting will melt if the cake is even slightly warm.
Step 6: Whip the Frosting
Beat the cream cheese, butter, vanilla, and salt until smooth. Gradually add the confectioners’ sugar on low speed, then whip on medium-high until fluffy. Reserve 1 tablespoon of frosting for the stars.
Step 7: The Patriotic Decoration
Spread the frosting over the cooled cake. Mark a square in the upper left corner for the “stars” and fill it with blueberries. For the stripes, arrange rows of raspberries. Here is the fun part: alternate between plain red raspberries and raspberries rolled in confectioners’ sugar to create the red and white stripes. Dot the blueberry section with the reserved frosting and dip remaining berries in sugar to create “stars.”
Jasmine’s Flavor Tips

Dry Those Berries
Moisture is the enemy of this design. After washing your fruit, spread the berries out on paper towels and let them air dry completely. If they are wet, the confectioners’ sugar on the white stripes will dissolve into a syrup instead of staying powdery and white.
The Temperature Matter
Ensure your butter, eggs, and buttermilk are all at room temperature before you start the batter. This creates an emulsion that traps air better, resulting in a fluffier classic vanilla cake base that serves as the perfect canvas for the fruit.
Fixing Smudges
If you accidentally drop some powdered sugar on the red raspberry stripes, don’t panic. Just dip your finger in a little water and gently dab the berry. The sugar will vanish, and the red will pop right back out.
Source Inspiration
This wonderful method was inspired by a recipe from Once Upon a Chef, proving that simple fruit techniques often yield the most stunning results.
Make It Yours
Switch the Fruit
If you prefer strawberries, you can use sliced strawberries for the red stripes. Just arrange them like shingles. For the white stripes, you can pipe plain whipped cream or cream cheese frosting if you prefer that over the sugar-rolled berry technique. This works similarly to our strawberry tres leches cake concept.
Add a Citrus Pop
Rub 1 tablespoon of lemon zest into the sugar before creaming it with the butter. This releases the oils and infuses the entire cake with a bright citrus note that pairs beautifully with the raspberries.
Almond Twist
Swap half the vanilla extract in the cake batter for almond extract. Almond flavor has a natural affinity with stone fruits and berries, giving the cake a more bakery-style finish.
Serving the Celebration

Chill Before Cutting
Because of the cream cheese frosting, this cake slices best when it is slightly cool. I like to pop it in the fridge for about 20 minutes before serving. It helps the frosting set and gives you those clean, sharp bakery-style cuts.
Pairing Ideas
This cake is rich, so it pairs perfectly with unsweetened iced tea or cold brew coffee. If you are serving this at a larger gathering with multiple desserts, check out our guide on party cakes and events for planning portion sizes.
Plating
Serve square slices directly from the pan. Since the berries are loose on top, use a small offset spatula to lift slices out carefully to keep the flag pattern intact.
The Sweet Spot
This Flag Cake is more than just a patriotic symbol; it is a celebration of summer produce and simple baking done right. The combination of the tender yellow crumb, the tangy frosting, and the burst of fresh juice from the berries creates a bite that is totally unforgettable. It reminds me of the visual joy in our ribbon cake, where the design is baked right in, but here the fruit does the heavy lifting.
I hope you try this for your next July 4th or Memorial Day bash. It is a guaranteed crowd-pleaser that tastes as vibrant as it looks.
Connect with us for more flavor pops on Pinterest, Instagram, and Facebook.







