Gluten-Free Coconut Cake
Published
This gluten-free coconut cake is soft, moist, and full of coconut flavor in every bite. Made with gluten-free flour, coconut milk, and shredded coconut, the cake bakes up into light, fluffy layers that pair perfectly with a creamy coconut cream cheese frosting. It’s a simple homemade gluten-free cake that feels special enough for birthdays and holidays but easy enough to bake anytime you’re craving coconut.

I wanted this gluten-free coconut cake to be light, moist, and fluffy with just the right balance of sweetness. The cake itself stays tender thanks to coconut milk and oil, and I mix sweet shredded coconut right into the batter for extra texture and flavor. The cream cheese frosting is one of my favorite parts because the slight saltiness balances all the sweetness from the coconut and sugar. It whips up smooth and creamy and spreads beautifully over the cake layers. If you prefer a more subtle coconut flavor, you can leave out the coconut extract, but if you love coconut desserts as much as I do, this cake really delivers. If you try it, I’d love to hear what you think in the comments!
What I Learned While Testing
- Use the gluten-free flour blend this recipe was tested with. I developed this cake using Pillsbury Gluten Free Flour, which already contains starches and binders that help the cake stay light and tender. Other gluten-free flour blends can have different ratios of rice flour, starches, or gums, which may change the texture.
- Weigh the flour if you can. Gluten-free flour is easy to over-measure when scooped with a cup. Even a little extra flour can make the cake dry or heavy, so using a kitchen scale helps keep the texture light and tender.
- Don’t overbake the cake layers. Gluten-free cakes dry out faster than traditional cakes. Start checking around the 20-minute mark and remove the layers when a toothpick comes out clean or with just a few moist crumbs.
- Let the cake layers cool completely before frosting. If the cake is even slightly warm, the cream cheese frosting will soften and slide, making the cake harder to assemble neatly.
- Use room temperature eggs, butter, and cream cheese. Room temperature ingredients blend more easily and create a smoother batter and frosting, which helps the cake bake evenly and the frosting whip up light and creamy.
- Mix the batter just until combined. Once the dry ingredients are added, stir only until no flour streaks remain. Overmixing can make the crumb tighter and less fluffy.
Gluten-Free Coconut Cake

Equipment
- 2 8-inch cake pans
Ingredients
For the Cake
- 2½ cups gluten-free flour, I use and recommend Pillsbury Gluten Free Flour. I cannot guarantee that other gluten free flours will work, since I have not tested them.
- ½ cup sweetened shredded coconut flakes
- 2 tsp baking powder
- 1 tsp salt
- 1½ cups sugar
- 4 eggs, room temp
- ¼ cup vegetable oil
- ¾ cup full fat coconut milk
- 1½ tsp vanilla extract
- 1 tsp coconut extract
For the Cream Cheese Frosting
- 8 oz cream cheese, room temperature
- 1 cup butter, unsalted
- 6½ cups powdered sugar
- 2 tbsp coconut milk
- 1 tsp vanilla
- ½ tsp salt
- sweetened shredded coconut flakes, for decoration
Instructions
- Preheat your oven to 350°F (180°C) and grease and line two 8-inch cake pans with parchment paper.
- In a medium bowl, mix the gluten-free flour, shredded coconut, baking powder, and salt until combined and set aside for later.
- In a large bowl, mix together eggs and sugar, then add in coconut milk, oil, vanilla extract, and coconut extract. Once mixed, add in dry ingredients and carefully stir until combined.
- Pour the coconut cake batter evenly between the two cake pans and bake them in the preheated oven for 20-25 minutes, until a toothpick inserted in the middle comes out clean.
- When the cake is done, let it rest on a wire rack for 5-10 minutes before removing it from the cake pans to let it cool down completely.
- While the cake is cooling, make the cream cheese frosting. Start with beating the butter and cream cheese together with a hand or stand mixer until light and fluffy looking.
- Carefully fold in the powdered sugar until mostly combined to prevent an explosion of powdered sugar, then continue to mix with the stand mixer until smooth. Then add in vanilla, salt, and coconut milk and mix a final time until smooth and silky.
- Once your cake layers are completely cooled, place a dollop of icing down on your turn table or cake stand, then add the first cake layer. Cover the top with an even layer of icing, then add the other cake layer.
- Use the rest of the frosting to evenly cover the entire cake. Then, while the frosting is fresh, use your hands to press more coconut flakes into the frosting on the sides and top of the cake or as desired.
- Slice and enjoy!
Nutrition
Nutrition information is automatically calculated, so should only be used as an approximation.
How to Make Gluten-Free Coconut Cake Step by Step

Gather the ingredients: Gather all the ingredients together. Preheat the oven to 350°F. Grease two 8-inch round cake pans and line the bottoms with parchment paper so the cakes release easily after baking.

Mix the dry ingredients: In a medium bowl, whisk together 2½ cups (365g) gluten-free flour, ½ cup (45g) sweetened shredded coconut, 2 tsp (8g) baking powder, and 1 tsp (6g) salt until everything is evenly combined and no lumps remain.

Mix the wet ingredients: In a large bowl, whisk together 4 room-temperature eggs and 1½ cups (330g) sugar until the mixture looks smooth and slightly lighter in color. Add ¾ cup (180 ml) full-fat coconut milk, ¼ cup (55 ml) vegetable oil, 1½ tsp (8 ml) vanilla extract, and 1 tsp (5 ml) coconut extract, whisking until fully combined and glossy.

Combine the batter: Add the dry ingredients to the wet ingredients and gently stir until no dry streaks remain. The batter should look smooth, thick, and pourable with small coconut flakes throughout. Avoid overmixing, which can make the cake dense.

Bake the cake layers: Divide the batter evenly between the prepared cake pans and smooth the tops with a spatula. Bake for 20–25 minutes, or until the centers spring back lightly and a toothpick inserted in the middle comes out clean or with a few moist crumbs. Let the cakes rest in the pans on a wire rack for 5–10 minutes, then carefully remove them from the pans and transfer them to the rack to cool completely before frosting.

Make the cream cheese frosting: In a large bowl, beat 1 cup (230g) unsalted butter and 8 ounces (230g) room-temperature cream cheese with a hand or stand mixer until light, fluffy, and smooth, about 2–3 minutes.

Add the powdered sugar: Add 6½ cups (618g) powdered sugar gradually, mixing on low speed at first to prevent the sugar from flying everywhere. Once mostly incorporated, increase the speed and beat until the frosting is smooth and thick.

Add the flavors: Add 2 tbsp (30 ml) coconut milk, 1 tsp (5 ml) vanilla extract, and ½ tsp (3g) salt, then mix again until the frosting becomes silky, creamy, and easily spreadable.

Assemble the cake: Place a small dollop of frosting onto your cake stand or turntable to anchor the cake. Set the first cake layer on top and spread a generous, even layer of frosting over it. Place the second cake layer on top and gently press to level.

Frost the cake: Use the remaining frosting to evenly cover the top and sides of the cake with an offset spatula.

Add coconut: While the frosting is still fresh, press sweetened shredded coconut flakes onto the sides and sprinkle more over the top for decoration.

Slice and serve: Slice the cake with a sharp knife and serve. Enjoy!

Serving Suggestions
This gluten-free coconut cake is one of my favorite desserts to bake in the spring. The light, fluffy coconut layers and creamy frosting make it perfect for spring gatherings, birthdays, or holiday meals. Around Easter, I love pairing it with a gluten-free pineapple upside-down cake since the bright pineapple flavor complements the coconut so well. And if you need to make the cake completely dairy-free (the cake layers already are), simply frost it with a dairy-free buttercream and add coconut flakes and a little coconut extract to keep that classic coconut flavor.
Storage Instructions
You can make this gluten-free coconut cake ahead of time if you want to break up the work. I often bake the cake layers a day in advance, then wrap them tightly and store them in the refrigerator once they’ve completely cooled. The frosting can also be made ahead and kept in the fridge. When you’re ready to assemble the cake, just let the frosting sit at room temperature for 20–30 minutes, then give it a quick whip again so it becomes smooth and spreadable.
Because the frosting is made with cream cheese, I store the finished cake covered in the refrigerator for up to 5 days. A cake carrier works best, but you can also loosely tent it with plastic wrap so the frosting stays neat. Before serving, I like to let slices sit at room temperature for about 20–30 minutes so the cake softens and the frosting turns creamy again.
If you want to freeze it, the cake layers freeze really well. I wrap each unfrosted layer tightly in plastic wrap and then foil and freeze them for up to 2 months. When I’m ready to use them, I thaw the layers overnight in the refrigerator and frost the cake the next day. You can also freeze frosted slices for later, though the coconut topping may lose a little bit of its texture once thawed.
More Gluten-Free Celebration Desserts
- Gluten-Free Crustless Coconut Pie: If you love coconut desserts but want something easier than a layer cake, this gluten-free crustless coconut pie is a great option. It bakes into a creamy custard-style pie with a lightly chewy coconut topping and comes together with simple pantry ingredients.
- Gluten-Free Birthday Cake: This gluten-free birthday cake is light, fluffy, and full of colorful sprinkles, making it perfect for celebrations. The soft vanilla cake paired with rich chocolate buttercream is a fun, festive dessert everyone can enjoy.
- Gluten-Free Coconut Cream Pie: If you’re a coconut lover like I am, you’ll also love this gluten-free coconut cream pie. It has a smooth coconut custard filling, a naturally gluten-free crust, and fluffy whipped topping for a creamy, classic dessert.
- Gluten-Free Yellow Cake: For a simple and classic cake option, this gluten-free yellow cake is always a reliable favorite. It’s soft, buttery, and perfect for frosting with your favorite buttercream for birthdays or special occasions.












