Vegan Coconut Cake

published on

slice of coconut cake from a mini vegan pastel rainbow colored cake

♫ Listening to: Annihilation by i_o and Lights ♫

These mini 4-inch vegan coconut cakes are moist, fluffy, and packed full of coconut flavor. Filled and topped with vanilla coconut frosting, you’ll think you’re on a tropical island when you eat it. The cake layers, as well as the frosting are the prettiest pastel colors all swirled together, making this a perfect addition to any birthday, easter, or baby shower celebration. They’re also the perfect size for a baby smash cake or to drop off on a friend’s doorstep to brighten their day.

Are you looking for a homemade coconut cake recipe that’s eggless or a cake recipe that’s dairy free? This vegan vanilla coconut cake uses a buttermilk equivalent (nondairy milk and apple cider vinegar) to interact with baking soda to give the cake the lift that a traditional cake has. These substitutions make this vegan cake recipe delicious.

This was my first attempt at making a pastel rainbow swirl cake. I prefer pastel colors over bright ones, but when I was recipe testing, I made a brightly colored version for those of you who aren’t looking for a coconut cake for easter or a baby. Just add more food coloring for brighter colors. I used a wrapped cake method to do the buttercream frosting transfer, but I think it would look even better just piped right onto the vegan cake. If you like lots of color in your baked goods, you might also like this rainbow recipe and this rainbow recipe.

I tested and modified this coconut cake recipe quite a few times before I got it right (yes, it was a very delicious month, thanks for asking), but it was all worth it. This coconut cake recipe is completely from scratch. If you try any shortcuts, like using store-bought frosting or using a box cake mix, please let me know how it works out. The best way to contact me is through instagram or email.

This recipe for vegan coconut cake makes two 4-inch, 3-layer mini cakes (see the tips section below for making a 8- or 9-inch coconut cake).

Coconut Cake Ingredients

  • 1 can (13.5oz/400mL) full-fat coconut milk
  • 1 tablespoon (14g) apple cider vinegar
  • 2 teaspoons (8-9g) vanilla extract
  • ⅔ cup (144g/160mL) melted coconut oil
  • 1 ½ cups (375g) raw, organic, or vegan sugar*
  • 2 ½ cups (325g) unbleached flour
  • 1 ½ teaspoons (5g) baking soda
  • 1 teaspoon (4-5g) baking powder
  • 1 cup (3oz/100g) shredded coconut, blended

Coconut Cake Directions

Prep time: 25 min; bake time: 30 min

Dollhouse Shortcut

To make the cake ahead of time, wrap each layer tightly with cling wrap and chill them in the fridge for up to 3 days or the freezer for up to 3 weeks. The day before you want to decorate, transfer them from the freezer to the fridge for at least 8 hours before unwrapping and assembling.

Preheat the oven to 350°.

Line a lasagna pan with parchment paper .

Mix 1 can full-fat coconut milk, 1 tablespoon vinegar, 2 teaspoons vanilla, ⅔ cup melted coconut oil, and 1 ½ cups sugar using a stand mixer or a handheld electric mixer. You can also mix this cake batter by hand, but you’ll need a stand mixer or an electric mixer for the frosting.

Sift 2 ½ cups unbleached flour, 1 ½ teaspoons baking soda, and 1 teaspoon baking powder into a different bowl.

Whisk the dry ingredients, and whisk in 1 cup of blended coconut. When you blend your shredded coconut, just use the pulse button for a few seconds to turn it into a finer consistency. You don’t want to overblend it or you might end up with coconut butter.

Add the dry ingredients to the wet and mix only until you can’t see any dry ones.

Divide the batter into 3 bowls and color each bowl the color of your choice using vegan food coloring.

Spoon the batter into the lasagna pan spoonful by spoonful alternating colors.

Bake for 30 minutes.

colorful pastel vegan coconut cake out of the oven

Cool for an hour while you make the frosting.

Coconut Buttercream Frosting Ingredients

Dollhouse Shortcut

If you forgot to chill a can of coconut milk overnight, you can buy cans of just coconut cream without the milk that you can use without chilling.

  • ½ cup (100g) vegan butter or margarine (if you avoid soy, use a soy-free one)*
  • ½ cup (100g) spectrum organic palm shortening*
  • ¼ cup (64-65g) coconut cream (the solid part of a chilled can of coconut milk)
  • ¼ cup (54g) coconut oil (melted)
  • 1 teaspoon (4g) vanilla
  • 4 ½ cups (560g) organic powdered sugar*

Coconut Buttercream Frosting Directions

Set the ingredients on the counter a half hour before you’re ready to make the frosting. This isn’t mandatory, but using room temperature ingredients makes a creamier frosting.

Whisk ½ cup vegan butter or margarine, ¼ cup coconut cream, and ½ cup spectrum sustainable organic palm shortening for 1-2 minutes using a stand mixer or a handheld electric mixer. It’s possible to do this by hand, but you’d need the upper body strength of an athlete, which I most certainly do not have.

Add ¼ cup melted coconut oil and 1 teaspoon vanilla. Mix for another minute.

Sift in 4 ½ cups powdered sugar, 1 cup at a time, mixing for at least a minute between each addition.

Divide the frosting into 3 bowls.

Add vegan food coloring to each bowl of frosting and mix well (I used the stand mixer with the whisk attachment).

pastel colored vegan coconut frosting

Assembling a Layered Coconut Cake

Cut out circles from your lasagna pan of cake using the largest of a set of biscuit cutters (assuming you want to make the size I made). I was able to get 6 mini cakes out of my lasagna pan, so I could make two cakes that each had 3 layers.

cutting out layers for mini vegan coconut cakes

Stack the first of the three layers of cake onto a cake surface. Think carefully when choosing your cake surface. Are you giving this cake to someone and don’t want them to have to remember to return a dish? If so, I recommend making (or buying) a disposable cake board. Since these cakes are mini, you can easily cut a 5-6-inch circle out of a cardboard box and wrap it in foil or anything else you have.

Top the bottom layer of coconut cake with some coconut frosting. If you’re using colored frosting like I did, you can use a different color between each cake layer or all the colors between each cake layer. It’s totally up to you. You’re the cake artist this time, not me.

Smooth out the layer of frosting using an offset spatula and a cake decorating turntable (if you have them). If you don’t have these items, just do your best with whatever you have.

Repeat until your cake is 3 layers tall.

assembling a unicorn-colored mini vegan coconut cake

Coat the entire cake in a thin layer of frosting. It’s okay if some crumbs get into the frosting layer, because this is called the crumb coat. It’s the coat of frosting that’s underneath the pretty layer.

mini vegan coconut cake with a crumb coat of frosting

Chill the cake in the fridge or freezer until the crumb layer is firm when you touch it. While it chills, you can start on your buttercream transfer if that’s the method you want to use.

Decorating a Cake Using the Buttercream Transfer Method

Fill a disposable piping bag with the remaining frosting in bowl 1. Repeat with the other colors of frosting so each color is in it’s own disposable piping bag (you don’t have to use disposables, but people don’t usually have enough reusable piping bags for all the colors).

Cut acetate or parchment paper to a couple inches bigger than the circumference of your cake, and tape it down to the table or counter.

Draw your design onto the acetate or parchment paper by piping swirls of colored frosting all over.

making a pastel swirl buttercream transfer for the the mini vegan coconut cake

Wrap the acetate or parchment paper with your frosting design around the entire perimeter of the cake.Then place the cake back in the freezer with the acetate or parchment paper stuck on the sides. It will peel off easily once the frosting is completely frozen.

mini vegan coconut cake wrapped with a pastel swirl buttercream transfer

Set the frosting bags side-by-side inside of a piping bag fitted with a large Wilton star tip 1M (or any large tip you prefer).

Pipe the colored frosting onto a plate or a napkin until it starts to come out swirled (all colors showing).

Remove the cake from the freezer after 2 hours of freezing. Slowly and carefully peel the acetate or parchment paper off of the cake.

Trim any walls that are taller than the top of the cake.

Pipe the colored frosting around the perimeter of the top of the cake in any design you like.

Sprinkle vegan sprinkles all over the top of the cake.

top view of the mini vegan coconut cake after decorating

mini vegan coconut cake after decorating

Decorating a Cake Using the Buttercream Splotches Method

Dab different colored splotches of frosting all over your cake using an offset spatula or just a butter knife.

Smooth it out using a bench scraper/chopper and a cake decorating turntable (if you have them).

an alternative way of decorating the mini vegan coconut cakes

I also added a chocolate ganache drip to this one, because chocolate and coconut taste so good together.

Storing your Cake

Freeze the cake until frosting is hard to the touch. You only need to do this if you’re making the cake in advance or preparing it for a car ride. Otherwise, it can stay in the fridge or on the counter in a cake stand with a dome top if you plan to serve it within a day.

Wrap the cake with plastic wrap so that no air can get to it.

Freeze the cake until 12-24 hours before you’re ready to serve it or until right before you’re ready to deliver it.

Defrost in the fridge for 12-24 hours, and then remove it from the fridge 30 minutes before you want to serve it. Remove the plastic wrap as soon as it comes out of the fridge.

slice of the mini vegan coconut cake

Tips, FAQ, and Substitutions

Can I convert this 4-inch cake recipe into a 8-inch or 9-inch cake recipe or a cupcake recipe?

  • To make this into an 8-inch or 9-inch round cake, just divide the batter evenly into the 2 cake pans and bake them for 30 minutes, or until a toothpick inserted in the center comes out clean.
  • To make this into cupcakes, line 2 cupcake pans with cupcake liners instead of lining a lasagna pan with parchment paper. Fill the cupcake liners ⅔ of the way full. Bake them on the same rack in the oven (if possible) for 21-25 minutes, or until a toothpick inserted in the center comes out clean.

Can this recipe be easier or faster?

This recipe is already easy to make, but if you’re short on time and don’t care about the colors, just skip all the parts where you use food coloring and make a white coconut cake with white coconut frosting.

Is there a way to make this recipe healthier?

Skip the frosting! This vegan coconut cake recipe is so moist and flavorful, that you won’t even miss the frosting! Just bake it in your lasagna pan and cut it into squares and serve. You can even add some berries to the side and call it breakfast.

Can this vegan coconut cake be made gluten free?

Sure! Just swap out the all-purpose flour with whatever gluten-free flour blend you prefer.

What’s the best way to store leftover cake?

This is obviously a trick question because there’s no such thing as leftover cake. I know this because I eat 3 servings of cake a day. But, in a hypothetical scenario where there is somehow leftover coconut cake, just wrap it in cling wrap and keep it in the fridge for a week or in the freezer for a few months.

slice removed from the mini vegan coconut cake

Can I use less sugar?

Yes! My dad always asks me to reduce the amount of sugar in my desserts by a third when I’m baking for him, haha. I must have gotten my sweet tooth from my mom. You can reduce the amount of sugar in this cake recipe from 1 ½ cups to 1 cup, and it’s still delicious.


  • You can substitute the tablespoon of apple cider vinegar with white distilled vinegar. You just need some sort of vinegar to interact with the baking soda to make the cake rise.
  • Since you’re blending the coconut, coconut flakes can be used in place of the shredded coconut.
  • You can use any nondairy milk in place of the can of full-fat coconut milk, but it will affect the flavor intensity and moistness of the cake. If you’re worried about the cost of canned coconut milk, I use the organic 365 brand from Whole Foods because it’s cheap.
  • You can replace the can of coconut milk with a can of coconut cream.
  • You can replace the ⅔ cup melted coconut oil with ⅔ cup sunflower oil or safflower oil (or any vegetable oil).
  • For the vegan butter or margarine, I like to use the organic whipped earth balance. Keep in mind this one does have soy, so if you avoid soy, try the soy-free earth balance.
  • If you don’t have any piping bags, you can use ziplock bags or sandwich baggies with twist ties to keep the frosting from leaking out the top.

baggies of vegan pastel colored frosting

If you make this cake, snap a pic and post to instagram and tag me @vegandollhouse. I love to see your creations!

For other cakes with coconut, check out my german chocolate cake or my mounds cake recipes.


* I use mostly organic ingredients when I cook, but I realize that not everyone has the disposable income to purchase all organic ingredients. Therefore, I only specify organic on the ingredients that really matter - when buying the organic (or non-GMO) version is the only way to ensure that the item is vegan.


Your website/recipes are so well done! I can't wait to try some out. Thank you!
HeavyDoseOfLavender -⭐⭐⭐⭐⭐

I love the way you styled and photographed this, it's really creative and eye catching.
HistoryLessons62 -⭐⭐⭐⭐⭐

This looks so tasty! Thank you for sharing!
doughytub -⭐⭐⭐⭐⭐

This is firing on all cylinders for me.
kittheren -⭐⭐⭐⭐⭐

This is adorable! I've seen your recipes a couple of times before and they're always so pretty and creative!
pepperohni -⭐⭐⭐⭐⭐

midazo-lam -⭐⭐⭐⭐⭐

Everything about this is adorable.
saturatedsilence -⭐⭐⭐⭐⭐

how yummmyyyyyyy it looks wow
tropicalswamp -⭐⭐⭐⭐⭐