Desserts
This 9-inch square chocolate cake recipe delivers the perfect balance of rich, fudgy layers and velvety buttery frosting—ideal for birthdays, celebrations, or satisfying dessert cravings. The secret lies in using melted butter for moisture and a precise baking time to ensure even texture throughout.
I've perfected this recipe over years of baking, and it consistently yields a cake that's moist, dense, and packed with chocolate flavor in every bite.
The beauty of this recipe is its simplicity—just a handful of ingredients come together to create a showstopping dessert. You'll bake a single 9x9-inch pan, which makes it perfect for smaller gatherings or when you want to avoid leftovers.
The frosting, made with just powdered sugar and butter, is light yet rich, complementing the deep chocolate flavor of the cake without overpowering it.
What sets this cake apart is its foolproof technique: no fancy equipment required, just a standard oven and basic mixing tools. The cake bakes in 35 minutes at 350°F, resulting in edges that are slightly crisp while the center remains tender and fudgy.
The frosting, spread evenly over the cooled cake, adds a professional finish that makes it look as good as it tastes.
Serve this cake at room temperature for the best texture, or chill briefly for a firmer slice. It's perfect for cutting into generous portions, making it a crowd-pleaser at any occasion. Whether you're baking for a special celebration or just treating yourself, this recipe delivers restaurant-quality results with minimal effort.
Ingredients for 9 inch square chocolate cake
Just twelve ingredients transform into decadent, fudgy chocolate perfection—no shortcuts, all reward.
| Ingredient | Amount | Notes |
|---|---|---|
| Unsalted Butter 🧈 | 1 cup | Melted for moisture |
| Granulated Sugar 🍚 | 1 ½ cups | Light brown preferred |
| All-Purpose Flour 🌾 | 1 ½ cups | Sifted for even texture |
| Cocoa Powder 🍫 | ½ cup | Natural, unsweetened |
| Large Eggs 🥚 | 2 whole | Room temperature preferred |
| Vanilla Extract 🌿 | 1 tsp | Pure, high-quality |
| Baking Powder 🍞 | ½ tsp | Aluminum-free preferred |
| Salt 🧂 | ¼ tsp | Fine sea salt |
| Hot Water 💧 | ½ cup | For blooming cocoa |
| Powdered Sugar 🍚 | 1 ½ cups | For frosting |
| Melted Butter 🧈 | ½ cup | Cooled slightly for frosting |
| Milk 🥛 | ¼ cup | Whole milk preferred |
The cocoa powder is non-negotiable here—natural, unsweetened delivers that deep chocolate flavor. Ghirardelli or Valrhona are my go-tos, but any high-quality brand works. The butter? Unsalted, melted is essential for that velvety moisture. I always grab Land O'Lakes or Plugrá for the best texture. Sifting the flour is worth the extra minute—Bob's Red Mill or King Arthur brands stay light after baking. The eggs? Room temperature ensures even mixing, so pull them out 30 minutes before baking.
No vanilla extract? Vanilla bean paste works too—just halve the amount. Substituting milk? Almond or oat milk can replace, but the cake may be slightly denser. The hot water for blooming the cocoa is key—boiling water will kill the flavor, so use hot tap water. For the frosting, powdered sugar matters—Domino is fine, but Confectioners' sugar brands with cornstarch stay smoother. Short on butter? Coconut oil can replace, but the frosting will be slightly softer.
Store the cake in an airtight container at room temperature for up to 3 days, or refrigerate for 5 days if you're not in a rush. The frosting? Room temperature is best—microwave for 10 seconds if it's too firm. I always bake an extra pan and freeze it for 2 months—perfect for last-minute celebrations. Leftovers? Toasted chocolate cake with a sprinkle of powdered sugar is my go-to. Trust me, it's even better the second time around.
Why You'll Love This Recipe
- No Mixer Needed: I swear by this recipe when my stand mixer’s "on the fritz" again. Creaming butter and sugar by hand? Totally doable—just a few minutes of elbow grease gives you that perfect ribbon stage. The eggs fold right in without overworking the batter, and honestly? The cake’s so moist, no one ever guesses it didn’t come from a fancy kitchen.
- Rich Without Bitterness: Here’s what sold me—the cocoa powder isn’t overpowering, but it lingers in the best way. That butter-sugar base? Pure velvety decadence, and the eggs add just enough structure to keep it from turning into a dense brick. (Yes, even on a Tuesday night.) It’s the kind of chocolate cake that makes you close your eyes and sigh.
- Portion Control Perfection: A 9-inch pan means single servings or crowd-pleasing slices—no wasted leftovers. I’ve used it for my book club’s dessert, my kid’s birthday, and even as a "just because" treat for myself. The edges get that perfect golden crust while the center stays fudgy, so every bite feels special. No sad half-cake in the fridge here.
- Pantry Staple Magic: Between us, this recipe uses things you already have. Butter, sugar, flour, cocoa—no weird substitutions or hard-to-find ingredients. And because it’s a square pan, you can even make it ahead and reheat slices for a quick breakfast or after-dinner indulgence. Budget-friendly? Absolutely. Reliable? Even more so.
Step-by-step instructions for 9-Inch square chocolate cake
Here's how to bake decadent, fudgy chocolate layers with velvety buttercream that'll impress everyone.
👨🍳 Step 1: Prepare the Cake Batter
Preheat your oven to 350°F and grease a 9-inch square baking pan with the 1 cup unsalted butter, then line it with parchment paper. Melt the butter in a heatproof bowl over simmering water, then let it cool slightly to 110°F—it should be warm but not hot to the touch.
In a separate large bowl, whisk together the 1.5 cups granulated sugar, 1.5 cups all-purpose flour, 0.5 cup cocoa powder, 0.5 teaspoon baking powder, and 0.25 teaspoon salt. Sift the dry ingredients together to avoid lumps, then create a well in the center. Add the 2 whole large eggs and 1 teaspoon vanilla extract.
Gradually pour in the melted butter while mixing on low speed until just combined. Then, slowly whisk in the 0.5 cup hot water until the batter is smooth and glossy. The batter will be thick—this is perfect for that rich, fudgy texture we're after. Divide the batter evenly between two 4x4-inch ramekins or small bowls for easier layering.
🔥 Step 2: Bake the Layers
Pour half of the batter into your prepared 9-inch square pan, spreading it evenly with a spatula. Bake for 15-18 minutes until the edges are set and a toothpick inserted in the center comes out with moist crumbs—it shouldn't be completely clean, as we want a fudgy texture. Rotate the pan halfway through for even baking.
Remove the pan from the oven and let the first layer cool for 10 minutes before repeating with the remaining batter. Bake the second layer for the same 15-18 minutes. Here's the thing—don't overbake! The cakes will continue cooking as they cool, and slightly underdone layers ensure maximum moisture.
🥘 Step 3: Assemble with Buttercream
While the cakes cool, prepare the buttercream by beating the 1.5 cups powdered sugar with the 0.5 cup melted butter (cooled to room temperature) and 0.25 cup milk until light and fluffy. Add a pinch of salt if needed to balance sweetness. This should take about 3-4 minutes with a hand mixer.
Once both cake layers have cooled completely, place the first layer on a serving plate. Spread a generous layer of buttercream over the top, then place the second layer on top. Press down gently to create an even surface. Here's where it gets fun—use a long serrated knife to level the top if needed, then spread the remaining buttercream evenly over the entire cake.
⏰ Step 4: Chill and Serve
Refrigerate the cake for at least 1 hour before slicing. This chilling time is crucial—it allows the flavors to meld and the buttercream to set properly. The cake will hold its shape better when sliced, and the layers won't slide apart. For best results, serve at room temperature after chilling.
Cut into squares and admire that perfect balance of dense, fudgy chocolate layers and velvety buttercream. Each bite should deliver rich cocoa flavor with a tender crumb and creamy frosting that melts in your mouth. Store leftovers covered in the fridge for up to 3 days or freeze for longer storage.
Pro Tips For Making 9 Inch Square Chocolate Cake
- MELT BUTTER SLOWLY: I used to dump cold butter straight into the hot batter and wonder why my cake turned out dense. Instead, melt the butter first—just until it’s liquid but not browned—then let it cool slightly before mixing. This keeps the fat from cooking the flour too fast, which ruins the texture.
- SIFT DRY INGREDIENTS: Skip the sifting, and your cake might end up with pockets of uneven texture. For a 9-inch pan, sift the flour and cocoa powder together over the batter in two passes—this cuts out lumps and ensures the cocoa distributes evenly. (Yes, even if you’re impatient like me.)
- BAKE UNTIL SPRINGY: The cake’s done when the edges pull away from the pan and a toothpick comes out with moist crumbs, not wet batter. Overbaking dries it out, so check at 25–30 minutes (depending on your oven) and tent with foil if the top browns too fast.
- WHISK EGGS ROOM TEMP: Cold eggs? They’ll sink in the batter like rocks. Let them sit in warm water for 5 minutes before cracking, or whisk them briefly with a pinch of sugar first. This helps them blend smoothly and gives you a lighter crumb—no one wants a cake that feels like fudge.
Make-ahead tips for this dish
Bake Ahead Prep
This cake is perfect for baking 24 hours ahead—just assemble and frost it the day before your event. The flavors deepen as it sits, and the buttercream actually improves in texture. Store the fully assembled cake in an airtight container at room temperature, covered loosely with plastic wrap.
I always do this for parties—it saves last-minute stress and guarantees perfect slices every time. 💫
Freezer-Friendly Layers
Bake the cake layers up to 3 months ahead and freeze them individually wrapped in plastic wrap and aluminum foil. Thaw at room temperature for 2-3 hours before assembling. Pro tip: Freeze the layers on a tray first to prevent sticking, then wrap.
When you're ready to serve, just frost and chill as directed. This is my go-to for holiday baking—no one knows it wasn't made fresh! ❄️
Frosting Make-Ahead
Prepare the buttercream 3 days ahead and store it in the fridge in an airtight container. When ready to use, let it sit at room temperature for 15-20 minutes before whipping it back to fluffy perfection.
I often make extra frosting and use it for cupcakes or cookies too—versatile and delicious. Just add a splash of milk if it seems too stiff after refrigeration. 🧈
Portion Control
For easy serving, cut the cake into 12 equal squares (3x4 grid) while still chilled. Wrap individual portions in parchment paper and store them in a single-layer container.
This prevents sogginess and makes it perfect for lunches or quick treats. Label with the date—trust me, you'll forget how long it's been sitting there! 📅
Reheating Leftovers
Toast slices in the oven at 300°F for 5-7 minutes to restore freshness. For a quick fix, microwave on medium power for 10 seconds—just enough to soften the frosting without drying out the cake.
I like to sprinkle a little extra powdered sugar on reheated slices for that bakery-fresh look. Leftovers keep well for 5 days in the fridge or 2 months in the freezer. 🔥
Gift-Worthy Packaging
Wrap individual squares in parchment paper, then place them in a rigid gift box with a ribbon. Add a small jar of extra frosting on the side for dipping. I've sent these as gifts for birthdays and holidays, and they're always a hit.
For extra flair, dust the top with powdered cocoa before wrapping. Presentation matters almost as much as taste! 🎁
Nutrition facts
Frequently asked questions
Why does this recipe use melted butter instead of softened?
Melted butter creates a richer, more tender crumb in the cake. When butter is melted, it distributes evenly throughout the batter, resulting in a moist, fudgy texture rather than a dry or cakey one. The butter should be warm but not hot (110°F) when mixing to avoid cooking the eggs in the batter.
Can I bake this cake in a different pan size?
Yes, but you'll need to adjust the baking time. For a 9x13-inch pan, bake for 25-30 minutes total (divide batter into two layers, baking each for 15 minutes). For a 8-inch square pan, reduce baking time by 3-5 minutes per layer. Always check with a toothpick for doneness.
What if my cake comes out too dry?
Overbaking is the most common cause. The cake should have moist crumbs on the toothpick, not be completely clean. If it's dry, try increasing the melted butter by 1 tablespoon next time or adding 1 tablespoon of milk or coffee to the batter for extra moisture. Also, ensure your oven isn't running hot—use an oven thermometer to check.
How do I make this recipe gluten-free?
Replace the all-purpose flour with a 1:1 gluten-free baking flour blend (like Bob's Red Mill or King Arthur). You may need to add 1/4 teaspoon xanthan gum if your blend doesn't contain it. Also, reduce the hot water by 1 tablespoon since gluten-free batters can be wetter. Test with a small batch first to adjust texture.
Can I add mix-ins like nuts or chocolate chips?
Fold in 1/2 cup chopped walnuts or pecans or 1/2 cup chocolate chips after mixing the batter. For best results, use semi-sweet chocolate chips and add them to the batter just before baking. Keep portion sizes small—too many mix-ins can make the cake dense.
