Home ยป Recipes ยป Cakes

5 from 1 vote

Coconut Cake Recipe

Iโ€™ve been testing coconut cakes for a while now, and I kept coming back to the same problem: plenty of coconut flavor, but dry layers or overly sweet fillings. This version finally hit the balance I was looking forโ€”soft cake, real coconut flavor throughout, and a filling that stays creamy without overwhelming the crumb.

I Love This Cake Because

This is the coconut cake I make when I want something reliable but still special, especially when texture matters as much as flavor.

  • The cake layers bake up soft and even, with no dry edges
  • The coconut filling stays creamy and sliceable
  • The cream cheese frosting keeps everything balanced, not cloying
  • It holds up well for stacking, slicing, and storing
  • The coconut flavor is present but not overpowering

Key Ingredients & Why I Use Them

Coconut milk: I use the creamy portion only. This adds richness without watering down the batter or frosting.

This post may contain affiliate links. I earn a commission from qualified purchases. Please read our Privacy policy here.

Coconut yogurt: This keeps the cake moist and tender. Iโ€™ve tested versions without it, and the crumb just isnโ€™t the same.

Egg whites: Using only whites gives the cake structure while keeping it light and soft.

Shredded coconut: I fold this in gently at the end so it adds texture without weighing the batter down.

Cream cheese: This is what keeps the frosting balanced. I prefer it here over a butter-only frosting for contrast.

How I Make This Coconut Cake

The full recipe card is below, but hereโ€™s how I make it step by step. This recipe yields a three-layer 8-inch cake. Full ingredients list and instructions can be found on the recipe card at the bottom of this post.

Step 1: Preparing the Cake Batter

I start by preheating the oven to 350ยฐF (175ยฐC). I grease three 8-inch cake pans with oil and line the bottoms with parchment paper. I donโ€™t skip the parchment hereโ€”it makes releasing the layers much easier, especially with a tender crumb.

In a medium bowl, sift together the flour, cornstarch, baking powder, baking soda, and salt, then set aside. Using a mixer, beat the butter for 30 seconds until creamy. Add the oil and sugar, and beat on medium-high speed until light and fluffy. This step helps create a softer cake texture, so I give it a full minute or two.

I add the egg whites one at a time, whisking well after each addition and scraping down the sides of the bowl as needed. I donโ€™t rush thisโ€”adding them gradually keeps the batter smooth and emulsified.

Next, I mix in the coconut yogurt, vanilla extract, and coconut extract until everything is fully combined and smooth.

With the mixer on low speed, I add half of the coconut milk, followed by half of the dry ingredients. I mix just until incorporated, then repeat with the remaining coconut milk and dry ingredients. I stop mixing as soon as the flour disappears to avoid overworking the batter.

At the very end, I gently fold in the shredded coconut by hand. This keeps the texture light while still adding coconut flavor and a bit of chew.

I divide the batter evenly between the prepared pans and smooth the tops so the layers bake evenly. I bake for 25โ€“30 minutes, until a toothpick inserted into the center comes out clean.

Once baked, I let the cakes cool in the pans for about 10 minutes before turning them out onto a wire rack to cool completely. If Iโ€™m not assembling the cake the same day, I wrap each layer tightly in plastic wrap and freeze them. Frozen layers are easier to stack and frost cleanly.

Step 2: Crafting the Coconut Filling

In a heavy-bottomed saucepan, combine the sweetened condensed milk, butter, shredded coconut, and heavy cream (or coconut cream/milk). Cook over medium heat, stirring constantly, for 10 to 15 minutes, until the mixture thickens and pulls away from the sides of the pan. When it reaches that stage, I know it will set properly once cooled.

Transfer to a bowl, cover with plastic wrap, and let cool to room temperature. This filling can be made ahead of time and stored in the fridge for up to one week or in the freezer for up to two months. Bring it to room temperature before using.

Step 3: Coconut Cream Cheese Frosting

In a stand mixer bowl, or using an electric hand mixer, beat the butter on medium speed for 1 minute, then add the cream cheese and beat for another minute until smooth. I always scrape the bowl again and beat for another 30 seconds to make sure everything is smooth before adding sugar.

Gradually add 4 cups of powdered sugar and mix on low speed until incorporated. Add the coconut milk and coconut extract, mixing until smooth. IIf the frosting feels too thin, I add up to 1 additional cup of powdered sugar, a little at a time, until it reaches a spreadable, pipeable consistency. When Iโ€™m assembling, I like to transfer some of the frosting to a piping bag fitted with a round tipโ€”it makes creating clean filling rings much easier.

Step 4: Assembling

I place the first cake layer on a serving plate or cake stand. Using the piping bag, I pipe a ring of frosting around the edge of the cake. This ring acts as a barrier to keep the filling from spilling out.

I add about โ…“ to ยฝ cup of the coconut filling inside the ring and spread it evenly.

I place the second cake layer on top and repeat the process, piping another frosting ring and filling the center.

I place the final cake layer on top, then frost the top and sides of the cake using an offset spatula, smoothing everything out as I go.

To finish, I press shredded coconut or coconut flakes onto the sides and top of the cake. If Iโ€™m decorating further, I add coconut brigadeiros or Raffaello candies for a clean, polished finish. Decorate with coconut brigadeiros or Rafaello candies for an extra touch of elegance.

Storage

Store the assembled Coconut Cake in the refrigerator, covered, for up to 4 days. Let it sit at room temperature for about 30 minutes before serving. You can also freeze individual slices or the entire cake for up to 2 months. Wrap tightly in plastic wrap and place in an airtight container before freezing.

Tips & Tricks

These are the small details I pay attention to when making this cake, and they make a real difference in how it bakes and assembles.

  • Use the creamy part of the coconut milk. I always scoop from the top of the can and avoid the watery portion. It gives better flavor and keeps both the batter and frosting from thinning out.
  • Freezing the cake layers makes assembly easier. This is especially helpful with soft, tender cakes like this one. Frozen layers are sturdier, crumb less, and stack more cleanly.
  • Donโ€™t skip the frosting ring. This step matters more than it looks. The ring keeps the filling contained and gives you clean, even slices once the cake is cut.
  • Stop mixing as soon as the batter comes together. Overmixing is the fastest way to lose the soft texture youโ€™re aiming for here.
  • Bring the filling to room temperature before using. Cold filling is harder to spread and can tear the cake layers.
  • Quick Tip: If your frosting feels soft while decorating, refrigerate it for 10โ€“15 minutes, then remix briefly before continuing.

Variations on Coconut Cake

This cake is fabulous on its own, but if you had to make some changes, I would do the below!

  • Chocolate Coconut Cake: Add 1/3 cup of cocoa powder to the batter and top with dark chocolate ganache instead of cream cheese frosting.
  • Lemon Coconut Cake: Incorporate 2 teaspoons of lemon zest into the batter and replace the coconut extract with lemon extract.
  • Tropical Coconut Cake: Add diced pineapple or mango to the filling for a fruity twist.
  • Nutty Coconut Cake: Fold 1/2 cup of toasted chopped almonds or pecans into the batter for added crunch.

FAQs

Can I make this cake ahead of time?

Yes. I often bake and freeze the cake layers, then assemble the cake the day before serving.

Why did my cake turn out dry?

This usually comes from overbaking or overmixing the batter. I always stop mixing as soon as the flour disappears and check the cakes early.

Can I freeze this cake?

Yes. The fully assembled cake or individual slices freeze well for up to two months when wrapped tightly.

Can I change the pan size?

You can, but bake times will vary. I recommend keeping the batter depth similar to avoid texture issues.

Turning This Into Coconut Cupcakes

I use the same batter, filling, and frosting for cupcakes.

I line a standard muffin pan with paper liners and divide the batter evenly between about 24 liners, filling each one about two-thirds full. I bake them at 350ยฐF (175ยฐC) for 18โ€“22 minutes, until a toothpick inserted into the center comes out clean.

Once the cupcakes are completely cool, I core the centers and fill them with the coconut filling. I finish by piping the cream cheese frosting on top and sprinkling shredded coconut over the frosting. Coconut truffles or brigadeiros make a nice finishing touch.

โ€ฆOr a Coconut Sheet Cake

To make a sheet cake, I prepare the batter as written and bake it in a greased and parchment-lined 9ร—13-inch pan at 350ยฐF (175ยฐC) for 35โ€“40 minutes, until a toothpick comes out clean.

Once the cake is fully cooled, I use a dowel or the handle of a wooden spoon to poke holes across the surface. I pipe or spoon the coconut filling into the holes so it distributes throughout the cake.

I frost the top with the coconut cream cheese frosting and smooth it out with an offset spatula. I finish with shredded coconut or flakes and any decorative toppings I like.

This version is easier to serve and works well for gatherings.

More Recipes You Might Enjoy

If you liked this coconut cake, you might also enjoy my Coconut Cupcakes, Raspberry Coconut Cake, Coconut Brigadeiros, or Coconut Chocolate Bars. They use similar flavors but in different formats and textures.

If you make this cake, Iโ€™d love to hear how it turned out. Leave a comment and rating below, or tag me on Instagram so I can see your version.

A slice of coconut cake with layers of fluffy coconut sponge and creamy filling, topped with piped frosting and two coconut-covered truffles. The cake sits on a scalloped plate, creating a cozy and festive presentation.

Coconut Cake

Camila Hurst
This Coconut Cake is a moist and fluffy dessert layered with creamy coconut filling, topped with luscious coconut cream cheese frosting, and finished with shredded coconut for a tropical and indulgent treat.
5 from 1 vote
Prep Time 1 hour 25 minutes
Cook Time 30 minutes
Cooling Time 2 hours
Total Time 3 hours 30 minutes
Course Dessert
Servings 12 servings
Calories 937 kcal

Ingredients
 

Coconut Cake Batter
  • ยฝ cup unsalted butter 113 grams
  • ยผ cup oil 60 ml
  • 2ยผ cups all-purpose flour 287 grams
  • ยผ cup cornstarch
  • 1ยฝ tsp baking powder
  • ยผ tsp baking soda
  • ยฝ tsp salt
  • 1ยฝ granulated sugar 300 grams
  • 5 large whites room temperature
  • ยฝ cup coconut yogurt or sour cream
  • 1 tsp vanilla extract
  • ยฝ tsp coconut extract
  • 1 cup unsweetened coconut milk 240 ml
  • ยพ cup sweetened shredded coconut 60 grams
Coconut Filling
  • 1 can sweetened condensed milk 396 grams
  • 1 tbsp unsalted butter
  • ยฝ cup shredded coconut sweetened or unsweetened (40 grams)
  • ยผ cup heavy cream or coconut cream, or coconut milk
Coconut Cream Cheese Frosting
  • 1 cup unsalted butter room temperature (226 grams)
  • ยพ cup cream cheese room temperature (170 grams)
  • 4 to 5 cups powdered sugar 500 to 625 grams
  • 2 tbsp coconut milk or heavy cream
  • ยฝ tsp coconut extract
To Decorate

Instructions
 

Coconut Cake Batter
  • Preheat the oven to 350ยฐF (175ยฐC) and prepare three 8-inch cake pans by spraying with oil and lining the bottoms with parchment paper. Grease the parchment paper.
  • In a medium bowl, sift together the flour, cornstarch, baking powder, baking soda, and salt, then set aside.
  • Using a mixer, beat the butter for 30 seconds. Add the oil and sugar, and beat on medium-high speed until light and fluffy.
  • Add the egg whites one at a time, mixing well after each addition and scraping down the sides of the bowl as needed.
  • Add the coconut yogurt, vanilla, and coconut extract, and mix to combine.
  • Add half of the coconut milk, stir on low to combine.
  • Add half of the dry ingredient mixture. Mix just until combined, being careful not to over mix.
  • Pour in the remaining coconut milk, and stir.
  • Add the remaining flour mixture and mix on low.
  • Gently fold in the shredded coconut.
  • Evenly divide the batter between the prepared pans and bake for 25-30 minutes, or until a toothpick inserted in the center comes out clean. Let the cakes cool in the pans for 10 minutes before transferring them to a wire rack to cool completely.
  • If not assembling the cake on the same day, wrap each layer in plastic wrap and keep the layers frozen. Keeping the layers frozen will prevent them from drying out.
Coconut Filling
  • Place the sweetened condensed milk, butter, shredded coconut, and heavy cream (or coconut cream/milk) in a saucepan with a heavy bottom over medium heat.
  • Cook the mixture, stirring non-stop, for about 10 to 15 minutes, until thick, falling into chunks off the spatula.
  • When you run the spatula through the filling, you should be able to see the bottom of the pan.
  • Transfer the filling to a bowl, cover with plastic wrap and let it come to room temperature.
  • You can make it ahead of time and store in the fridge for up to 1 week, or freezer for up to 2 months. Let it come to room temperature on the counter before using as filling for the cake.
Coconut Cream Cheese Frosting
  • Place the butter in the bowl of a stand mixer, and beat on medium speed for 1 minute. Alternatively you can use a hand mixer.
  • Add the cream cheese to the bowl and beat with the butter for another minute.
  • Scrape the bowl and beat for another 30 seconds.
  • Add 4 cups of powdered sugar and mix on low until incorporated.
  • Add 2 tbsp of coconut milk and stir on low.
  • Add the remaining cup of sugar only if needed to make the frosting stiffer if itโ€™s too runny.
  • Add the coconut extract and stir on low.
  • The frosting should be smooth and creamy.
  • Place some of the frosting in a piping bag lined with a round tip.
To Assemble
  • Place a cake layer on a cake plate.
  • Pipe a ring of frosting around the edges of the cake.
  • Fill the center about 1/3 cup to 1/2 cup of the coconut filling. Spread with an offset spatula to smooth it out.
  • Top with the other cake layer.
  • Repeat the process by piping the ring of frosting around the edges of the cake, and fill the center with the coconut filling.
  • Top with the final cake layer.
  • Spread the frosting on top and around the edges of the cake, use an offset spatula to smooth out the top and sides of the cake.
  • Use your hands to stick the shredded coconut on the sides of the cake, and on top of the cake too, covering the whole surface of the cake with the coconut.
  • Top the cake with the frosting and coconut truffles if desired.

Notes

Coconut Yogurt: instead of coconut yogurt, you can use sour cream or full-fat yogurt.
Coconut Milk: use only the white creamy part of the milk, donโ€™t use the watery part.
Coconut Brigadeiros: Decorate with Coconut Brigadeiros or asย  an alternative use Rafaello candy.
Coconut Filling: when making the coconut filling make sure to not stop stirring at any point, and donโ€™t keep the heat too high, or the filling will easily stick to the bottom of the pan.

Nutrition

Serving: 1 servingCalories: 937kcal
Keyword coconut, coconut cake
Tried this recipe?Let us know how it was!

Leave a Reply

Your email address will not be published. Required fields are marked *

Recipe Rating




This site uses Akismet to reduce spam. Learn how your comment data is processed.

13 Comments

  1. Hello,
    I recently developed lactose intolerance, allergies and sensitivities and have trouble tolerating most things. Iโ€™m not supposed to have desserts often or at all, or any added sugars etcโ€ฆbut if I ever do want cake, or sweets as a very rare treat (which Iโ€™ve not allowed so far though itโ€™s been really saddening me and my quality of life), Iโ€™ve been at a lossโ€ฆ

    This looks so amazing and I love coconut so much and miss sweets and baking. I baked cakes for fun and really got into baking as a passion prior to getting new GI issues and decline in health. Iโ€™m at a low weight so need to eat something but have no appetite for the extremely few options I have.

    Can the cream cheese be subbed for anything? And would dairy free butter sticks like miyokos or plant based butterstick of some form work as well or any tips?

    Iโ€™m so saddened and deeply miss enjoying food and baked goods and always loved shredded dried coconut flakes in cakes and chocolatesโ€ฆand sweets and baking cakes. Coconut cream was a big fav of mine as a pie but ESPECIALLY COCONUT CREAM CAKE! Coconut cloud cakeโ€ฆI would love that fluffy white, clean coconut cake with the smooth coconut cream filling or frosting in something but donโ€™t know how to do that without the use of lactose products or heavy whipping cream or cream cheese, butter, etcโ€ฆ

    Would appreciate anything you could offer as help. I see this recipe uses almost all coconut products over dairy to begin with so was hoping maybe I had a chance here.

    1. Hi Tara,
      Thank you so much for sharing this. I completely understand how hard it can be to miss baking.
      So you can definitely make a dairy-free version, with some substitutes.

      Butter: Use vegan butter sticks like Miyokoโ€™s, Country Crock Plant Butter, or Earth Balance. Theyโ€™ll work perfectly in both the cake and frosting.

      Cream Cheese: Replace it with a dairy-free cream cheese such as Kite Hill or Violife.

      Heavy Cream: Use full-fat coconut cream, just chill it first and use the thick part.

      Filling: The sweetened condensed coconut milk unfortunately wonโ€™t work for this particular filling because it wonโ€™t thicken the same way as the dairy version. I’d suggest you make an extra batch of the frosting and use it as both filling and topping.

      Also, do you follow the Loopy Whisk? She has tons of recipes that cater to intolerances and allergies. I highly recommend checking her page out and also a book she published called The Elements of Baking. She teaches the science behind making substitutions in recipes. It’s really so helpful for people with restrictions and intolerances. She also has very amazing recipes.

      Again, thanks for sharing! Wishing you the best!!

      Camila

  2. My cakes did rise but lost volume when cooling. My eggs werenโ€™t room temperature and I used Greek yogurt since thatโ€™s what I had on hand. Any idea what went wrong?

    1. Your cake likely deflated due to the cold eggs, which can prevent proper emulsification, and Greek yogurt substitution, which is thicker than regular yogurt and may have affected moisture balance. Other possible causes include overmixing or undermixing, an inaccurate oven temperature, or underbaking, all of which can weaken the cakeโ€™s structure and cause it to collapse as it cools. Sorry it didn’t work for you!

  3. Hi,

    If your coconut filling has hardened overnight and itโ€™s too hard to spread, is there a safe way to soften it?

    1. Yes, you can add a teaspoon or so of heavy cream, or more as needed. and stir or heat gently in the microwave like 5 seconds only with the cream, and stir to make it smooth.

  4. Question: where to get the finely shredded coconut. At the store the one they sell is shredded bigger. Thank you.

    1. Hi! Thank you so muchโ€”Iโ€™m glad you love the recipe! ๐Ÿฅฅ If youโ€™re referring to the vegetable oil, you can absolutely substitute it with coconut oil for a touch more coconut flavor. Just make sure itโ€™s melted and cooled before using. However, I donโ€™t recommend substituting all the butter with coconut oil, as the butter adds richness and helps with the texture of the cake. Let me know if you try it. Iโ€™d love to hear how it turns out! ๐Ÿฐ๐Ÿ˜Š