Coconut Cake Recipe
Hello, coconut lovers! This Coconut Cake is the ultimate treat for anyone who loves the rich, tropical flavor of coconut. Featuring a soft and fluffy coconut-infused cake, a creamy coconut filling, and a luscious coconut cream cheese frosting, this dessert is truly a showstopper. Topped with shredded coconut and decorated with coconut brigadeiros, this cake is perfect for any special occasion or to make any day feel like a celebration.

Best Coconut Cake Recipe
In this post, Iโll guide you through every step to create a stunning Coconut Cake. From preparing the tender cake layers to crafting the rich coconut filling and frosting, youโll find detailed instructions, tips, and variations to help you achieve the perfect result, taste, and texture.
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.
This post may contain affiliate links. I earn a commission from qualified purchases. Please read our Privacy policy here.

Preparing the Cake Batter
Preheat your oven to 350ยฐF (175ยฐC) and prepare three 8-inch cake pans by greasing them with oil and lining the bottoms with 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 until creamy. Add the oil and sugar, and beat on medium-high speed until light and fluffy.
Next, add the egg whites one at a time. Whisk well after each addition and scrape down the sides of the bowl as needed.

Incorporate the coconut yogurt, vanilla, and coconut extract, mixing until smooth. Gradually add half of the coconut milk, stirring on low to combine. Add half of the dry ingredient mixture, mix just until combined, then repeat with the remaining coconut milk and dry ingredients. Gently fold in the shredded coconut.

Divide the batter evenly between the prepared pans and smooth down for an even layer. Bake for 25-30 minutes, or until a toothpick inserted into the center comes out clean.

Allow the cakes to cool in the pans for 10 minutes before transferring to a wire rack to cool completely. If not assembling the cake on the same day, wrap each layer in plastic wrap and freeze to maintain freshness.

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. 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.

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. Scrape down the bowl and beat for an additional 30 seconds. Gradually add 4 cups of powdered sugar and mix on low speed until incorporated. Add the coconut milk and coconut extract, mixing until smooth. If the frosting is too thin, add up to 1 cup more powdered sugar to achieve the desired consistency. For easier application, transfer some frosting to a piping bag with a round tip.

Assembling the Cake
Place the first cake layer on a serving plate and pipe a ring of frosting around the edge. Fill the center with 1/3 to 1/2 cup of the coconut filling and spread evenly. Top with the second layer of cake and repeat the process.

Place the final cake layer on top and spread frosting over the top and sides of the cake, smoothing it with an offset spatula.

Press shredded coconut or coconut flakes onto the sides and top of the cake to cover it completely. 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
- Use fresh coconut milk: For the best flavor, use the creamy part of coconut milk and avoid the watery portion.
- Chill the cake layers: Freezing the cake layers makes assembly easier and prevents crumbs from mixing into the frosting.
- Donโt skip the frosting ring: The frosting ring helps contain the filling and ensures a neat, professional look.
- Customize your frosting: For a less sweet frosting, reduce the powdered sugar by 1 cup and add an extra tablespoon of coconut milk for creaminess.

Variations on Coconut Cake
- 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.
Make this recipe into Coconut Cupcakes
To turn this Coconut Cake into cupcakes, follow the same steps to prepare the batter, filling, and frosting. Line a standard cupcake pan with paper liners, and evenly divide the batter into about 24 liners, filling each two-thirds full. Bake at 350ยฐF (175ยฐC) for 18โ22 minutes, or until a toothpick inserted into the center comes out clean. Let the cupcakes cool completely. Core the center of each cupcake, fill with the coconut filling, and top with the cream cheese frosting. Sprinkle shredded coconut over the frosting and garnish with coconut truffles or other decorative toppings for a delightful, bite-sized version of the cake!

Turn this recipe into a Coconut Sheet Cake
To turn this Coconut Cake recipe into a sheet cake, prepare the batter as instructed. Grease and line a 9ร13-inch sheet pan with parchment paper for easy removal. Pour the batter into the prepared pan and spread it evenly. Bake at 350ยฐF (175ยฐC) for 35โ40 minutes, or until a toothpick inserted in the center comes out clean. Let the cake cool completely in the pan.
For assembly, use a dowel or the handle of a wooden spoon to poke holes throughout. Pipe the coconut filling into these holes. Then, frost the entire surface with the coconut cream cheese frosting, using an offset spatula to smooth it out. Finish by sprinkling shredded coconut on top and decorating with coconut truffles or additional shredded coconut for a festive look. This sheet cake is perfect for serving a crowd and simplifies the layering process!
Why Youโll Love This Coconut Cake
This Coconut Cake is a tropical dream come true. The combination of fluffy cake layers, creamy filling, and rich frosting makes it a show-stopping dessert perfect for birthdays, holidays, or any time you want to impress. Its balance of sweetness and coconut flavor will leave everyone asking for seconds. Enjoy!

If you like this recipe, youโll love these!
- Chai Cake
- Coconut Cupcakes
- Coconut Fudge (Brigadeiros)
- Raspberry Coconut Cake
- Coconut Chocolate Bars
- Vegan Coconut Cake
Please let me know what you think of this recipe. I love seeing your creations on Instagram! Please share!

Coconut Cake
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
- 2ยฝ cups shredded coconut
- Coconut fudge (brigadeiros)
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.
Hi, I love the recipe, can you use coconut oil? thank you very much.
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! ๐ฐ๐
Question: where to get the finely shredded coconut. At the store the one they sell is shredded bigger. Thank you.
I put them the coconut in the food processor to make it smaller.
Hi,
If your coconut filling has hardened overnight and itโs too hard to spread, is there a safe way to soften it?
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.
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?
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!
Can I use whole eggs instead, if so how many? Or can I use egg whites from a carton ? Thank you
You can use whites from a carton.
Recipe looks amazing need to try ..but I m allergic to eggs ..so any options to make it eggkess