This Dr Pepper Chocolate Cake is a rich, moist 9 x 13-inch chocolate sheet cake made with flour, cocoa, butter, buttermilk, and regular Dr Pepper. The scratch-made batter takes about 20 minutes to prepare, bakes at 350°F for 30–35 minutes, and is finished with warm chocolate Dr Pepper frosting for a total time of about 1 hour 15 minutes.
Every bite has a tender chocolate crumb, a gentle caramel-like soda flavor, and a thin, glossy frosting that sets beautifully over the warm cake. Optional miniature marshmallows add extra softness, while chopped pecans bring a pleasing crunch to this Southern-style dessert.
Jump to RecipeWhy You’ll Love This Recipe

This cake has the familiar comfort of a Texas sheet cake with an extra layer of personality from Dr Pepper. The soda works with the butter and cocoa to create a tender crumb, while the buttermilk adds gentle acidity and keeps the cake pleasantly soft.
It is also a practical dessert for birthdays, potlucks, bake sales, and family dinners. The entire cake bakes in one 9 x 13-inch pan, so there is no need to stack layers or fuss with decorating bags.
The frosting is the detail that makes this recipe special. It is poured and spread while warm, creating the characteristic thin, shiny chocolate topping that firms as it cools.
If you enjoy rich chocolate desserts, you may also like this extra-rich chocolate cake for another celebration-worthy option.
Ingredients You’ll Need

The cake starts with everyday pantry ingredients: all-purpose flour, granulated sugar, baking soda, salt, unsweetened cocoa powder, eggs, buttermilk, and vanilla extract. Unsalted butter gives you control over the seasoning and adds richness to both the batter and frosting.
- Regular Dr Pepper: Use 1 cup in the cake and 1/4 cup in the frosting. Regular soda is recommended because its sugar and acidity support the cake’s moisture and tenderness.
- Unsweetened cocoa powder: This supplies the deep chocolate flavor without adding extra sweetness.
- Buttermilk: The half-cup helps create a soft, delicate crumb and balances the cocoa.
- Miniature marshmallows: Add 1 to 1 1/2 cups if you like a slightly gooey, tender texture. They are optional and common in some published versions.
- Pecans: Use 1/2 to 1 cup in the batter if desired, and another 1/2 to 1 cup over the frosting for crunch.
- Powdered sugar: Four sifted cups make a smooth frosting that is thick enough to spread but still glossy when warm.
For a coconut-chocolate dessert without turning on the oven, keep our easy no-bake chocolate pie in mind for another occasion.
How to Make It Step-by-Step

Step 1: Heat the oven to 350°F (175°C). Grease and flour a 9 x 13-inch baking pan, or line the pan with parchment, leaving a little overhang if you want easier lifting after cooling.
Step 2: In a large bowl, whisk together the flour, sugar, baking soda, and salt. Breaking up any lumps now helps the dry ingredients blend evenly with the warm chocolate mixture.
Step 3: Place the butter, Dr Pepper, and cocoa powder in a saucepan over medium heat. Warm the mixture until the butter melts and the liquid is hot, stirring occasionally; avoid an aggressive boil, which can cause unnecessary evaporation.
Step 4: Pour the hot Dr Pepper mixture over the dry ingredients. Stir gently until the flour is mostly incorporated, but do not worry if the batter is not completely smooth yet.
Step 5: In a separate bowl, whisk the eggs, buttermilk, and vanilla until combined. Add them to the chocolate batter and mix just until smooth, then fold in the miniature marshmallows if you are using them.
Step 6: Pour the batter into the prepared pan and smooth the surface. Bake for approximately 30–35 minutes, checking near the end of the baking window; the center should spring back lightly and a toothpick should show a few moist crumbs.
Step 7: Let the cake cool in the pan for about 10–15 minutes. It should still be warm when you frost it, but it should not be so hot that the frosting becomes completely liquid.
Step 8: Make the frosting while the cake cools slightly. Heat the butter, Dr Pepper, and cocoa in a saucepan until smooth, remove the pan from the heat, and gradually beat in the sifted powdered sugar and vanilla.
Step 9: Spread the warm frosting over the warm cake, working from the center toward the edges. Sprinkle chopped pecans over the surface immediately if desired, then let the topping set before cutting.
Pro Tips for the Best Cake

Choose regular Dr Pepper instead of Diet Dr Pepper for the most dependable result. The sugar and acidity in regular soda are part of the balance that makes this cake moist and tender.
Measure flour by lightly spooning it into a measuring cup and leveling the top. Too much flour can make a sheet cake heavy, while overmixing after the eggs and buttermilk are added can reduce the delicate texture.
Keep the saucepan heat moderate when combining the butter, soda, and cocoa. The goal is a hot, smooth mixture rather than a hard boil.
Do not wait for the cake to become completely cool before frosting. Warm frosting glides across the warm surface and creates the thin, glossy topping associated with this style of chocolate cake.
If you add marshmallows, fold them in gently and distribute them throughout the batter. If you add pecans to the cake, use chopped pieces that are small enough to give crunch without making slices difficult to cut.
For a different special-occasion dessert, you can also try this festive layered love cake when a sheet cake is not on the menu.
Shortcut Cake Mix Version
When time is short, make a shortcut version with 1 box of chocolate or devil’s food cake mix, 1 small box of instant chocolate pudding mix, 1 cup of Dr Pepper, 1/2 cup vegetable oil, and 4 large eggs. Add 1 cup of semi-sweet chocolate chips if you want extra chocolate pockets throughout the cake.
Beat the ingredients together, fold in the chocolate chips if using, and spread the batter in a greased 9 x 13-inch pan. Bake at 350°F for about 35 minutes, then use the same chocolate Dr Pepper frosting listed in this recipe.
The scratch version has the most traditional Southern-style texture, but the shortcut version is useful for busy weekdays or last-minute gatherings. Whichever method you choose, frost the cake while it is warm for the best finish.
Storage, Slicing, and Serving

Allow the frosting to set before slicing so each piece has a neat chocolate top. Depending on the size you prefer, this cake makes about 12–16 servings.
Store leftovers covered at room temperature for a short period or refrigerate them if your kitchen is warm. Bring refrigerated slices toward room temperature before serving so the crumb softens and the frosting is easier to enjoy.
A sharp knife makes clean cuts through the glossy topping. Wipe the blade between slices if you are serving the cake at a party and want especially tidy squares.
Serve each piece on its own, or add a scoop of vanilla ice cream for a classic contrast. For a fruit-based dessert idea, our easy peach cobbler is a lovely choice for another family-style treat.
More Recipes for Your Table
This Dr Pepper cake is rich enough to anchor a dessert table, but it also pairs well with lighter or savory dishes. If you are planning a complete meal, consider serving it after an easy Margherita pasta bake for a comforting menu that is simple to prepare.
The cake can be made ahead for gatherings because the frosting sets directly in the pan and the slices are easy to transport. Keep it covered, add the pecans while the frosting is still warm, and wait until serving time to cut the squares for the freshest appearance.

Dr Pepper Chocolate Cake
Ingredients
Method
- Heat the oven to 350°F (175°C). Grease and flour a 9 x 13-inch baking pan, or line it with parchment paper.
- Whisk the flour, sugar, baking soda, and salt together in a large mixing bowl.
- Add the butter, Dr Pepper, and cocoa powder to a saucepan. Heat until the butter melts and the mixture is hot, but do not let it boil aggressively.
- Pour the hot Dr Pepper mixture over the dry ingredients and stir until mostly combined.
- Whisk the eggs, buttermilk, and vanilla together in a separate bowl. Add this mixture to the batter and stir just until smooth, then fold in the marshmallows if using.
- Pour the batter into the prepared pan and bake for 30–35 minutes, until the center springs back lightly and a toothpick comes out with a few moist crumbs.
- Cool the cake in the pan for 10–15 minutes.
- For the frosting, heat the butter, Dr Pepper, and cocoa in a saucepan until smooth. Remove from the heat and gradually beat in the powdered sugar and vanilla.
- Spread the warm frosting over the warm cake. Sprinkle with pecans immediately if desired, then allow the cake to set before slicing.
Notes
Final Thoughts
This Dr Pepper Chocolate Cake is a dependable, crowd-pleasing dessert with a soft chocolate crumb and a glossy homemade frosting. The recipe is easy enough for a beginner, yet distinctive enough to make guests ask what gives the cake its especially moist texture.
For the best result, use regular Dr Pepper, avoid aggressively boiling the butter mixture, and frost the cake while it is still warm. Add marshmallows or pecans according to your taste, then let the topping set before slicing into generous squares.
Whether you bake the traditional scratch version or use the cake-mix shortcut, this dessert brings the cozy appeal of a Southern sheet cake to any occasion. Make it for a potluck, birthday, holiday table, or simple weekend treat when you want rich chocolate flavor without complicated decorating.