Chocolate Mayonnaise Cake

This chocolatey cake is ultra-fudgy and rich and bakes up deliciously moist every time. What’s the secret? Mayonnaise. Mayo may seem like an unusual ingredient for cake batter, but it’s a classic, old-fashioned hack used to create a cake with a decadent, tender crumb. Even better news? This cake is made with a handful of pantry staples and requires one bowl; there’s no need for an electric mixer. In my opinion, there’s no need for frosting either! Having said that, the chocolate frosting on this cake is divine. It’s so delectable (and easy), you’ll want to spread it over all your baked goods from this day forward.

This recipe was written for the Arizona Republic.
Why use mayonnaise in chocolate cake? Historically, mayonnaise was used in cake batters when eggs were scarce, namely during times of rationing and World War II. And it makes sense. Most cake batters require eggs and oil, and mayo is a shelf-stable marriage of both ingredients.
The ingredients in mayonnaise – an emulsion of oil, eggs, and acid (lemon juice or vinegar) – can easily replace those individual components in cake batter, especially chocolate cake where the cocoa powder can mask any hint of mayonnaise.
But there’s more:
- The high oil content of mayonnaise helps keep the cake from drying out, even after several days.
- The acidity of mayo reacts with the baking soda and encourages the cake to rise.
- Mayo acts as a tenderizer, creating cakes with a velvety, moist crumb.
- Creamy mayonnaise is a convenient, affordable substitution for eggs and oil.

Here’s what you need for this chocolate mayonnaise cake
For the cake:
- Flour. Choose your favorite all-purpose flour for the cake batter. You will need 2 cups. Pro tip: When measuring, spoon the flour into the cup and level it off with a knife. Do not scoop the flour with the measuring cup or you risk adding too much to the batter.
- Sugar. Granulated sugar is used to add sweetness to the batter and it transforms the unsweetened cocoa powder into a sweet chocolate base for the cake.
- Leavening. We use baking soda in the batter to ensure the cake rises. Make sure your baking soda is fresh (not expired) for the best result. When in doubt, purchase new baking soda before baking.
- Vanilla. Choose pure vanilla extract (not imitation vanilla) for superior flavor.
- Cocoa powder. Unsweetened cocoa powder is used to create the chocolate cake batter. You may use any variety, including natural and Dutch process. Pro tip: Natural cocoa powder is acidic and fruity and works best when paired with baking soda, while Dutch process is milder (more alkaline) and best when partnered with baking powder. That said, both natural and Dutch process cocoa will work in this recipe.
- Mayonnaise. Any variety of mayonnaise can be used in this recipe, including brands made with olive oil and avocado oil. I prefer full-fat mayonnaise, but reduced-fat will suffice. Note: Low-fat mayonnaise may change the texture of the cake and make it slightly chewy.
- Water. Lukewarm water is partnered with the mayonnaise to add liquid to the batter. Make sure your water is lukewarm and not cold to ensure the cake rises effortlessly when baking.

For the frosting:
- Butter. One stick (1/2 cup) of butter is used in the frosting. I prefer unsalted butter but salted is fine. To ensure the butter whips up creamy and smooth, bring it to room temperature before using.
- Powdered sugar. Also called confectioners’ sugar, powdered sugar is used in the frosting because the fine powder melds beautifully into the butter, creating a smooth, fluffy frosting.
- Cocoa powder. Cocoa powder is added to create a chocolate frosting. You may use natural or Dutch process.
- Milk. Milk adds creaminess to the frosting and provides the added moisture needed for the powdered sugar. I prefer whole milk for its richness, but low-fat and skim milk will do.
- Vanilla. Pure vanilla extract adds a touch of sweetness and caramel-like flavor to the chocolate frosting.

A few tips for the best result
- Don’t overmix the batter. To prevent a chewy cake, mix the cake batter until just blended (until you can no longer see the dry ingredients). This cake batter is thick, so use a spatula or wooden spoon to blend the ingredients.
- Don’t over-bake the cake. This cake doesn’t take long to cook so start checking it at 18 minutes. The cake is finished cooking when a wooden pick comes out with moist bits clinging to it.
- Let the cake cool before frosting. Allow your cake to cool completely before frosting. This should take about 2 to 3 hours. If you try to frost the cake while it’s still warm, the frosting will turn runny and slide off.

How to store leftovers. Thanks to the addition of mayonnaise, this cake stores quite well, both frosted and unfrosted. Truth is, the frosting helps seal in the cake’s moisture; this protective barrier will keep the cake moist for an extra day or two.
To store the cake, cover any cut areas with plastic wrap and then cover the entire cake with a cake dome. If you don’t have a cake dome, use an airtight container. Store the cake at room temperature for 2 days, or slightly longer (3 to 4 days) for frosted cake.
You may also store the cake in the refrigerator for up to 5 days or freeze up to 3 months. Just make sure the cake is completely cool before storing in the fridge or freezer. In addition, when storing in the refrigerator or freezer, ensure the cake is well covered with two layers of plastic wrap, or stored in an airtight container. Thaw frozen the cake overnight in the refrigerator.


Chocolate Mayonnaise Cake
Ingredients
For the cake
- 2 cups all-purpose flour
- 1 cup granulated sugar
- ½ cup unsweetened cocoa powder
- 2 teaspoons baking soda
- 1 cup mayonnaise, preferably full-fat
- 1 cup plus 2 tablespoons lukewarm water
- 1 teaspoon vanilla extract
For the frosting
- 1/2 cup 1 stick butter, softened to room temperature
- 3 cups powdered sugar, divided
- 2/3 cup cocoa powder
- 6 tablespoons milk, divided
- 1 teaspoon vanilla extract
Instructions
- To make the cake, preheat oven to 350 degrees F. Coat a 9×13-inch baking dish with cooking spray or a thin layer of neutral oil or butter.
- In a large bowl, combine the flour, granulated sugar, ½ cup of cocoa powder, and baking soda. Add the mayonnaise, water, and teaspoon of vanilla extract and mix until just blended. The mixture will be thick.
- Transfer the mixture to the prepared pan and spread out in an even layer. Bake for 18 to 24 minutes, until a wooden pick comes out with moist bits clinging to it.
- Cool the cake in the pan, on a wire rack. Cool the cake completely before frosting.
- To make the frosting, in a large mixing bowl, combine the butter, 1 cup of the powdered sugar, 2/3 cup of cocoa powder, and two tablespoons of the milk. Beat until well blended. The mixture will be thick.
- Add the remaining 2 cups of powdered sugar, 4 tablespoons of milk, and teaspoon of vanilla extract and beat until smooth and creamy.
- Once the cake has cooled, spread the frosting all over the top.