Chocolate Mayonnaise Bars are rich, old-fashioned chocolate bars with a moist, fudgy crumb and a simple cocoa frosting on top. They eat like a cross between a snack cake and a brownie, but with a softer bite.
Mayonnaise sounds odd until you taste it, but it makes these bars really tender and keeps them from drying out. I like this version because it’s reliable, not fussy, and it slices clean once the frosting sets.
These are one of my favorite 9×13 desserts for potlucks, cookie trays, and weekend baking. They’re especially good with a glass of cold milk or a strong cup of coffee.

Why You’ll Love This Recipe
Soft, tender bars: The mayonnaise keeps the crumb moist and cake-y in the best way, even after they’ve been sitting for a bit.
Deep chocolate flavor: Cocoa in the batter and cocoa in the frosting makes these taste like the classic “mayo cake” everyone talks about.
No mixer needed: This is an easy whisk-and-stir situation, and the frosting comes together quickly on the stove.
Easy to slice and share: A 9×13 pan gives you plenty of servings, and they’re sturdy enough for lunches and bake sales.
Nuts are optional: I like a handful of chopped walnuts or pecans for texture, but you can skip them and keep the bars smooth.
Ingredients You’ll Need
Chocolate Bars
- All-purpose flour: I use regular flour here. Spoon and level if you tend to pack your measuring cup.
- Granulated sugar: Keeps the bars sweet and classic, like an old-school sheet cake.
- Unsweetened cocoa powder: Any standard unsweetened cocoa works. If your cocoa is lumpy, whisk it well so you don’t get bitter pockets.
- Baking soda: This is the main lift in the batter, so make sure it’s fresh.
- Fine salt: Don’t skip it. It keeps the chocolate from tasting flat.
- Mayonnaise: Full-fat mayonnaise gives the best texture. It sounds strange, but it just acts like the oil-and-egg part of a cake.
- Water: Keeps the batter easy to spread and helps the cocoa bloom a bit.
- Vanilla extract: I like real vanilla here, but use what you have.
- Walnuts or pecans (optional): Chop them fairly small so the bars slice neatly. Totally optional if you want a smooth bite.
Chocolate Frosting
- Unsalted butter: Butter gives this frosting that classic fudge-frosting taste. If you only have salted, just go easy on the added salt.
- Unsweetened cocoa powder: Same cocoa as the bars is fine. It melts into the butter and turns glossy.
- Powdered sugar: Sift if it’s clumpy, especially if you want a really smooth top.
- Milk: This loosens the frosting. Add a splash more if you want it thinner and more spreadable.
- Vanilla extract: Just enough to round out the cocoa.
- Salt: A small pinch makes the frosting taste more like chocolate and less like straight sugar.

Recipe Instructions
- Preheat the oven: Heat the oven to 350°F and grease a 9×13-inch baking pan.
- Mix the dry ingredients: In a large bowl, whisk the flour, sugar, cocoa powder, baking soda, and salt until it looks uniform.
- Mix the wet ingredients: In a separate bowl, whisk the mayonnaise, water, and vanilla until smooth.
- Make the batter: Pour the wet mixture into the dry ingredients and stir just until combined and you no longer see dry flour.
- Add the nuts: Fold in the chopped walnuts or pecans, if using.
- Bake: Spread the batter evenly in the pan and bake for 23 to 28 minutes, until a toothpick comes out with a few moist crumbs.
- Cool: Let the bars cool completely in the pan before frosting.
- Melt the butter: For the frosting, melt the butter over low heat.
- Add the cocoa: Whisk in the cocoa powder until smooth, then remove from the heat.
- Finish the frosting: Whisk in the powdered sugar, milk, vanilla, and a pinch of salt until thick and spreadable, adding a little more milk if needed.
- Frost and slice: Spread the frosting over the cooled bars, let it set, then slice into squares.

Some of my tips!
This is the part that really makes a difference. If you only read one section, make it this one because this is where I share the little trick that helps the recipe turn out so well.
Recipe Tips & Tricks
Use full-fat mayonnaise. Light mayo can work in a pinch, but the bars usually bake up a little less tender. Full-fat gives the best texture and the most consistent results.
Don’t overmix once the flour is in. Stir just until the batter comes together. Overmixing makes the bars tougher and a little dry around the edges.
Pull them when you see moist crumbs. A clean toothpick usually means they’re overbaked for this style of bar. You want a few moist crumbs so the centers stay fudgy as they cool.
Cool completely before frosting. If the bars are even slightly warm, the frosting can melt and turn runny. Waiting is worth it here.
Adjust the frosting with a splash of milk. If it feels too thick to spread smoothly, add a tiny bit more milk and whisk again. It thickens as it sits.
Make some touches!
There are plenty of easy ways to serve this depending on the occasion. Keep it simple, or add a few small touches to make it feel a little more special.
Serving Suggestions
- Milk: A cold glass of milk is simple and classic with these bars. It’s especially nice if you cut them a little smaller since they’re rich.
- Coffee: These are really good with hot coffee, especially if you like your desserts on the more chocolatey side. I usually go with black coffee or a latte.
- Ice cream: Serve a square with vanilla ice cream on the side for an easy dessert plate. A little chocolate sauce is fine too, but not required.
- Fruit: Fresh strawberries or raspberries are nice alongside the bars. It makes the plate feel a bit lighter.
Save it for later
This section covers how to store leftovers and what parts of the recipe you can prepare ahead of time.
Storage and Make Ahead
Store the bars covered at room temperature for 2 to 3 days. If your kitchen runs warm, I usually move them to the fridge so the frosting stays set.
Store leftovers covered in the fridge for up to 5 days. The bars get a little firmer when chilled, which I actually like for cleaner slices.
You can make these a day ahead and frost them once they’re fully cool. If you’re stacking pieces, put parchment or wax paper between layers so the frosting doesn’t stick.
If you want them longer-term, you can freeze individual portions in an airtight container. Thaw in the fridge overnight or at room temperature until soft enough to bite.

A few quick answers
This section covers a few extra details that may help before you head to the recipe card.
Recipe FAQs
Do the bars taste like mayonnaise?
No. The mayo just makes the crumb tender and moist, and the cocoa and vanilla fully take over the flavor.
Can I use light mayonnaise?
You can, but the texture is usually better with full-fat mayonnaise. If light mayo is what you have, the bars may bake up a little less rich and a bit more cake-y.
How do I know when they’re done?
I look for set edges and a toothpick that comes out with a few moist crumbs. If it’s totally clean, they’ve probably gone a minute or two too long for that fudgy texture.
Can I make this dairy-free?
Yes. Use plant-based butter and non-dairy milk in the frosting. The bars themselves are already dairy-free as long as your mayonnaise is.
Can I skip the nuts or use a different mix-in?
Skip them if you want a smooth bar. You can also swap in chopped pecans for walnuts, or use mini chocolate chips if you want more texture.
You might also like
Before you go, take a look at a few other recipes below the recipe card. They use similar ingredients in a different way and are worth saving too.

Chocolate Mayonnaise Bars
INGREDIENTS
Chocolate Bars
- 2 cups all purpose flour
- 2 cups granulated sugar
- 1/2 cup unsweetened cocoa powder
- 1 1/2 tsp baking soda
- 1 tsp fine salt
- 1 cup mayonnaise
- 1 cup water
- 2 tsp vanilla extract
- 1 cup chopped walnuts or pecans optional.
Chocolate Frosting
- 1/2 cup unsalted butter
- 1/4 cup unsweetened cocoa powder
- 3 cups powdered sugar
- 1/4 cup milk plus more as needed
- 1 tsp vanilla extract
- pinch of salt.
INSTRUCTIONS
Bake Bars
- Heat oven to 350 F and grease a 9 by 13 inch baking pan
- whisk flour sugar cocoa baking soda and salt until uniform
- whisk mayonnaise water and vanilla until smooth then stir into dry ingredients just until combined
- fold in nuts if using
- spread batter evenly in pan and bake until a toothpick comes out with a few moist crumbs 23 to 28 minutes
- cool completely in pan before frosting.
Make Frosting
- Melt butter over low heat then whisk in cocoa until smooth
- remove from heat and whisk in powdered sugar milk vanilla and salt until thick and spreadable adding a little more milk if needed
- spread frosting over cooled bars and let set before slicing.
