Coconut Cake
This post may contain affiliate links. See my disclosure policy.
My coconut cake recipe is soft, fluffy, and packed with real coconut flavor from shredded coconut and creamy coconut frosting. It stays moist for days and tastes better than any bakery-style coconut cake I’ve tried.

Everyone raves about this coconut cake recipe.

I find coconut cakes to be very hit or miss- they either barely taste like coconut at all (a few coconut flakes on top don’t count) or they’re overloaded with coconut extract to the point that they taste artificial. I wanted a homemade version that was moist, rich, and had a balanced coconut flavor throughout.
Initially, I adapted my vanilla cake recipe and swapped the water for coconut milk, but honestly, it tasted almost identical. Then I tried replacing the vanilla extract with coconut extract, but the cake ended up tasting oddly medicinal. It wasn’t until I folded shredded coconut directly into the batter that the flavor finally tasted natural and pronounced without being overpowering.
My coconut cake uses simple pantry staple ingredients, and bakes up in about 30 minutes. I usually finish it with vanilla frosting and toasted coconut, though it’s just as good on its own- soft, tender, and perfectly moist for days.
Key ingredients
Here’s what goes into coconut cake, along with my kitchen notes. Full measurements are in the recipe card below.
- All-purpose flour. I tried this recipe with regular flour and a gluten-free blend (Bob’s Red Mill), and both worked well. If you use the latter, make sure the blend contains xanthan gum.
- Sugar. I prefer white sugar because it keeps the crumb lighter and more consistent. Brown sugar also works, though the cake will bake up darker and slightly more moist.
- Baking soda. Helps the cake rise. Don’t swap it for baking powder as it won’t have the same effect.
- Kosher salt. Brings out natural sweetness and enhances the coconut flavor.
- Water. Binds the dry ingredients. I also tested using coconut milk, and I couldn’t really taste a difference.
- Oil. Use any neutral-flavored oil. I typically use vegetable or safflower oil.
- Vanilla extract. Balances the coconut flavor throughout.
- Vinegar. I use vinegar in the cake to replace eggs. It reacts with the baking soda to give it some rise.
- Unsweetened shredded coconut. The star ingredient. I like to use a mix of finely shredded coconut and large coconut flakes to add texture to the cake.
- Cream cheese frosting. I made my own with a mix of room temperature cream cheese, powdered sugar, cream, and coconut extract.
How to make a coconut cake
Step 1- Prep. Preheat the oven and line 2 round 9-inch cake pans with parchment paper.
Step 2- Mix. Combine the dry ingredients in a large bowl, then add the wet and whisk until smooth. Stir in the coconut flakes.
Step 3- Bake. Pour the batter mixture into the pans, spread it into an even layer, and bake until a toothpick comes out mostly clean.
Step 4- Frost. Using a stand mixer on low speed, beat the frosting ingredients to stiff peaks. Layer the cakes on a serving plate with a sheet of frosting between them, on top, and along the sides.

Arman’s recipe tips
- Don’t use toasted coconut flakes in the cake batter. I tested this, thinking it would intensify the coconut flavor, but it actually made the cake taste slightly burnt and overly nutty. Toasted coconut works much better sprinkled over the finished cake instead.
- Don’t overman the batter. Once the wet and dry ingredients are combined, mix only until no streaks of flour remain. Whenever I accidentally overmix, it makes cakes noticeably denser and less tender.
- Cool the cake completely before frosting. I learned this the hard way after trying to frost a slightly warm cake- the cream cheese frosting slid right off the sides instead of staying fluffy and thick.
- Want taller layers? Once cooled, carefully slice each cake in half with a serrated knife to create a four-layer cake. I usually make a little extra frosting if I go this route.
Easy coconut cake variations
- Coconut buttercream frosting. Swap the cream cheese for unsalted butter.
- Coconut sheet cake. Bake the cake in a 9×13-inch pan and bake for 40 minutes.
- Coconut cupcakes. Pour the batter into lined cupcake tins and bake for 18-20 minutes.
- Coconut bundt cake. Bake the cake in a 10-cup bundt cake pan and bake for 50 minutes or until a toothpick inserted comes out clean.
Frequently asked questions
The driest test cakes I made were either slightly overbaked or overtaxed. I also noticed that packing too much flour into the measuring cup made the crumb much heavier and less moist. The cake is ready once the center springs back lightly and a toothpick comes out mostly clean.
No, I don’t recommend adding it to the cake batter. It quickly overpowers everything and makes the cake taste artificial. I do add a little in the frosting, which is much more balanced.

More coconut dessert recipes

Coconut Cake Recipe
Ingredients
- 2 cups all-purpose flour 250g
- 1 1/2 cups sugar 300g
- 2 teaspoons baking soda
- 1/2 teaspoon salt
- 1 1/2 cups water 375mL
- 1 tablespoon vinegar
- 1/2 cup oil 120mL
- 1 tablespoon vanilla extract
- 1 cup shredded coconut 85g
Frosting
- 8 ounces cream cheese softened, 225g
- 1 cup confectioners sugar 120g
- 3/4 cup heavy cream 180mL
- 1 teaspoon coconut extract or vanilla extract
Instructions
- Preheat the oven to 190C/375F.
- In a mixing bowl, whisk together the flour, sugar, baking soda, and salt. Add the water, oil, vanilla, and vinegar and whisk until smooth. Fold through the coconut flakes. The batter should look smooth and thick.
- Grease two 8-inch cake pans and divide the batter between the two.
- Bake the cakes for 30-35 minutes, or until a skewer comes out clean, the edges are lightly golden, and the centers spring back.
- Let the cakes cool completely before frosting.
- To make the frosting, beat the cream cheese until smooth and creamy. Slowly add in the powdered sugar until combined. Add the cream and coconut extract and beat until stiff peaks form. The frosting should be thick, fluffy, and easy to spread.
Notes
Nutrition
Originally published May 2023


















Look great, going to make for my son’s birthday. Want to clarify the shredded coconut is not sweetened?
Hi Vicki- correct, unsweetened shredded coconut 🙂
What an amazing colour. I just think it takes lots of time to make it.
Hello Arman,
I was wondering if I could use almond flour instead! Thank you , always 😊
Chloe
Hi Chloe- I’m sorry but I haven’t tested it for this cake specifically. I do have an almond flour cake that you may enjoy.
This really is moist and fluffy! I like it so much.
What a nice recipe. How long can it be outside from the fridge?
This coconut cake is truly outstanding! I couldn’t believe how good it tastes without eggs.
I like your recipes.
Just made this cake and it is delicious. But glad I picked up that the instructions left out adding the coconut extract. Be sure to add it. I did at the last minute….
I am about to make this delicious looking cake . I can’t seem to find coconut extract or essence . Will replacing it with vanilla extract deter from the flavour much ?
It should be okay.
Made these as cupcakes last night (1/2 recipe only and got 10 cupcakes) with coconut milk and they were not good! I had to throw them away. I thought and thought why and came to the conclusion that the fat in the coconut milk along with the oil was just too much fat! I remade them again today with water and they were perfect!
Thank you Arman for your recipe. I will be using it for my number one choice for coconut cake and cupcakes! I forgot the cream cheese at the store so I am frosting with chocolate as I love Almond Joy candy bars and that is the combination. I used almond extract, but because it is a strong flavor I used half almond and half vanilla. Very good. Also I am thinking whip cream with the toasted coconut sprinkled on top and, because I like to get a bit adventurous with my flavor parings, I think fruity flavors like Lemon, strawberry, raspberry or blueberry. My daughter would love matcha? I think even that could work as all the flavors I mentioned go very well with coconut. 😊
Hi Terry- thanks for the feedback and review. Yes, that is the culprit right there- Canned coconut milk has significantly more fat in it than water/carton coconut milk, which completely changes the texture. It would make them greasy and also a little dense. I’m glad you remade them using watet to achieve the correct texture and flavor. Oh wow, a matcha frosting would be SO good- and a little goes a long way, so try a vanilla frosting with maybe 1/4 teaspoon of matcha (or matcha powder whisked with hot water and cooled slightly).
Let me know how you go!
The picture of the cake shows 3 layers but the recipe says 1 8” pan. Does this recipe make 1 or 3 layers?
one layer.
Can I use regular milk or coconut milk instead of water and everything else same as per recipe ?
Absolutely!
This looks so good and can’t wait to try. Is there any world where this recipe could be cooked as a muffin to make more portable/single serving for covid-times?
I haven’t tried but feel free to experiment and see!
Great recipe! Found I had enough cake batter for 3 sandwich tins. Recipe method mentions vinegar but no mention of vinegar in the ingredients!?
Yes! 1 tablespoon vinegar.
A few questions:
1) If you replace the coconut extract with vanilla, will it still taste overwhelmingly like coconut?; and
2) Is it EGGY?
Thanks!
Vinegar and it’s quantity is not mentioned under the ingredients list in the recipe, while it is mentioned in the method as well as earlier in the recipe. Could you mention the quantity of vinegar to add please? Thank you.
Yes it is fixed now- 1 tablespoon
If you only use one eight inch pan how do you get the layers?
The recipe is for a single layer cake. for 2 layers, double the recipe. For 3 layers, triple the recipe.