This German chocolate cake bakes in a 9×9-inch square pan, giving you a tall, tender layer that’s perfect for a small gathering or a weeknight treat. It has the classic sweet coconut-pecan frosting and a rich chocolate crumb, all in one easy pan. Serve it warm with vanilla ice cream or at room temperature with coffee.
Ingredients
- 1 1/2 cups (190 g) all-purpose flour
- 1 cup (200 g) granulated sugar
- 1/2 cup (50 g) unsweetened cocoa powder (natural or Dutch-process)
- 1 tsp baking soda
- 1/2 tsp baking powder
- 1/2 tsp salt
- 1/2 cup (120 ml) buttermilk, at room temperature
- 1/2 cup (120 ml) hot coffee or hot water
- 1/2 cup (120 ml) vegetable oil
- 2 large eggs, at room temperature
- 1 tsp vanilla extract
For the coconut-pecan frosting
- 1 cup (240 ml) evaporated milk
- 1/2 cup (100 g) granulated sugar
- 2 large egg yolks
- 1/2 cup (115 g) unsalted butter, cut into pieces
- 1 tsp vanilla extract
- 1 1/3 cups (120 g) sweetened shredded coconut
- 1/2 cup (60 g) chopped pecans, toasted
Instructions
- Preheat the oven to 350°F (175°C). Grease a 9×9-inch (23×23 cm) square pan and line the bottom with parchment paper.
- In a large bowl, whisk together the flour, sugar, cocoa powder, baking soda, baking powder, and salt.
- Add the buttermilk, hot coffee, oil, eggs, and vanilla. Whisk until the batter is smooth and no lumps remain. The batter will be thin.
- Pour the batter into the prepared pan. Bake for 30–35 minutes, until a toothpick inserted in the center comes out with a few moist crumbs. The cake should pull away from the edges slightly.
- Cool the cake in the pan on a wire rack for 15 minutes, then turn it out onto the rack to cool completely. This takes about 1 hour.
- While the cake cools, make the frosting. In a medium saucepan, whisk together the evaporated milk, sugar, egg yolks, and butter. Cook over medium heat, stirring constantly, until the mixture thickens and turns a light caramel color, about 10–12 minutes. It should coat the back of a spoon.
- Remove from heat and stir in the vanilla, coconut, and pecans. Let the frosting cool to room temperature, about 30 minutes. It will thicken as it cools.
- Spread the frosting over the cooled cake. Serve immediately or refrigerate until serving.
Baking Times and Doneness Cues
Bake the cake at 350°F (175°C) for 30–35 minutes. The cake is done when a toothpick inserted in the center comes out with a few moist crumbs, not wet batter. The top will feel springy to the touch, and the edges will have pulled away from the pan. If you use a thermometer, the center should read about 200°F (93°C).
For a 9-inch round pan, bake for 25–30 minutes. For a 13×9-inch pan, bake for 25–30 minutes as well, but check at 25 minutes. For a half batch, use an 8×8-inch pan and bake for 25–28 minutes. For a double batch, use a 13×9-inch pan and bake for 35–40 minutes.
Scaling the Recipe for Other Pan Sizes
This recipe fits a 9×9-inch pan. To make a half batch, halve all ingredients and use an 8×8-inch pan. To make a double batch, double all ingredients and use a 13×9-inch pan. Adjust baking times as noted above.
If you only have a 9-inch round pan, the batter will fill it about 1 inch deep, and the cake will be slightly thinner. Bake for 25–30 minutes. For a 9-inch springform pan, the cake will be taller, so bake for 35–40 minutes.
What to Serve with German Chocolate Cake
This cake is rich, so serve it in small squares. A scoop of vanilla ice cream or a dollop of lightly sweetened whipped cream balances the sweetness. For a coffee break, serve it with black coffee or espresso. It also works well as a dessert after a simple dinner of roasted chicken or grilled steak.
The coconut-pecan frosting is the signature of German chocolate cake. If you prefer a less sweet frosting, reduce the sugar in the frosting to 1/3 cup (65 g). The texture will be slightly softer.
Storing Leftovers and Keeping the Cake Fresh
Store leftover cake in an airtight container in the refrigerator for up to 4 days. The frosting contains dairy and eggs, so it must stay refrigerated. Let the cake sit at room temperature for 15–20 minutes before serving to soften the frosting.
You can freeze the unfrosted cake for up to 3 months. Wrap it tightly in plastic wrap and then foil. Thaw in the refrigerator overnight, then frost and serve. The frosted cake can also be frozen for up to 1 month, but the coconut may soften slightly.
If you have leftover frosting, refrigerate it in a sealed container for up to 4 days. Use it as a spread for toast or as a topping for ice cream.
Swaps and Variations
Buttermilk: If you don’t have buttermilk, add 1 1/2 teaspoons of lemon juice or white vinegar to 1/2 cup (120 ml) of milk and let it sit for 5 minutes. This will give a similar tang.
Hot coffee: The hot liquid helps bloom the cocoa and deepen the chocolate flavor. You can use hot water instead, but the coffee adds a subtle richness. Use decaf if you prefer.
Pecans: Walnuts are a good substitute for pecans. Toast them in a dry skillet over medium heat for 3–4 minutes until fragrant.
Coconut: Use sweetened shredded coconut for the classic taste. Unsweetened coconut will make the frosting less sweet and slightly drier.
For a gluten-free version, replace the all-purpose flour with a 1:1 gluten-free baking flour blend. The texture will be slightly more tender, and the baking time may be the same.
If you want a more intense chocolate flavor, use Dutch-process cocoa. The cake will be darker and less acidic.
Common Questions About Baking in a 9×9 Pan
Can I bake this cake in a glass pan? Yes, but reduce the oven temperature by 25°F (15°C) to 325°F (165°C) and check for doneness at the low end of the time range. Glass heats more slowly than metal, so the cake may need a few extra minutes.
Why did my cake sink in the middle? The cake may have been underbaked, or the oven door was opened too early. Make sure the oven is fully preheated and avoid opening the door until the minimum baking time has passed.
Can I make this cake ahead of time? Yes, bake the cake a day ahead and store it unfrosted at room temperature, wrapped in plastic. Make the frosting the same day you plan to serve, or up to 2 days ahead and refrigerate it. Bring the frosting to room temperature before spreading.
How do I know when the frosting is done? The frosting is ready when it thickly coats the back of a spoon and a finger drawn through the mixture leaves a clear trail. It will continue to thicken as it cools.
Can I use a hand mixer instead of whisking? Yes, but be careful not to overmix the batter. Whisking by hand is fine and avoids overmixing, which can make the cake tough.
What if I don’t have evaporated milk? You can use 1 cup (240 ml) of whole milk plus 2 tablespoons of dry milk powder, but the frosting may be slightly less thick. For best results, use evaporated milk.
Is this cake safe for pregnant women? The frosting contains raw egg yolks that are cooked with the milk and butter. If the mixture reaches 160°F (71°C) during cooking, it is safe. Use a thermometer to check. If you are concerned, use pasteurized eggs.
Related
- Chocolate Cake Mix and Pumpkin Recipe
- Sheet Pan Lemon Garlic Butter Salmon Recipe
- Honey Garlic Sausage and Sweet Potatoes Sheet Pan Dinner
Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.
Spotted an error? Tell us and we will correct it (corrections policy).
