This chocolate mayonnaise cake is the first chocolate cake I ever developed, and it's been popular with cake decorators and my clients alike ever since. It's super moist, bakes up with a soft, tight crumb, and has a BIG chocolate flavor thanks to Dutched cocoa powder and my secret ingredient, mayonnaise. If you love the texture of my vanilla cake recipe, this is the chocolate version of that.

Quick Glance at the Recipe: Chocolate Mayonnaise Cake
- Recipe Name: Chocolate Mayonnaise Cake
- Why You'll Love It: Rich, moist, and sturdy enough to stack, carve, or cover in fondant.
- Time and Difficulty: 20 minutes prep + 30 to 40 minutes bake. Intermediate.
- Main Ingredients: Cake flour, Dutched cocoa powder, mayonnaise, butter, sugar, and eggs.
- Method: Bloom the cocoa in boiling water, then mix with the reverse mixing method and bake in three 8"x2" pans at 335º F.
- Texture and Flavor: Soft, tight crumb with a deep, dark chocolate flavor.
- Quick Tip: Let the cocoa and water cool until warm, not hot, before you add the mayo and eggs.
Jump to:
- Quick Glance at the Recipe: Chocolate Mayonnaise Cake
- What Makes This Chocolate Mayonnaise Cake So Good⭐⭐⭐⭐⭐
- ⭐️⭐️⭐️⭐️⭐️ Reader Review
- Chocolate Mayonnaise Cake Ingredients
- How To Make Chocolate Mayonnaise Cake Step-By-Step
- Cake Batter and Frosting Calculator
- Cake Batter and Frosting Calculator
- Cups of Batter Needed
- Cups of Frosting Needed
- Make This Chocolate Mayonnaise Cake Your Own
- Common Chocolate Mayonnaise Cake Problems To Avoid
- Final Thoughts
- Chocolate Mayonnaise Cake FAQs
- More Chocolate Cake Recipes To Try
- Ready To Master Cake Decorating?
- Leave Me A Review⭐️⭐️⭐️⭐️⭐️
- Recipe
What Makes This Chocolate Mayonnaise Cake So Good
⭐⭐⭐⭐⭐
I know mayonnaise sounds a bit odd in a cake, but if you think about it, mayo is just eggs and oil in fluffy form. Two things that go great in cake.
- Mayonnaise. It adds moisture and richness, and I updated my original recipe to use it because it gives the cake a better taste and texture.
- Dutched cocoa powder. It's smoother, darker, and more chocolatey than natural cocoa. That's where the deep, almost reddish color comes from.
- Boiling water. Whisking the cocoa into boiling water first gets it nice and smooth before it goes into the batter.
- The reverse mixing method. Mixing the butter into the dry ingredients first gives you that nice tight crumb that's still soft and moist.
- Butter AND mayo. The butter makes the cake stable enough for stacking and sculpted cakes, so I use this same recipe for wedding cakes and carved cakes.
I never put much thought into cocoa powder until I started testing chocolate cake recipes for my wedding cake clients. Everyone raved about the recipe on the back of the Hershey's can, but when I tried it, it tasted bitter to me and not at all what I was looking for. This is the cake I came up with instead. Looking for a quick one-bowl option? Try my easy chocolate cake.
⭐️⭐️⭐️⭐️⭐️ Reader Review
My go-to chocolate cake recipe! Yummy and moist, but sturdy enough for stacking or carving!!
Catherine F.
Chocolate Mayonnaise Cake Ingredients
I always weigh my ingredients with a digital kitchen scale because measuring in cups is not exact, and who wants to waste butter and vanilla at today's prices?

- Mayonnaise. I use Best Foods (it's called Hellmann's in some parts of the country). Go with a nice neutral mayonnaise. You can replace it with other mayos too. Most mayo has salt in it, so you don't need to adjust the salt. Mayo is made with eggs, so this cake is not egg free unless you're using an egg free mayo, and the recipe has whole eggs in it too.
- Dutched cocoa powder. I like Cacao Barry Extra Brute because it has a fantastic flavor and it's easy to find online. Here's my guide to Dutch processed cocoa powder if you're not sure what you have. Only have natural cocoa? Reduce the baking powder to 1 ¼ teaspoons and increase the baking soda to 2 ¾ teaspoons.
- Water. Boiling, to whisk with the cocoa powder.
- Cake flour. Gives this cake its soft, tight crumb. Bleached or unbleached both work. Don't have any? You can use my cake flour substitute. The texture will just be slightly different.
- Granulated sugar. For sweetness and moisture.
- Unsalted butter. At room temperature, for the cake and the buttercream. Forgot to set it out? Use my room temperature ingredient hacks.
- Eggs. Large, at room temperature.
- Baking powder and baking soda. You need both for the right rise.
- Vanilla extract and salt. In both the cake and the buttercream.
- Pasteurized egg whites and powdered sugar. These make my chocolate buttercream light and creamy without cooking anything.
See the recipe card for the full list of ingredients with quantities.
How To Make Chocolate Mayonnaise Cake Step-By-Step
Before you start, preheat your oven to 335º F and prep three 8"x2" cake pans with cake goop or your favorite pan release. Make sure your butter and eggs are at room temperature, and grab your stand mixer.

- Bring your water to a boil and whisk in the cocoa powder until smooth. Let it cool until it's warm, not hot.

- Whisk in the mayonnaise, vanilla, and eggs to break up the eggs.

- Place your flour, sugar, baking powder, baking soda, and salt in the bowl of your stand mixer with the paddle attachment.
- Add the butter in small chunks with the mixer on low and mix until it looks like coarse sand.

- Add half of the liquid and mix on medium for 2 minutes. This builds the cake's structure.
- Turn the mixer to low and slowly add the rest of the liquid, scraping the bowl once or twice, then mix on medium for 30 more seconds.
PRO TIP: Don't skip the full 2 minutes of mixing. If you do, your cake could collapse.

- Divide the batter between your three pans.
- Bake for 30 to 40 minutes, until the center is set and a toothpick comes out with a few sticky crumbs.

- Cool the cakes in the pans for about 10 minutes, then flip them out onto a cooling rack and cover them in plastic wrap so they don't dry out.
PRO TIP: For carving or stacking, wrap the cooled layers in plastic wrap and give them a short chill in the freezer before carving. Chilled cakes are SO much easier to handle.

- Whip the egg whites and powdered sugar with the whisk attachment on high for 5 minutes.
- Melt 8 ounces of the butter and stir in the cocoa powder until smooth.
- Add the rest of the butter in small chunks and keep whipping until the buttercream is light, white, and creamy.

- Add the chocolate mixture, vanilla, and salt and whip until combined.
- Switch to the paddle and mix on low until the buttercream is smooth with no bubbles. This can take up to 20 minutes.

- Trim your cooled cakes with a serrated knife, then fill and frost with the chocolate buttercream using an offset spatula.

Want to really please the chocolate lover in your life? Swap the buttercream for dark chocolate ganache. New to layer cakes? Here's how to decorate a cake step by step.
Cake Batter and Frosting Calculator
This recipe makes three 8"x2" cake layers. Use the calculator below to adjust the batter for other pan sizes.
Cake Batter and Frosting Calculator
Select an option below to calculate how much batter or frosting you need. Adjust the servings slider on the recipe card to change the amounts the recipe makes.
Choose a pan type
Choose a cake pan size
(based on 2" tall cake pan)
Choose a cake pan size
(based on 2" tall cake pan)
Cupcake Tin Size
Choose number of pans
Cups of Batter Needed
8 cups
Cups of Frosting Needed
5 cups
Note: measurements are estimated based off the vanilla cake recipe using standard US cake pans and sizes. Measurements used are for 2" tall cake pans only. Your results may vary. Do not overfill cake pans above manufacturer's recommended guidelines.
Make This Chocolate Mayonnaise Cake Your Own
- Cupcakes. This batter bakes up beautifully as cupcakes and makes about 36.
- Gluten free. I've made this cake gluten free successfully using Bob's Red Mill 1:1 flour.
- Dairy free. Replace the butter with Earth Balance and leave out the salt, otherwise it can taste really salty.
- Marble cake. Make a batch of this batter and a batch of vanilla batter and marble them together.
- Sculpted and tiered cakes. It's strong enough for a bottom tier (with supports) and can be covered in fondant. It's a soft cake, so chill it well before you handle it. Here's how to stack cakes.
- Doctored box mix. Not into baking from scratch? Try my chocolate WASC.
Common Chocolate Mayonnaise Cake Problems To Avoid
- Sunken middle. If your cake sinks in the center, it wasn't baked all the way. Some ovens run cooler than others, so next time leave the oven closed until the 40 to 45 minute mark before you check it.
- Dry cake. It was baked too long. Start checking at 30 minutes and pull it when the toothpick has a few sticky crumbs.
- Bitter flavor. You have to use Dutched cocoa powder for this recipe. Natural cocoa tastes sharper.
- Cake too soft to handle. Give the wrapped layers a short chill in the freezer before you trim, carve, or stack.
Final Thoughts
This is the first chocolate cake recipe I ever developed, and it's still one of my favorites. People are always impressed with the flavor because it's so rich, and nobody ever guesses the secret is mayonnaise.

Chocolate Mayonnaise Cake FAQs
Can you taste the mayonnaise in chocolate mayonnaise cake?
No. Mayonnaise is just eggs and oil, so it adds moisture and richness, not mayo flavor.
Does it matter what kind of mayonnaise I use?
I use Best Foods, which is the same as Hellmann's, but you can replace it with other mayos. Most mayonnaise has salt in it, and you don't need to adjust the recipe for that.
Can I substitute the mayonnaise with sour cream, yogurt, or buttermilk?
No. Mayonnaise is eggs and oil, so it's not the same as yogurt or buttermilk, and the recipe may not turn out.
Can I use all-purpose flour instead of cake flour?
Cake flour gives the best result, but if you don't have any you can make a cake flour substitute with all-purpose flour. It's fine, the texture will just be slightly different.
How do I store chocolate mayonnaise cake?
Wrap unfrosted layers in plastic wrap to prevent drying out and keep them at room temperature for up to 24 hours. Never store plain, unfrosted cake in the fridge because it dries it out. Once the cake is frosted, it keeps for up to a week in the fridge or 2 months in the freezer.
More Chocolate Cake Recipes To Try
Ready To Master Cake Decorating?
Join Sugar Geek University and learn professional techniques through detailed cake decorating courses, tutorials, and real kitchen demonstrations by
award-winning cake decorator, Liz Marek.

Leave Me A Review
⭐️⭐️⭐️⭐️⭐️
If you tried this Chocolate Mayonnaise Cake or any other recipe on my blog, please leave a 🌟 star rating and let me know how it goes in the comments. I love hearing from you!
Recipe

Equipment
- 3 8" x 2" cake pans
- 1 Electric Stand Mixer with paddle and whisk attachments
- 1 Digital Kitchen Scale
Ingredients
For the cake
- 3 oz Dutched cocoa powder
- 11 oz water
- 5 oz mayonnaise
- 1 tablespoon vanilla extract
- 4 large eggs room temperature
- 19 oz cake flour
- 20 oz granulated sugar
- 2 ¾ teaspoon baking powder
- 1 ¼ teaspoon baking soda
- 1 ¼ teaspoon salt
- 8 oz unsalted butter room temperature
For the chocolate buttercream
- 8 oz pasteurized egg whites room temperature
- 32 oz powdered sugar
- 36 oz unsalted butter room temperature
- 1 tablespoon vanilla extract
- 1 teaspoon salt
- 4 oz cocoa powder
Instructions
- Before you begin: Preheat your oven to 335º F and prepare three 8"x2" cake pans with cake goop or your preferred pan release. Make sure your butter and eggs are at room temperature.
For the cake
- Bring the water to a boil, then whisk in the cocoa powder until smooth. Let the mixture cool until it's warm, not hot.
- Add the mayonnaise, vanilla, and eggs to the cooled cocoa mixture and whisk to break up the eggs.
- Place the flour, sugar, baking powder, baking soda, and salt in the bowl of a stand mixer with the paddle attachment.
- Turn the mixer on low (setting 1 on a KitchenAid) and add the room temperature butter in small chunks. Mix on low until the mixture looks like coarse sand.
- Add half of the liquid ingredients to the dry ingredients and mix on medium for 2 minutes. Don't skip this step or your cake could collapse.
- Turn the mixer back down to low and slowly add the rest of the liquids, stopping once or twice to scrape the bowl. Once combined, turn the mixer up to medium for another 30 seconds.
- Divide the batter evenly between the three prepared pans.
- Bake for 30 to 40 minutes, or until the center is set and a toothpick comes out with a few sticky crumbs. Start checking at 30 minutes.
- Let the cakes cool in the pans for about 10 minutes, or until the pans are cool enough to touch, then flip them out onto a cooling rack. Cover with plastic wrap so they don't dry out and let them cool completely.
For the chocolate buttercream
- Place the egg whites and powdered sugar in the bowl of a stand mixer with the whisk attachment. Combine on low, then whip on high for 5 minutes.
- Set aside 8 oz of the butter and melt it in the microwave until JUST melted. Don't overheat it. Mix the melted butter with the cocoa powder until smooth.
- With the mixer running, add the remaining butter in small chunks and keep whipping until the buttercream is light, white, and creamy. Give it a taste. If it still tastes buttery, keep whipping.
- Add the chocolate mixture, vanilla, and salt and whip until combined, scraping the bowl if needed.
- Switch to the paddle attachment and mix on low until smooth and creamy with no bubbles. This can take up to 20 minutes.
To assemble
- Once the cakes are completely cool, trim them, then fill and frost with the chocolate buttercream.












grace says
do you use two 8x2 pans or two 8x3 pans?
in the pic it looks like a 8x3?
thank you.
Grace
The Sugar Geek Show says
8"x2" pans are what I use
Alice says
Could this cake be used for carving?
The Sugar Geek Show says
Yes it can, just make sure your cakes are always chilled
Silvia says
Hi Liz, thank you so much for teaching us how to bake cakes. Why do you prefer to use dutch cocoa powder? if i use regular cocoa powder should i change the amounts of baking soda?baking powder?
The Sugar Geek Show says
I prefer dutch cocoa powder because it has a richer, more chocolate-y taste and is darker in color.
Shona Tan says
Looks good! Would it be possible to substitute the mayonaise with sour cream/yoghurt/buttermilk?
The Sugar Geek Show says
Mayonaise is eggs and oil so it's not the same as yogurt or buttermilk so the recipe may not turn out
Jesus says
Hey, I wanted to halve your chocolate and vanilla cake recipes but I wasn’t sure about how to halve the amount of eggs, because your recipe calls for 3, should I add one and beat the second egg separately and only add half of it to be like 1 1/2 eggs?
The Sugar Geek Show says
Yes you can do that or you can just use the white or just use the yolk. The small difference will be ok.
Simone says
Hi Liz, I made this cake the other day and I decided it into 3 8” pan and cooked it for 30 min. The cake came out too dry. I also cooked all 3 cakes at one time. Do you think I baked it too long? Could it be that I cook them too close together in the oven? Please help. I need your expert advice.
The Sugar Geek Show says
Yea 30 minutes sounds like a lot for three thin layers, try a little less time next time. I think baking all at once is ok though
Angela Brady says
Hi Liz, I just made this cake and the center sunk. Any advice? TY!
The Sugar Geek Show says
It's hard to say. Did you substitute any of the ingredients? did you use dutched cocoa powder? Did you make sure all the ingredients where room temperature. Did you make sure to follow the mixing directions 🙂
Bryan Williams says
Hello Liz,
I had the same problem. (I always read the comments before starting a new recipe.) I have made this recipe four different times and each time the problem seems to get worse. I didn't substitute ingredients, they were all room temp, I followed the instructions exactly as written. The cake bakes wonderfully, nice slight dome and all. I open the oven after 35 minutes to test. After I have stuck the center with a fresh toothpick, the center collapses. I have also checked the ingredients to make sure they are fresh. I have also tried to using the moistened cake pan wraps, so the center bakes more evenly. My oven bakes perfectly and I have checked for accuracy. When a recipe says 35-45 minutes, my oven will have the item baked in exactly 35 minutes. Any suggestions???? Please and Thank you!
The Sugar Geek Show says
I'm not sure why this happens for some, the only thing I can think is that it's just not baked all the way. Try leaving your cake alone until you reach 40 minutes
Barb says
Do you have a favorite icing recipe for this cake?
The Sugar Geek Show says
I seem to always pair my chocolate buttercream with the chocolate cake 😀 https://sugargeekshow.com/best-chocolate-buttercream-frosting/
cathy armes says
You are so generous to share, thank you! I also bought your incredible book! Do you think I could use this recipe for cupcakes?
The Sugar Geek Show says
Totally! I have used it and it worked perfectly 🙂 This is the updated chocolate cake version from my book 🙂
Sheila says
Hi Liz, thank you for the recipe, what is cake flour? Could it be Self Raising flour?
The Sugar Geek Show says
Cake flour and self-rising flour are not the same. In your area it might be called pastry flour
Brenda Jarmusz says
Liz in my family a chocolate mayonnaise cake was our very favorite and always a go to cake, its rich and moist and has tons of flavor. When my mom died I was 10 and I never got to have that cake again, thank you so much for the recipe my friend as well as bringing back the most amazing memories. I can now make this and smile. She use to make a mint icing to go with it and omg it was divine. My favorite flavors are chocolate and orange together so I will be doing that. Lol. Thanks again liz, as always you rock!!
The Sugar Geek Show says
Oh my gosh that brings a tear to my eye!! The mint icing sounds AMAZING!! Will definitely give that a try <3 Big hugs to you my friend
Brenda Jarmusz says
Awww thank you so much dear friend, you are such a sweetheart. Huge hugs right back at you.
Bouchra M says
Hello, when you say mayonaise.. Does it mean Oil? On the picture it seems to be eggs with milk and oil
The Sugar Geek Show says
I updated the recipe to use mayonnaise because it has a better taste and texture
Lisa says
I don't have cake flour could I use plain flour thank you
The Sugar Geek Show says
Sorry you cannot substitute for cake flour. Check out some of my other recipes that use AP flour 🙂
Chl says
cake flour substitute. For each cup of plain flour remove 1tbl of the flour and replace with cornflour. Mix well to combine before use.
The Sugar Geek Show says
No that does not work the same. AP flour and cake flour are completely different. Using AP flour will result in a very dense, cornbread texture. If you want the cake to turn out like the recipe you must use the ingredients that are called for.
Marion says
I cannot access cake flour in Kenya(Africa) and i would like to try out your recipes. What do i do considering most of your recipes call for cake flour
The Sugar Geek Show says
I'm sorry you cannot access cake flour, I understand that must be frustrating. Unfortunately, I don't have an alternative for you for recipes using cake flour because there is not a substitute. If you use all purpose flour the texture of the cake becomes more like cornbread because of the higher gluten content.
My only suggestion is to try the traditional mixing method instead of the reverse creaming if you are going to use AP flour but I haven't tested it so I can't say for sure if that would work.
Grace says
Hi,can I use the square pan instead of round pan?
Thank you!
The Sugar Geek Show says
You can use any shaped pan you desire
catherine f says
My go-to chocolate cake recipe! Yummy and moist, but sturdy enough for stacking or carving!!
Lisa Gregerson says
Hi Liz, Thank you for recipe. I can hardly wait to bake this beauty. My question, actually confusion, same cake on both your sites, same amount for granulated sugar, but different for flour. All else appears to be the same for both recipes. Which is the flour amount recommended? Anxious for your reply. Lisa G.
Artisan Cake Co.
10 oz cake flour
10.5 oz granulated sugar
Sugar Geek Show
12 oz King Arthur unbleached cake flour
10.5 oz granulated sugar
The Sugar Geek Show says
The recipe on sugar geek show is the most recent and updated version
Corey Day says
Is this still the most updated? Recipe above says 14oz cake flour and 15oz sugar.
The Sugar Geek Show says
Yes the recipe is correct