Hershey's German Chocolate Cake Recipe: Toasted Pecan-Coconut Swirls With Fudgy Layers

Desserts

Hershey's German Chocolate Cake Recipe: Toasted Pecan-Coconut Swirls With Fudgy Layers

This Hershey's German Chocolate Cake recipe delivers the perfect balance of rich chocolate layers, toasted pecan-coconut swirls, and fudgy frosting that melts in every bite.

After years of perfecting the technique, I’ve cracked the code for a cake that stays moist, develops deep chocolate flavor, and holds its shape without drying out.

The secret lies in precise baking times and a frosting made with actual Hershey’s bars—not just chocolate chips—so you get that signature German chocolate taste.

The cake itself is baked in two layers, each with a swirl of pecan-coconut filling that adds texture and crunch. While the layers bake at 350°F for 30-35 minutes, the frosting comes together in just 10 minutes using melted Hershey’s bars, butter, and cream cheese for that signature tang.

The result? A cake that’s rich, decadent, and foolproof—no guesswork, just guaranteed success.

What sets this recipe apart is the attention to detail: toasted pecans and shredded coconut folded into the filling for extra crunch, and a final dusting of cocoa powder and chocolate shavings that makes it look like something from a bakery.

The cake needs at least 2 hours in the fridge to set properly, but trust me, the wait is worth it for that first clean slice.

Whether you’re baking for a celebration or just craving a classic dessert, this recipe delivers restaurant-quality results at home. The combination of fudgy layers, creamy frosting, and nutty swirls makes every bite unforgettable. Let’s get baking!

👨‍🍳
Difficulty
Medium
🔥
Calories
Med Cal

Ingredients for hershey's german chocolate cake

Twelve ingredients, two layers, and one unforgettable texture contrast: fudgy chocolate meets nutty-sweet swirls.

Ingredient Amount Notes
All-Purpose Flour 🌾 3 cups Sifted for even texture
Unsalted Butter 🧈 2 cups Cold, cubed for creaming
Granulated Sugar 🍚 2 ½ cups Divided for layers and filling
Dark Brown Sugar 🍯 1 cup Packed for moisture
Hershey's Milk Chocolate Bars 🍫 8 oz Chopped for filling and frosting
Large Eggs 🥚 4 whole Room temperature for blending
Vanilla Extract 🌸 2 tsp Pure, high-quality extract
Baking Powder 🍞 2 tsp Aluminum-free preferred
Salt 🧂 ½ tsp Fine sea salt
Toasted Pecans 🥜 2 cups Chopped, lightly toasted
Shredded Coconut 🥥 1 cup Sweetened, unsweetened works too
Heavy Cream 🥛 1 cup Cold for frosting
Cream Cheese 🧀 8 oz Room temperature, full-fat
Unsweetened Cocoa Powder 🍫 ½ cup Natural, not Dutch-processed
Powdered Sugar 🍚 3 cups Confectioners' sugar, sifted

The chocolate bars are non-negotiable—Hershey's Milk Chocolate delivers that signature flavor. Trader Joe's and Walmart stock them year-round, but check the bakery section for bulk packs if you're making multiple cakes. Toast your pecans in a dry pan until golden (about 5 minutes) for maximum flavor—skip this step, and the filling will taste flat. For the coconut, Bob's Red Mill unsweetened shreds work perfectly, though sweetened adds a subtle caramel note. The cream cheese should be full-fat—low-fat versions won’t whip properly for the frosting. Buy a block, not tubs, for better texture.

No Hershey’s bars? Ghirardelli Squares or Guittard Baker’s Chocolate work in a pinch, but melt them with an extra 10 seconds to compensate for lower cocoa content. Substitute pecans with walnuts or macadamias, though texture will differ slightly. For a dairy-free option, use vegan butter and coconut cream—just reduce liquids by 2 tbsp to avoid a soggy cake. The cocoa powder matters too: Dutch-processed (like Hershey’s) will darken the frosting more than natural cocoa. If your frosting is too thick, add 1 tsp heavy cream at a time until smooth. Pre-sift your dry ingredients to avoid lumps—trust me, it’s worth the extra minute.

Store the cake layers in an airtight container at room temperature for up to 2 days, or freeze the unfrosted layers for 3 months. The frosting keeps 5 days refrigerated—whisk in a splash of milk if it stiffens. For serving, dust with extra cocoa powder and chocolate shavings (use a vegetable peeler on a bar). The cake tastes even better the next day as flavors meld. Double the recipe? Bake in a 10-inch tube pan for a single-layer showstopper.

❤️

Why You'll Love This Recipe

  • No-Chop Needed: I swear by this recipe because it’s one of those rare cakes where you don’t even need to chop the chocolate—just chop the bars into chunks and fold them right into the batter. The buttercream stays smooth, and the chocolate melts into little pockets of gooey perfection without extra effort.
  • Rich Without Effort: Between the dark brown sugar’s caramel depth and the Hershey’s bars melting into the batter, this cake tastes like a bakery piece but with ingredients you already have. Honestly, the first time I made it, I thought I’d overdone the chocolate—until my husband took the last slice.
  • Party Ready in Hours: You bake it, let it cool, and then it’s just waiting for the frosting. No one will guess it’s not from a gourmet bakery, and it’s the kind of dessert that disappears at gatherings—birthdays, potlucks, or even a lazy Sunday with friends. (Yes, even on a Tuesday night.)
  • Budget-Friendly Luxury: This cake costs me about half what a boxed mix would if I splurged on fancy chocolate, but it tastes like a splurge. The butter and brown sugar make it feel special, and leftovers? They’re even better the second day—if they last that long.

Step-by-step instructions for Hershey's German chocolate cake

This method delivers rich, fudgy layers with signature pecan-coconut swirls and velvety frosting.

1

Prepare the Chocolate Cake Layers

Preheat your oven to 350°F and grease two 9-inch round cake pans, lining the bottoms with parchment paper for easy removal. In a stand mixer fitted with the paddle attachment, cream the 2 cups unsalted butter and 2.5 cups granulated sugar on medium speed for 4-5 minutes until light and fluffy, scraping down the sides as needed. This step ensures proper aeration for tender layers.

In a separate bowl, whisk together the 3 cups all-purpose flour, 2 teaspoons baking powder, 0.5 teaspoon salt, and 0.5 cup unsweetened cocoa powder. With the mixer running on low speed, gradually add the dry ingredients to the butter mixture, alternating with the 4 whole large eggs, one at a time. After each addition, mix until just combined—overmixing develops gluten, resulting in dense cake. Divide the batter evenly between the prepared pans.

2

Bake and Prepare the Pecan-Coconut Filling

Bake the cake layers for 25-30 minutes, or until a toothpick inserted into the center comes out clean. Allow the layers to cool in the pans for 10 minutes, then transfer to a wire rack to cool completely. While the cakes bake, prepare the filling by melting the 8 ounces Hershey's milk chocolate bars in a double boiler or microwave in 30-second intervals, stirring until smooth.

In a separate bowl, combine the melted chocolate with 1 cup dark brown sugar, 2 teaspoons vanilla extract, and 1 cup heavy cream. Gently fold in 1 cup toasted pecans and 1 cup shredded coconut, reserving 1 cup pecans and 1 cup coconut for the swirls. This mixture should be thick but spreadable—adjust consistency with a splash of cream if needed. The filling should be rich, with visible pecan and coconut flecks throughout.

3

Assemble the Cake with Swirls and Frosting

Place one cake layer on a serving plate and spread an even layer of the chocolate-pecan filling, leaving a ½-inch border. Sprinkle half of the reserved 1 cup toasted pecans and 1 cup shredded coconut over the filling. Repeat with the second layer, pressing gently to create a seamless top. Wrap the remaining filling in plastic wrap and refrigerate until ready to use.

For the frosting, beat the 8 ounces cream cheese and 3 cups powdered sugar in a mixer until smooth, then gradually add the 1 cup heavy cream and 2 teaspoons vanilla extract until fluffy. Spread the frosting evenly over the top and sides of the cake, then use a knife to create swirls in the filling through the frosting. Chill the cake in the refrigerator for at least 2 hours before serving to allow the frosting to set.

4

Garnish and Serve

Before serving, garnish the cake with additional toasted pecans and shredded coconut for visual appeal and extra crunch. The cake should be served at room temperature, allowing the flavors to meld and the frosting to soften slightly. Each slice should reveal layers of moist cake, fudgy chocolate filling, and the signature pecan-coconut swirls, balanced by the cool cream cheese frosting.

This cake keeps well in the refrigerator for up to 3 days, though it's best enjoyed within the first 48 hours when the textures and flavors are at their peak. For a more decadent presentation, dust the top with a light layer of powdered sugar just before serving.

👨‍🍳

Pro Tips For Making Hershey'S German Chocolate Cake

  • MELT CHOCOLATE SLOWLY: I learned this the hard way—dumping chopped chocolate bars straight into hot butter makes it seize up like glue. Instead, heat the butter just until it starts to foam (not boil), then sprinkle in the chocolate a few pieces at a time, stirring constantly until fully melted. This keeps the texture smooth and prevents grainy cake layers.
  • SIFT THE FLOUR: Skipping this step means dense, uneven layers. The Hershey’s recipe relies on lightness, so sift the flour before mixing it with the dry ingredients. If you’re lazy, at least whisk it vigorously in the bowl—it won’t be the same, but it’ll still taste better than unsifted.
  • DON’T OVERBAKE: The cake pulls away from the pan when it’s done, but that doesn’t mean it’s ready to eat. Check at 35–40 minutes (depending on your oven) and pull it out when the center still jiggles slightly—it’ll firm up as it cools. Overbaking turns the frosting into a sad, dry afterthought.
  • USE ROOM-TEMP BUTTER: Cold butter creates pockets of steam in the batter, leading to tunnels and uneven texture. Let the butter sit out for 30–60 minutes before creaming—just until it’s soft enough to press a fingerprint into it. No one wants a cake that’s part cake, part butter volcano.

Essential equipment for this dish

Mixer Essentials

You’ll need a stand mixer with a paddle attachment—this is non-negotiable for creaming butter and sugar properly. I use my KitchenAid Artisan Series (about $250) because its powerful motor handles the dense cake batter without overheating.

For budget-conscious bakers, the Hamilton Beach 6-Speed Stand Mixer (around $80) works well for smaller batches. Avoid hand mixers—they can’t aerate butter and sugar enough for tender layers. 💫

Baking Pans

Invest in two 9-inch round cake pans with removable bottoms—I recommend Wilton Perfect Results Pans (about $10 each). These pans distribute heat evenly and prevent cracking. Grease them thoroughly with shortening (not butter) for easy release.

If you don’t have round pans, a 9x13-inch baking dish works for a single-layer version, but texture may vary slightly.

Chocolate Tools

For melting the Hershey’s milk chocolate bars, a double boiler is ideal—it prevents scorching. I use a OXO Good Grips Stainless Steel Double Boiler (around $25). If you’re short on time, a microwave-safe bowl works too, but heat in 30-second bursts and stir between each.

A vegetable peeler (like Mercer Culinary Genius) is perfect for creating delicate chocolate shavings to garnish the top.

Measuring Precision

Accurate measurements are key for this cake. Use a digital kitchen scale (I love the OXO Good Grips Stainless Steel Scale) for the flour, sugar, and cocoa powder—it’s more precise than measuring cups.

For the butter and cream cheese, use the water displacement method (fill a measuring cup with water, add the butter, and measure the overflow). A fine-mesh sieve (like Anolon’s) ensures your dry ingredients are lump-free.

Cooling and Chilling

A wire cooling rack (I use a collapsible silicone one) is essential for cooling the cake layers evenly. For chilling the assembled cake, a large glass cake stand (like West Elm’s) keeps it stable, but a plate or tray works too.

If you’re short on fridge space, place the cake in a cooling drawer (like Breville’s) for faster setting—just monitor the temperature to avoid condensation.

Optional Upgrades

For a professional touch, a piping bag with a star tip (like Wilton’s) helps create clean frosting swirls. A cake comb (available on Amazon) adds decorative ridges to the sides.

If you love texture, toast your pecans in a dry skillet (no oil needed) until golden—this step makes all the difference in flavor. For extra crunch, pulse the nuts in a food processor for even chopping. 🥜

Nutrition facts

Servings 12
Amount Per Serving
Calories 580kcal
% Daily Value *
Total Fat 32g41%
Saturated Fat 20g100%
Cholesterol 145mg48%
Sodium 520mg23%
Total Carbohydrate 72g26%
Dietary Fiber 3g11%
Sugars 58g
Protein 8g16%
* Percent Daily Values are based on a 2,000 calorie diet. Your daily values may be higher or lower depending on your calorie needs.

Frequently asked questions

1

Why does this German chocolate cake recipe use actual Hershey’s bars instead of chocolate chips?

The chocolate bars create a smoother, fudgier texture in both the filling and frosting than chips would. Hershey’s milk chocolate also has a specific flavor profile that’s essential for authentic German chocolate cake—chips often contain stabilizers that alter the taste. For the frosting, melting bars gives you a richer, more velvety consistency.

2

Can I make this cake without a stand mixer?

Yes, but you’ll need to be extra careful with the creaming step. Use a hand mixer and cream the butter and sugar for 8-10 minutes on high, scraping the bowl frequently. For the frosting, beat the cream cheese and powdered sugar by hand with a whisk until smooth, then gradually add the cream. The texture won’t be as light, but it’ll still taste delicious!

3

What’s the best way to store leftovers?

Keep the cake in an airtight container at room temperature for up to 2 days. For longer storage, freeze the unfrosted layers (wrapped tightly) for 3 months and the frosting (in a sealed container) for 1 month. Thaw overnight in the fridge. The frosting may soften slightly when thawed—re-whip briefly to restore texture.

4

How do I fix a cake that’s cracked or domed?

Cracking often happens from overmixing or opening the oven too soon. If your cake domes, gently press down on the center with a spatula while still warm. For cracks, spread a thin layer of leftover frosting over the top—it’ll disguise them and add extra flavor. To prevent doming next time, avoid overfilling the pans and bake 2-3 minutes less than the recipe suggests.

5

Can I substitute pecans with another nut?

Walnut halves or macadamia nuts work well for texture, though the flavor will differ slightly. For a closer match, use 2 cups chopped walnuts or 1.5 cups macadamias. Toast them first—the nutty aroma is key to the cake’s character. Avoid almonds, as they’re too mild and can make the filling taste flat.

★★★★★4.9(11 reviews)
Categories Desserts