Moist White Chocolate Coconut Cake
A soft, tender cake that gets its richness from melted white chocolate and full-fat coconut milk. Toasted coconut folded through the batter and sprinkled on top gives it a gentle crunch and a deep, nutty sweetness. It all comes together in one pan, with a quick cream cheese frosting you whip up while the cake cools.

It is the kind of cake you can mix on a Tuesday and serve to friends on Saturday. Nothing fussy, just a reliable, coconut-forward dessert with a creamy white chocolate finish that feels special without a long to-do list.
Why This Cake Works
The melted white chocolate does more than add flavor. It replaces some of the fat in the batter, so the crumb stays moist for days without being greasy. You taste the white chocolate clearly against the toasted coconut, not just sweetness.
Using canned coconut milk instead of regular milk deepens the coconut flavor without any extract or artificial taste. The cream cheese frosting is tangy enough to cut through the richness, and a final scatter of toasted flakes makes every bite a little crisp at the edges.
Ingredients

- 1 1/2 cups all-purpose flour: use the spoon-and-level method for a tender crumb.
- 1 tsp baking powder:
- 1/2 tsp baking soda:
- 1/2 tsp salt:
- 1/2 cup unsalted butter: cut into pieces for even melting.
- 4 oz white chocolate, chopped: a bar works best; chips can seize more easily.
- 3/4 cup granulated sugar:
- 2 large eggs: room temperature helps them blend smoothly.
- 1 tsp vanilla extract:
- 3/4 cup full-fat canned coconut milk: shake the can well before measuring.
- 1 cup sweetened shredded coconut, divided: 3/4 cup for the batter, 1/4 cup reserved for the top.
For the frosting
- 4 oz cream cheese, softened: use full-fat for the smoothest texture.
- 2 tbsp unsalted butter, softened:
- 2 oz white chocolate, melted and cooled slightly:
- 1 1/2 cups powdered sugar:
- 2–3 tbsp coconut milk: as needed to loosen the frosting.
- Reserved toasted coconut: for sprinkling.
Variations / Substitutions
- Use dark or milk chocolate: swap the white chocolate for chopped semisweet or milk chocolate; the cake will be less sweet and the frosting will taste closer to a classic cream cheese frosting. Toast the coconut anyway, the contrast works.
- Make it dairy-free: use a plant-based butter alternative and a vegan cream cheese. Check that your white chocolate is dairy-free, many brands use coconut milk solids.
- Turn it into a layer cake: divide the batter between two greased 8-inch round pans and reduce the bake time to about 22–26 minutes. Double the frosting if you want generous coverage between layers.
- Skip the frosting: the cake is tender and flavorful enough on its own with a dusting of powdered sugar. A drizzle of melted white chocolate over the top is an even quicker finish.
If you enjoy this combination, you might also like a coconut cream pie or a simple loaf of coconut bread for a less sweet option.
How to Make White Chocolate Coconut Cake
Step 1: Toast the Coconut

Set an oven rack in the middle and preheat the oven to 350°F (175°C). Spread the full 1 cup of shredded coconut in an even layer on a rimmed baking sheet. Place it in the oven while it heats, and toast for 5 to 8 minutes, stirring halfway through, until the flakes are golden and fragrant.
Watch it closely after the 4-minute mark because shredded coconut goes from golden to burnt fast. Remove the baking sheet from the oven, give the coconut a stir so it cools without sticking, and set it aside. Measure out 1/4 cup for the topping and leave the rest for the batter.
Step 2: Mix the Batter

Grease a 9-by-13-inch metal baking pan and set it aside. In a small saucepan over low heat, or in a microwave-safe bowl using 20-second bursts, melt the 1/2 cup butter and 4 oz white chocolate together, stirring until smooth. Let the mixture cool for about 5 minutes so it does not cook the eggs when you add it later.
Whisk the flour, baking powder, baking soda, and salt together in a medium bowl. In a large bowl, whisk the sugar, eggs, coconut milk, and vanilla until everything is evenly combined and slightly thickened, about 1 minute. Pour in the cooled white chocolate mixture and whisk again until glossy. Add the dry ingredients all at once and stir just until no streaks of flour remain; the batter will be thick and pale. Fold in the 3/4 cup of toasted coconut with a spatula, then scrape the batter into the prepared pan and smooth the top.
Step 3: Bake the Cake

Slide the pan into the oven and bake for 25 to 30 minutes. The cake is done when the top is lightly golden and a toothpick inserted in the center comes out clean or with a few moist crumbs clinging to it.
Let the cake cool completely in the pan on a wire rack before you add any frosting. Rushing this step will melt the frosting and make the top layer of cake tear. If you need to speed things up, rest the pan on a cooling rack near an open window or pop it in the fridge once it releases the worst of its heat.
Step 4: Whip the Frosting

Beat the softened cream cheese and 2 tbsp butter together in a large bowl until smooth and fluffy, about 2 minutes on medium speed. Scrape down the bowl, then pour in the melted and slightly cooled 2 oz white chocolate and beat until incorporated.
Add the powdered sugar in two additions, beating on low at first so it does not puff up in a cloud. Once it is mostly mixed in, increase the speed to medium and beat until the frosting looks creamy and holds soft peaks. Thin it with coconut milk, 1 tablespoon at a time, just until it spreads easily but does not slide.
Step 5: Frost and Top the Cake

Spoon the frosting over the cooled cake and spread it to the edges with an offset spatula or the back of a spoon. Scatter the reserved 1/4 cup of toasted coconut over the top, pressing it in gently so it sticks.
Slice the cake into squares right in the pan and serve. The frosting will be soft at room temperature; refrigerating the cake for 20 minutes firms it up for cleaner slices if you are bringing it to a table.
Tips for the Best White Chocolate Coconut Cake
- Weigh the flour if you have a scale: 190 grams gives you the same tender texture every time.
- Use a metal baking pan, not glass. Glass holds heat differently and can overbake the edges while the center stays underdone.
- Stir the coconut milk well before measuring. The cream and liquid separate in the can, and you want both.
- To get clean frosting swirls, run your spatula under hot water and dry it between passes.
A quick reference for bake times if you switch the pan:
| Pan shape | Pan size | Bake time at 350°F |
|---|---|---|
| Rectangular metal | 9×13 inches | 25–30 minutes |
| Square metal | 8×8 or 9×9 inches | 30–35 minutes |
| Two round metal | 8-inch | 22–26 minutes |
Storing Leftovers
Cover the cake tightly and refrigerate it for up to 4 days. The cream cheese frosting sets firm in the cold, so let the cake sit at room temperature for about 15 minutes before serving if you want it soft again. You can also freeze unfrosted cake layers wrapped in plastic and foil for up to a month, then thaw and frost them the day you plan to serve.
Frequently Asked Questions
Can I use unsweetened shredded coconut?
Yes, but the cake will be less sweet overall. If you switch, add 2 extra tablespoons of sugar to the batter and consider using the full 1/4 cup in the topping for more crunch.
Why did my white chocolate seize when melting?
White chocolate is sensitive to moisture and high heat. Melt it with the butter over low heat or in short microwave bursts, and make sure the bowl and spoon are completely dry. A drop of water can cause it to turn grainy.
How do I make the frosting ahead?
You can make the frosting a day in advance and keep it in the fridge. Let it soften at room temperature for 20 minutes, then re-whip it briefly before spreading.
Can I freeze the whole frosted cake?
Yes, but the texture of the frosting changes slightly. Freeze individual slices on a parchment-lined tray until solid, then wrap them tightly. Thaw them unwrapped in the fridge overnight.
My cake sank in the middle. What went wrong?
The most common reason is opening the oven door too early or underbaking. Check the cake only after 25 minutes, and trust the toothpick test.

White Chocolate Coconut Cake Recipe
Ingredients
Method
- Preheat oven to 350°F (175°C). Spread shredded coconut on a baking sheet and toast for 5–8 minutes until golden, stirring once. Set aside, reserving 1/4 cup for topping.
- Grease a 9×13-inch metal pan. Melt butter and 4 oz white chocolate together; cool slightly. Whisk flour, baking powder, baking soda, and salt. In a large bowl, whisk sugar, eggs, coconut milk, and vanilla, then mix in the melted white chocolate. Stir in dry ingredients just until combined, then fold in 3/4 cup of the toasted coconut. Spread in the pan.
- Bake for 25–30 minutes until a toothpick inserted in the center comes out clean. Cool completely in the pan.
- Beat cream cheese and 2 tbsp butter until fluffy. Beat in 2 oz melted white chocolate, then gradually add powdered sugar. Thin with coconut milk until spreadable.
- Spread frosting over the cooled cake. Sprinkle with reserved toasted coconut, slice, and serve.
