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!

A slice of the best chocolate cake recipe served on a white plate with a sprinkle of cocoa powder and a fork cutting into it.

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).

Two images showing the batter for a hershey chocolate cake recipe before and after boiling water is added.

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!

Two images showing a homemade chocolate cake being frosted then after it's cut and a slice is on a plate to serve.

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

A slice of the best chocolate cake recipe served on a white plate with a sprinkle of cocoa powder and a fork cutting into it.
Prep 10 minutes
Cook 30 minutes
Total 40 minutes
Save Recipe

Ingredients
  

Chocolate Cake:

Chocolate Frosting:

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

Eggs: room temp eggs allow them to emulsify easier in the batter and help the cake rise properly. If you're short on time, place them in a cup of hot water for a few minutes.
Buttermilk: If you don't have any on hand, follow my recipe to easily make your own, with milk and lemon juice or vinegar.
One Layer Cake: Grease 9×13 inch pan with non-stick cooking spray. Pour batter into prepared pan. Bake at 350 degrees F for 35 to 40 minutes. Cool completely before frosting.
Cupcakes: Line a standard cupcake pan with paper liners and fill 2/3 full with batter. Bake cupcakes for 22 to 25 minutes. Cool completely completely before frosting. Makes 24-30 cupcakes
Bundt Cake: Properly grease and flour the pan and cook the chocolate cake in a 12-cup bundt pan for about 50-55 minutes. Cool for 15 minutes in the pan before inverting onto a wire cooling rack.
Gluten-Free: substitute Bob's Redmill Gluten-Free flour at a 1:1 ratio. Dairy-Free: substitute Almond milk in both the cake and frosting recipes at a 1:1 ratio.
Use Parchment Paper: I always use these pre-cut parchment circles so I don't worry about cake sticking to the pan. 
Make Ahead Instructions: 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. 
Freezing Instructions: 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. 
Recipe adapted from Hershey’s

Nutrition

Calories: 438kcalCarbohydrates: 74gProtein: 6gFat: 15gSaturated Fat: 5gPolyunsaturated Fat: 2gMonounsaturated Fat: 7gTrans Fat: 0.3gCholesterol: 41mgSodium: 364mgPotassium: 186mgFiber: 4gSugar: 48gVitamin A: 245IUCalcium: 66mgIron: 3mg

Create a FREE Account to save your favorite recipes and create meal plans

Follow Me

Get recipe ideas weekly!
Please enable JavaScript in your browser to complete this form.

*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.

Related Posts

Share Recipe

Categories

About The Author

Lauren Allen

Welcome! I’m Lauren, a mom of four and lover of good food. Here you’ll find easy recipes and weeknight meal ideas made with real ingredients, with step-by-step photos and videos.

4.7 9 votes
Recipe Rating
4.94 from 786 votes (427 ratings without comment)
Subscribe
Notify of
guest

896 Comments
Inline Feedbacks
View all comments
Angie
2 months ago

5 stars
This is the best chocolate cake and icing I have ever had – my family loved it and keeps asking me to make it again!

Celeste
5 years ago

5 stars
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!!

Teri Harness
1 year ago

I hear refrigerating or freezing the cake prior to frosting will minimize crumbs when frosting the cake. I am reluctant to do this because I am afraid refrigerating or freezing the cake will dry it out. Anyone have comments on this?

Carol Marr
1 year ago

5 stars
Hi! I’m really excited to make this recipe. Is the butter called for supposed to be salted or unsalted butter? Thanks.

Eileen Finney
1 year ago
Reply to  Carol Marr

5 stars
I make this perfectly chocolate cake all the time. Everyone asks for this cake for their birthdays or any other occasion. I use salted butter in the icing recipe. Also, I use the original recipe that’s located on the back of the Hershey’s cocoa box. this recipe is slightly different in that it uses buttermilk and adds a little extra flour, you won’t be disappointed with this recipe!

shirl
1 year ago

5 stars
Absolutely delicious!! I have no need to
continue my search for the best chocolate cake recipe ,cause this is it! I did add some cake flour in place of some of the flour required and that may have made it a little too moist. But still phenomenal.

Deanna Arrequin
1 year ago

5 stars
Absolutely the best! I’m not a chocolate lover, but I ate 2 pieces of this perfect cake…the crumb, the moistness, the amount of chocolate was right on the mark..will definitely make again…

Julie
1 year ago

LOVE this recipe! It’s always my go-to! QUESTION: am thinking of adding a dash of peppermint extract to the batter and topping with crushed candy cans…..anyone ever try this?

Tonya
1 year ago

Lauren, I’m getting ready to make this cake today. My first time baking a cake from scratch in honor of my mother who passed away last year (she was an amazing baker/cook). Can I use Hershey’s Special Dark Cacao instead (love dark chocolate)? Have you ever used it? Thank you!!!

Jackie
1 year ago

Hi, I am unclear on how many 9X13 pans this makes since you reference cake layers…. If the setting is at 1X do I get 2 pans so I can assemble a 2 tier cake ?

Shafaq Khalid
1 year ago

I am trying this recipe today and as of now my cake is in oven, lets hope it comes out like its said in the recipe..

Meperson
1 year ago

1 star
This was terrible! Followed the directions and got pudding. No where near cake….filled two pans to 3/4 and when it was done they were less than 1/2 inch liquid.

Elle
10 months ago
Reply to  Meperson

Most icing recipes call for unsalted butter to control the salt content. You can add salt as-needed to offset the sweetness by taste. However, I’ve personally used both salted and unsalted and only noticed a slight difference. Both work great IMO.

Mary Ann Cutelli
1 year ago

I have made the Hershey Cocoa chocolate cake several times and have baked it in a 9 x13 pan. It seems that the center of the cake sinks and outer edges seem to get done before that center. Can you suggest any modifications? The cake is still very tasty, and the center pieces just get more icing!

Debbie
1 year ago

Your oven temp may be off, that’s common. Invest in an oven thermometer and check the temp against the temp you set it at.