Best Coconut Cake

The coconut cake guaranteed to convert even the most self-proclaimed coconut hater. The marshmallow meringue frosting and vanilla coconut filling make angels sing and define carpe diem. And the vanilla butter cake balances the whole thing out making this coconut cake recipe perfect for a birthday cake or any celebration. Recipe adapted from the Magnolia Bakery and courtesy of David Leite.

piece of coconut cake on a plate with a cup of coffee

This post contains links to affiliate websites including Amazon. I make a small commission for any purchases made using these links. Thank you!

Meet the best coconut cake

You know that coconut cakes you see in the old-fashioned diners that twirl around in the tall dessert cases? It looks so awesome but when you take a bite, it just tastes like refrigerated coconut cardboard?

This cake isn’t that.

This cake deserves to be called the best coconut cake you’ll ever make. I didn’t invent it so I can call it that.

The recipe is adapted from a very popular cake at the Magnolia Bakery in NYC. A big cup of Magnolia’s famous banana pudding, specialty cakes or dainty pink cupcakes (made extra famous by a cameo on season 3 of Sex and the City) drew throngs of people eager to feel like Carrie and Samantha for the day. 

finished coconut cake on a white cake platter with a blue and white striped towel

What makes it special?

  • An amazing vanilla coconut filling sandwiched between the cake layers lends the right amount of coconut to the whole dessert.
  • The whole cake isn’t too coco-nutty (and this comes from someone who ♥ coconut) because the vanilla butter cake is more like a moist pound cake.
  • And the heavenly swirls of marshmallow frosting add a light and airy texture.
black bowl of coconut on a blue and white striped towel

Ingredient Information

Coconut. You might be considering the idea of using unsweetened coconut for this cake. I’m a firm believer in the idea that dessert should taste like dessert and not something that I’m trying to convince myself is dessert. So with that being said, We are going to use the sweetened coconut for this cake because that’s the recipe and I’m a firm believer that dessert should be dessert. You will be disappointed in the results if you use unsweetened coconut.


Unsweetened coconut is drier and is perfect for savory recipes where you wouldn’t want the extra sugar.

-Josie + Nina

Vanilla. Another key ingredient is pure vanilla. Use only real pure vanilla not vanilla extract in your baking.

Sugar. I might get some questions about using different sweeteners other than real cane sugar. All I will say is that I can’t guarantee you’ll be successful.

The Cake Making Process

overhead shot of coconut cake ingredients in a white bowl and parchment paper pans

A very sturdy vanilla cake batter is the foundation of this coconut cake recipe. This isn’t your dainty, pinky finger kind of cake. It’s a cake that you could just bake and eat all on its own without anything else except for a dusting of powdered sugar. It’s that good. With a moist crumb and texture that is on the denser side, these cake layers easily cut in half if you choose to make thinner cake layers with more filling in between. 

This. Is. CAKE. 

The way cake was meant to be enjoyed. In thick layers and big pieces. 

  • Blend your dry ingredients together in a separate bowl and then make sure to first spray your cake pans with the baking spray of your choice and then line the bottom with a cutout circle of parchment paper.
mixing bowl of creamed butter and sugar with two parchment lined cake pans
  • Cream the butter for a bit and eventually you’ll add the sugar and then the butter to get a nice smooth mix.
  • Next you’ll alternate your dry ingredients with the milk and vanilla mixing it all for a bit until it all is one happy, big bowl of yummy batter.
cake pans with coconut cake batter and an empty mixing bowl with a measuring cup
  • Pour the batter evenly into two prepared cake pans. 

Layer Cake Fine Print:

  • I prefer the cake to be in two layers. The original recipe calls for dividing the batter into three pans which means more cake and less filling. You decide.
  • Use a ladle with measuring marks (i.e. ½ cup or 4 oz.) and count each time you scoop some batter into each pan while alternating scoops as you go.
  • Shimmy that batter back and forth in the pan until it’s evenly distributed and place them in the oven.

Now for the coconut part…

The Filling

coconut filling in a saucepan with vanilla and a whisk

While the cake is baking, you’re going to make the cooked filling. Although it seems intimidating, it’s really easy as long as you keep the heat low and slow. You’re just going to be heating milk, sugar, and a little bit of flour together until it thickens up to custard consistency.

coconut filling in a saucepan with wooden spoon and blue and white towel

And then you’ll mix in the coconut and vanilla and set the whole thing aside while the cake bakes and cools. 

Easy, right? Now onto the frosting which I like to call…

Unbelievably amazing marshmallow meringue frosting

Just you try and keep a spoon out of this marshmallow meringue frosting. It’s sort of like homemade marshmallow fluff. Some people (and I’m certainly not naming names) have been known to layer this with a little peanut butter to make some fluffernutter. 

closeup of whisk with marshmallow meringue frosting

Nothing wrong with that, right? RIGHT?

Frosting steps:

mixing bowl of egg whites and vanilla with a blue and white striped towel
  • Heat water, sugar and a little bit of cream of tartar in a small saucepan and heat for just a couple of minutes. 
  • Next you’re going to slooooowly pour this mixture into egg whites and vanilla already waiting in a mixing bowl while the mixer is running on medium high. 
mixing bowl of whipped egg whites and vanilla

Using a hand-mixer

  • Place your mixing bowl (with the egg whites and vanilla in it) into the bottom of your sink.
  • Hold the hand mixer in your dominant hand and the saucepan in the other. 
  • Turn the mixer on low and mix the egg whites and vanilla together. Increase the mixer to medium-high and start pouring the sugar and water mixture into the mixing bowl in a very slow and steady stream continuously beating for five minutes until stiff peaks form.

Filling the cake

vanilla butter cake layers stacked with coconut filling on a white cake platter sitting on blue and white striped towel with a frosting spatula
  • After the cake layers have cooled, remove them from the pans carefully and remove the parchment paper from the bottom of the layers. Need more help? This video from King Arthur shows you how to remove cooled cakes easily from the pan without breaking them.
  • Place the bottom layer on a sturdy cake stand and using a large spoon, spread the filling into the middle. Leave about ½” border around the edge.
  • Place the next layer, TOP SIDE DOWN. This will ensure that the cake is flat on top.

Frosting the cake

coconut cake frosted with crumb coat on a white platter

Grab a big spoon and load it up with some frosting. Using a flat icing spatula, go around the outside of the cake making sure to fill the gap on the edges with frosting. You want an even smooth first coat. 

coconut cake being frosted with marshmallow meringue frosting

Next, frost the top of the cake in an even layer. And then go back and start swirling the sides. I like to use the tip of the spatula and make little curly-q’s one of top of the other. Use as much of the frosting as you need. If you make two layers, you’ll have some left over for that fluffernutter project. 

Making ahead and storing

big piece of coconut cake standing up on a small white cake plate with coffee in the foreground
  • You can make the layers ahead of time and freeze them.
  • This cake is best made the same day you’ll eat it BUT eating a piece the next day is almost a certainty.  In between servings, store the cake in the fridge, letting it come to room temperature before eating (that should take about ½ hour).


overhead shot of two pieces of coconut cake with coffee

For a few: Make the recipe as is and enjoy it over a few days. And share a little with the neighbors!

For many: Make as cupcakes and use an apple corer to remove a little bit of the center. Don’t go through to the bottom. Fill the hole with the coconut vanilla filling and pipe the frosting on top.

A couple of notes from the trenches:

  • The recipe looks long and time-consuming but it really isn’t hard. And you’ll feel so accomplished. Your family will look at you differently  – in a good way.  Not in that “what are you trying to feed us?” way.
  • Make this the day you want to eat it. While it’s almost as good the next day, any time after that and you’re pushing it.
  • GIve this a try as a cupcake – use an apple corer to remove a bit of the center and put the coconut filling in the middle. it’s so good!

Some other cakes to try:

Banana Sheet Cake with Cream Cheese Frosting

Peanut Butter Mousse between chocolate cake layers

piece of coconut cake on a plate with a cup of coffee.
4.34 from 3 votes

Best Coconut Cake

A vanilla butter cake surrounds a coconut filling and is topped with a marshmallow meringue frosting.
Prep Time:1 hour
Cook Time:40 minutes
Total Time:1 hour 40 minutes
Servings 10


For the cake

For the filling

For the frosting


Make the Cake

  • Preheat oven to 350.
    Butter and lightly flour 2- 9"cake pans and line with either wax paper or parchment. You can use also use three (which the original recipe calls for) and you'll just bake the cake a little less [instructions below].
  • Combine the flours and place in a medium bowl and set aside.
    1 1/2 cups self-rising flour, 1 1/4 cups all purpose flour
  • Pour the milk and vanilla into a glass measuring cup and set aside.
    1 cup milk, 1 tsp vanilla extract
  • Cream the butter in a large bowl or electric mixer fitted with a paddle attachment. Beat until light and fluffy and then add the sugar. Continue beating for three minutes.
    Add the eggs, beating well after each addition.
    1 cup unsalted butter, 2 cups granulated sugar, 4 larger eggs
  • To the mixer, add the dry ingredients alternately with the milk and vanilla mixture in four groups, beating well after each and ending with the milk. You'll have a smooth mixture by the end.
  • Divide the batter evenly among the pans. [see notes below]
  • Baking instructions:
    Two pans: Bake for 25-30 minutes.
    Three pans: Bake for 20-25 minutes.
    Either way, a cake tester inserted in the middle of the cake should come clean letting you know when the cakes are done baking.
  • Let cool for 10 minutes in the pan. Remove the cakes from the pan to a wire rack until completely cool. Check out this video on how to remove a cake from a pan.

Make the Filling

  • Combine the milk and sugar in a medium saucepan. Whisk in the flour and bring to a boil over medium heat, whisking the whole time until thick and bubbly, which should take about 5 minutes.
    3/4 cup milk, 1/2 cup granulated sugar, 2 tbsp all purpose flour
  • Remove from heat and add coconut. Stir in vanilla, cover and set aside to cool completely.
    1 7 oz package sweetened coconut, 1 tsp vanilla extract

Make the Frosting

  • Get ready by putting the egg whites and vanilla in a large mixing bowl. Set aside.
    3 large egg whites, 1 1/2 tsp vanilla extract
  • In a small saucepan, combine the water, sugar, and cream of tartar over high heat. Bring to a boil for 2-3 minutes, counting once the mixture begins to bubble on the edges. Remove from heat.
    1/2 cup cold water, 1 1/2 cups granulated sugar, 1/4 plus 1/8 tsp cream of tartar
  • On medium-high speed with either a hand or stand mixer, beat the egg whites and vanilla until foamy approximately 1 minute.
  • Keep the mixer on and with a thin, steady stream, sloooowly pour the sugar water mixture into the egg whites. Continue to beat on medium-high until fluffy and stiff peaks form. This will take around 5 minutes and the frosting will be bright, white and glossy. Try and resist tasting it. Or you'll eat the whole thing. And your cake will be lonely.

Assemble the Cake

  • Place one layer of cake on your serving platter or cake plate and spread 1/2 of the filling on top. If you’re only using two layers, use as much as makes sense to you and save the rest to eat vanilla wafers or graham crackers and chocolate for an upscale s’more. 
  • Place the next layer on (and repeat steps 1 & 2 if necessary).
  • Frost the top and sides of the cake with the frosting.
  • Top with extra sweetened coconut.


Tip to pour batter in pans equally:
  • I prefer the cake to be in two layers. The original recipe calls for dividing the batter into three pans which means more cake and less filling. You decide.
  • I use a 4 oz. ladle and alternate scoops between pans, counting as I go.
  • Shimmy the pans back and forth to evenly distribute the batter.
Hand mixer tips for frosting:
  • Place a towel in the bottom of the sink and your mixing bowl with the egg whites/vanilla on top of that.
  • Hold the mixer in your dominant hand and the saucepan in the other. Starting on low and working up to med-high, follow the steps above for making the frosting.
Make Ahead Tips
  • Make the cake layers ahead of time and once completely cooled, wrap in plastic wrap and then foil. Place in large freezer bags and freeze. Defrost completely in the fridge overnight before frosting.
  • The filling can be made the day ahead. Bring to room temperature before filling the cake.
  • Make the frosting the day your plan to serve it.
Course: Dessert
Cuisine: American, Celebrations, Party Food
Author: Lori Murphy
Did you make this recipe? Tag @josieandnina or tag #josieandnina!

Leave a Comment or Ask A Question

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.


  1. My mouth is watering for this cake! I’m trying so hard to be gluten and sugar free but this may just have to make a valentine’s day appearance. Everything in moderation, right? 😉

  2. Double the size needed for 2 pans, 9 inch! Please cut recipe in half or warn of consequences.
    Did you even make this? It was delicious and a hit, even though I left out some sugar. I also toasted some of the coconut to good effect as applied to the outside of sides after icing.
    I now have an extra cake in my fridge I really shouldn’t eat.3 stars

    1. So glad the cake was a hit and you enjoyed it! Love the idea of the toasted coconut. Sounds delicious! I am sorry that the amount of batter didn’t work for you. I note in the recipe and the post the option to use 3- 9″ pans or 2 and that I prefer the thicker layers using two. I have made this cake many times and only with 9″ pans. I’m jealous that you have extra cake in your fridge!

  3. Tried this cake as a gift for my brother in law. It came out beautifully. I have extra frosting leftover. How can I store it? Will it stay in the fridge?

    1. What a special gift for your brother in law!! Thank you for trying it and happy it was a success! Yes – it will stay in the fridge for a couple of days in a sealed container. After that the frosting starts to firm up a bit. Enjoy!!

  4. Hi, did you put in all of your cream of tarter in to the sugar and water mix and some of it in the egg whites? Or do you suggest putting in all of the tarter in with sugar?
    Thanks a bunch!

    1. Hi Sania! Great question – add it right to the water mix in the saucepan. Let me know if you have any problems. I’m thinking of doing a short video on making the frosting. It’s really easy but I will admit the first time I made it, I was a tad nervous!

      1. You’re too kind! I’ll keep an eye out for the frosting tutorial, and can’t wait to try this cake at home 😌

        1. You bet! Thank you for your question – it really helps so much! And if you’re on my mailing list, then you’ll be one of the first to know when I post it. Have a great day, Sania!😊

  5. Do you think I could use unsweetened coconut replacing the sweetened coconut — to reduce the amount of sugar? Or is the sweetened coconut essential to the overall taste of the cake?

    1. Thanks Laura! I think it would be totally fine to replace it on top of the cake. Since the filling is the star of the cake (although the frosting is like the best marshmallow fluff), I might try using half unsweetened and half sweetened.Just make sure that the unsweetened is a finer flake as it might be harder to cut and might be chewier. Now you’ve inspired me to try it – let me know how it works!