There's a reason the Hershey Chocolate Cake recipe has been the best chocolate cake recipe for decades! It's soft, moist, and has the perfect chocolate flavor, and don't even get me started on that homemade chocolate frosting! This one of our favorite desserts!

The Only Chocolate Cake Recipe You'll Ever Need.
This is one of the very first recipes I ever shared here on TBFS, back in 2010. I've made it hundreds of times, and my kids now make it on their own, too. Thank you Hershey's! Some changes I've made to improve the original recipe are using hot coffee, instead of water (to boost the rich flavor) and adding buttermilk instead of plain milk (for a more tender and moist cake).
I recommend freezing the baked cake rounds ahead of time, and then frosting them right out of the freezer, for super easy prep. Once you see how easy homemade chocolate cake is, you'll never buy a box mix again.
Don't miss all of my cake recipes, including Yellow Cake, Carrot Cake, Biscoff Cake, or Flourless Chocolate Cake.
How to make Chocolate Cake:
Make Cake Batter: Combine sugar, flour, cocoa, baking powder, baking soda, and salt. Add eggs, buttermilk, oil, and vanilla then mix. While stirring, slowly pour in the boiling water or hot coffee, mixing to incorporate (the batter will be thin).

Bake: Carefully pour cake batter into prepared pans and bake at 350°F(180°C) for 30-35 minutes, or until a toothpick inserted in the center comes out clean. Let cakes cool in the pan for a few minutes then invert onto a cooling rack. Let the cakes cool completely before frosting.
Frosting: mix butter and cocoa powder then add powdered sugar, milk, and vanilla. Mix for several minutes until it has a smooth and fluffy texture.
Assemble and Frost: Carefully transfer one cake layer to your serving tray. Spread a generous amount of frosting on top then place the second cake layer on top. Use a cake spatula to frost the top and sides of the cake with remaining frosting. Slice and enjoy!

Recipe Variations:
- 9×13 Cake: Spray a 9×13 pan with cooking spray then pour the batter. Bake at 350°F (180°C) for 35-40 minutes. Let cool completely then frost and serve.
- Cupcakes: Place cupcake liners in a muffin pan then fill each one 2/3 of the way full with batter. Bake for 22-25 minutes then let them cool completely before frosting. This recipe makes 24-30 cupcakes.
- Bundt Cake: Grease and flour a 12 cup bundt pan then pour in batter. Bake for 50-55 minutes then let cool in the pan for 15 minutes. Invert on a wire cooling rack and let cool completely before frosting.
- Gluten-Free: Use a 1:1 ratio of Bob's Red Mill Gluten-Free Flour instead.
- Dairy-Free: Instead of cow's milk, use almond milk in the cake and frosting with a 1:1 ratio.
Make Ahead and Freezing Instructions:
To Make Ahead: The cakes and the chocolate frosting can both be made ahead of time. Store frosting in an air-tight container in the fridge for up to two weeks, or in the freezer for up to three months. Let frosting come to room temperature (I also like to re-whip it, with electric beaters), until soft and smooth.
To Freeze: Allow the cakes to cool completely then wrap each layer in plastic wrap and place in a freezer bag. Freeze for up to three months. Fully frosted cake can also be frozen, if covered really well.
More Cake Recipes:
Follow me for more great recipes
Recipe

Hershey Chocolate Cake
Equipment
Ingredients
Chocolate Cake:
- 2 cups granulated sugar (400g)
- 1 ¾ cup + 2 Tablespoons all-purpose flour (235g)
- 3/4 cup unsweetened cocoa powder (64g)
- 1 1/2 teaspoons baking powder
- 1 1/2 teaspoons baking soda
- 1 teaspoon salt
- 2 large eggs , room temperature*
- 1 cup buttermilk* (227g)
- 1/2 cup oil (99g), (vegetable or canola oil)
- 2 teaspoons vanilla extract
- 1 cup boiling water (237g), or hot coffee
Chocolate Frosting:
- 1/2 cup melted butter (113g)
- 2/3 cup unsweetened cocoa powder (57g)
- 3 cups powdered sugar (360g)
- 1/3 cup milk (83g)
- 1 teaspoon vanilla extract
Instructions
- Preheat oven to 350°F(180°C). Line two 8 inch round baking pans with parchment paper* and then spray lightly with non-stick cooking spray. Set aside.
- Dry Ingredients: Stir together sugar, flour, cocoa, baking powder, baking soda and salt in large bowl.
- Add eggs, milk, oil and vanilla and mix until well combined. Stir in boiling water (or hot coffee). Batter will be thin. Pour batter into prepared pans.
- Bake 30 to 35 minutes or until a toothpick inserted in the center of the cake comes out clean.
- Chocolate Frosting: Combine butter and cocoa powder. Add powdered sugar, milk, and vanilla extract. Mix for several minutes until smooth and fluffy.
- Assemble: Place one cake layer on serving tray. Spread a generous amount of frosting on top. Add second cake layer. Frost top and sides of cake with remaining frosting. Cut and serve.
Notes
Nutrition
Create a FREE Account to save your favorite recipes and create meal plans
Follow Me
*I originally shared this recipe June 2010. Updated June 2019, April 2021 and April 2023 and February 2025.
The material in this blog post references the trademarked brand “Hershey’s.” The use of this trademark is for informational and editorial purposes only and does not imply sponsorship or endorsement by The Hershey Company.
This post contains affiliate links.
This is the best chocolate cake and icing I have ever had – my family loved it and keeps asking me to make it again!
This is a keeper! Absolutely delicious, just the right amount of chocolate taste and super easy recipe! Made it for my sister’s birthday and everyone said it was the best chocolate cake they have ever tasted!! WOW!!
This is, hands down, the best chocolate cake I’ve ever made or eaten! I used the dark Hershey’s cocoa versus the regular as I’m a fan of darker chocolate. It is truly amazing. I’m one of those people who bought boxed mixes not only for convenience but because the cakes were moister than the from-scratch cakes I’d eaten and made. I am really trying to make “real” food (and avoid sugar and carbs but it was for my birthday, so…) so I searched for great chocolate cake recipes and decided on this one. The cake came out just this side of a brownie – not as dense but rich and really moist. And the flavor is divine! The dark cocoa gave it that slight bitterness and extra chocolate flavor that I enjoy. FYI, this was the same recipe on the dark cocoa container, except that it uses buttermilk instead of regular milk. Use the buttermilk – this cake is perfect! Thank you!!!
Excellent recipe and perfectly moist. My family and friends loved it!
Do you know how I would adjust this recipe for a 12″ square cake?
This recipe makes about 12 cups of batter, so you’d need to know the volume of batter your 12” pan holds and then you’ll be able to calculate that. Hope that helps 🙂
Is there anything I can substitute for the buttermilk? Would regular milk work? It’s not about not having it on hand..it’s a food sensitivity issue. Thanks!
Yes, regular milk would work great!
Hello,
So I’ve made the German Chocolate cake a ton of time! It’s a favorite! We all love it so so much! So my question is this. When I make the chocolate frosting I always have lol chocolate chunks in it. I use a standing kitchen aid mixer and mix it well. But when I add the chocolate to the melted butter it has little chunks. What am I doing wrong?
Hi Sophia, are you using softened butter, or melted butter?
Im gluten free so could not enjoy it, but I used this exact recipe to make a cake for my son’s birthday and everyone said it was so delicious. Incredibly easy to make! I agreed I wasnt sure about the boiling water, but I followed the directions and it came out perfectly. I did (2) 9″ rounds for 35 minutes at the prescribed temp and let it cool. I would not change one thing
I have made this cake for years–it’s a family favorite and is always in the oven for birthdays and special occasions. It is so moist and delicious. I did notice that you add one cup of boiling water to the batter–my recipe calls for one cup of strong black coffee. I’m not sure that it makes a difference-I’ve never made it with water. Can’t improve on perfection–will continue to use coffee. We call this “Black Magic Cake”.
The name says it all. It is perfect. I’ve made cupcakes, and now a layer cake for our granddaughter’s graduation. Her request.
No more searching for me!
I’m so happy you’ve enjoyed it as cake and cupcakes! Thanks for sharing.
Can I bake this in a 10” round pan? Also can it be used for an ice cream cake?
It will be more batter than you need for one ten inch pan, but you could use the extra batter for cupcakes. Yes, it would work for an ice cream cake!
My favourite chocolate cake recipe so far. So moist and tastes nice. I didn’t use the frosting because I prefer less sweet creams. Will use this as my base for sure.
When we melted the butter we ended up with clumps of powdered sugar. What did we do wrong?.
Were you using electric mixers, or just stirring by hand? Mixers should help smooth out any lumps from the powdered sugar.