This coconut flour chocolate cake is perfectly moist with a rich chocolate flavor.

This is the best coconut flour chocolate cake recipe ever! With one bite, you will be convinced. My friend kept requesting I make her that chocolate cake with that tasty icing. She has discerning tastes and doesn’t eat gluten-free. It felt like the biggest compliment.
Coconut flour has a reputation for creating baked goods that are dense and taste like sawdust. Even if you overmeasure your coconut flour, creating a thicker cake, it will just taste like a brownie. No sawdust taste, I promise!
Coconut Flour Chocolate Cake Tips & Tools
For this recipe, you will need:
- Two 8-inch Cake Pans
- Parchment paper
- Three medium to large mixing bowls
- Whisk
- Measuring spoons & cups
When measuring your coconut flour, scoop the coconut flour and then take a knife and run it over the measuring cup to remove any excess. Never add a “heaping” cup of coconut flour to your recipe. Coconut flour is very absorbent and can cause your batter to become too thick.
Coconut Flour Chocolate Cake Ingredients
Because we’re baking with coconut flour, which is naturally gluten-free, we’ll need extra binders (think eggs), so don’t be shocked when you see how many there are! Most of the ingredients are pretty typical, but I’ve included comments where quality matters or you can DIY an ingredient for extra points.
- 8 large eggs, room temp
- 3/4 cup sugar (you can also sub in coconut sugar)
- 1/2 cup coconut oil, melted (I linked to my favorite storebought coconut oil – here’s how I find good-quality coconut oil; you can also make your own coconut oil at home)
- 1 tablespoon vanilla extract (can also make your own vanilla extract at home)
- 1/4 teaspoon sea salt
- 1/2 cup cocoa powder
- 1/4 cup coconut flour (here’s how I identify good-quality coconut flour)
- 1 teaspoon baking powder (you can DIY baking powder very easily)
- 1 cup peanut butter/almond butter/cashew butter/sunbutter
- 6 tablespoon cocoa powder
- 6 tablespoon powdered sugar/maple syrup/raw honey
- 1/2 cup water (more if needed)

What brand of coconut flour should I use?
I prefer to do all of my baking with Bob’s Red Mill coconut flour, but you can use any other brand of coconut flour.
Can I use almond flour instead?
I only tested this recipe with coconut flour, and I do not recommend you use almond meal instead. The two flours aren’t easily interchangeable. (Almond flour can tend to lead to greasy bakes if not properly balanced.)
Can I make this recipe egg-free?
I tested this recipe with eggs, but you could try using these egg replacement ideas to replace the eggs. You can try replacing the eggs with a “chia egg,” bananas, applesauce, or whatever you usually use in place of eggs. Beware the cake will be denser if you use an egg replacement.
Egg replacement options:
- chia egg: 1 tbsp of chia seeds + 2.5 tbsp of water = 1 large egg.
- 1/4 cup ripe mashed banana replaces one large egg
- 1/4 cup of applesauce replaces one large egg
How can I make this recipe sugar-free?
You can easily make this chocolate cake sugar free by using erythritol instead of coconut sugar. But you must use a sugar replacement that is measured cup for cup. Stevia does not work as a sugar replacement in this recipe. For the icing, you would need to use powdered erythritol.
Print
Coconut Flour Chocolate Cake
This coconut flour chocolate cake is perfectly moist with a rich chocolate flavor covered in a chocolate peanut butter icing.
- Prep Time: 15 minutes
- Cook Time: 20 minutes
- Total Time: 30 minutes
- Yield: 2 cake layers, 12 slices 1x
- Category: Dessert
- Cuisine: American
- Diet: Gluten Free
Ingredients
Cake Ingredients:
- 8 large eggs, room temp
- 3/4 cup sugar (coconut sugar and erythritol work well)
- 1/2 cup coconut oil, melted
- 1 tablespoon vanilla extract
- 1/4 teaspoon sea salt
- 1/2 cup cocoa powder
- 1/4 cup coconut flour
- 1 teaspoon baking powder
Frosting Ingredients:
- 1 cup peanut butter/almond butter/cashew butter/sunbutter
- 6 tablespoon cocoa powder
- 6 tablespoon powdered sugar/maple syrup/raw honey
- 1/2 cup water (more if needed)
Instructions
- Preheat oven to 350°F (177°C). Line two 8-inch cake pans with parchment paper.
- In a large mixing bowl, whisk together the egg, sugar, coconut oil, vanilla, and salt.
- In a separate bowl, using a sifter, sift the cocoa powder, coconut flour and baking powder to remove any clumps.
- Stir in the dry ingredients with the wet ingredients.
- Pour half of the batter into each cake pan and immediately place in the oven.
- Bake for 20 minutes, until the tops are firm to the touch and a toothpick inserted in the middle of the cakes comes out clean. Place the pans on a wire rack and let the cakes cool completely in the pans.
- Store decorated or undecorated cake in the fridge or freezer. Can be refrigerated for up to 7 days. Do not store at room temperature because the cake will go mouldy fast. Coconut flour baked goods tend to go bad faster than regular baked goods.
For the frosting:
- In a large-sized mixing bowl, add the peanut butter, cocoa powder, and powdered sugar and start whisking or use a hand mixer.
- Add tiny amounts of water until the icing is at your desired thickness but still spreadable.
- Can be stored in the fridge for 7 days.
Notes
Nutrition is based on cake made with coconut sugar, without frosting.
Nutrition Facts
- Serving Size: 1 slice
- Calories: 191
- Sugar: 12.5g
- Fat: 13g
- Carbohydrates: 15.5g
- Fiber: 2.3g
- Protein: 5g
Learn the basics of baking with coconut flour with these coconut flour recipes!
You May Also Like These Recipes:





Can you use egg whites and whip them for fluffy texture like in your white coconut flour cake?
Yes, you can do that with this recipe to make it nice and fluffy! Otherwise, it will be a denser chocolate cake 🙂
HI~
can you tell me how you anazlyze th enurtritional values in your recipes? I just ran this is Verywell Fit nuc calculator and got a carb count of 23 g per slice WITH ERYTHRITOL! I am really confuesd…like yours better LOL
Just delicious. What a lovely treat and totally guilt free with Lakanto. Thank you!
Hi Tiffany,
I do love to cast an eye over your recipes as im lactose intolerant. Sadly, here in the uk, we dont use ‘cups’ as they are not accurate enough. Would it be possible to let me have the measurements for this coconut flour choc cake in grams or ounces, please. Many thanks, Aaje
I use the weight chart on the King Arthur Flour website to convert recipes using cups to grams, it works well for me.
Can you use egg whites and whip them for a fluffier cake like with your coconut white cake?
very nice recipe
Yum! what a great recipe. I have everything in my pantry.
What happens if I use 9″ pans instead of 8″?
Hi, Just wondering if I can substitute Cocoa for Cacao?
Sure!
If I use substitute sugar such as stevia how would that affect the nutritional value for the recipe? Thanks
Can I substitute the coconut oil for canola?
Hi, I’m wondering if I can use 9 inch pans or if I need to go buy some 8 inch for this recipe
Can I sub sun butter for the peanut butter?
Yes, sunbutter would work just fine.
I can’t handle cocnut oil. Can u sub with butter ?
Do I need to add Xantham gun to this recipe? I am using an organic coconut flour bought at an Amish Farmer’s market.
Do I have to change the recipe for high altitude? We live in Denver…about 5,000 ft. Above sea leve
Hola Tiffany ; Mi país está en estado de emergencia, y una de las medidas es que debemos quedarnos en casa para no propagar el virus. Desde tu casa hago un homenaje a todos los sanitarios del mundo, que están exhaustos,pero siguen adelante.
Todo lo negativo tiene su parte positiva, las familias permanecerán más tiempo juntas, con juegos, películas etc . Y aquí yó tendré un papel primordial alimentandoles y no habrán prisas para volver al colegio, ó volver a la oficina. Maravilloso!. Siempre andamos con el cohete en el trasero, pues ahora aprenderemos a disfrutar en familia.
Entonces quiero hacer ésta receta, pero como cupcake y ponerle el último frosting que has hecho. Cuanto tiempo debo de tenerlos en el horno?
Y cuantos saldrán con ésta cantidad de ingredientes?
Éste mes de recogimiento le daré duro al horno ja ja ja ja
Tiffany, Gracias de antemano por tu respuesta y por tu tiempo. Besitos
Same one can answer my questions? Thank so much
Sorry, Wendy! I don’t speak Spanish. I used google translate and it says you want to know if you can make cupcakes and how many? If so, yes you can use this for cupcakes and it’ll make 12.
Hope this helps!
I halved the recipe, otherwise followed the recipe exactly. It came out dry and spongy. Not sure what I did wrong
I followed the recipe exactly and mine came out spongy and oily with an okay chocolate flavor. Not one I will try again. The peanut butter frosting is good–how can you go wrong with peanut butter and cocoa?
Can I replace the sugar with maple syrup? I think I’d reduce it to 1 /2 cup because it’s sweeter than sugar.
I just made this recipe (except I used oatmeal flour instead of coconut as that is what I had on hand) for my daughter’s birthday cake. It was very tasty and very moist. My daughter asked me to send her the pin, that is the true test of the recipe! Thanks ?
Made a 9 x.13 x 2 inch chocolate cake with a doubled recipe for a diabetic’s birthday party. Turned out great..
…used cream cheese instead of peanut butter in the frosting. Making it again for our senior’s meeting next week. Thank you.
Greetings from Spain! We made the cake, and it came out wonderful. Very spongy, since I first beat the eggs with an electric whisk for about 6 minutes, until they were extremely frothy. Then I added the sugar, beat some more, then the coconut oil, beat some more, so right before I added the dry ingredients the “wet” mixture was full of air. Terrific recipe, and thanks for sharing.
Had some problems! I melted coconut oil but it kept rehardening especially when I put the eggs in! The cake stuck to the parchment paper! When I cut it you can see rehardened spots of coconut oil! Don’t taste the chocolate at all ; just strong coconut!
Always use room temperature eggs when working with butters/oils
Hi there, if I want to use erythritol would I use the same quantity as the sugar? Thanks! I’m new to this 🙂
Yes! Erythritol can be used 1:1 as sugar in recipes.
Hello! Can I use stevia instead or honey?
Cake was pretty bland and the frosting was just too much, and that’s coming from someone that loves peanut butter.
Hi Tiffany! Thank you so much for sharing your site with us. We appreciate all that we learn from you about making healthy and yummy choices. I do not know if this is possible, but all the continuous “pop-up” ads and information pose a big challenge for my eyesight, so is there any way to quash them, or turn them off? Thanks in advance for investigating this question for a zealous fan in her 60’s. Blessings, Leslie
Thank you for sharing your experience, Leslie. You are not the first to say something about the pop-up video. I’ve contacted my ad company and will be making changes.
Thanks again! 🙂
If I want to easily read a recipe I click on “print”, and very rarely are there advertisements. I don’t have eyesight issues, but it’s super hard to read recipes with all the ads loading and moving around what you want to read. I have also found it easier to read recipes on my laptop rather than my phone. Hope this helps.
You need to put in there that erythritol is deadly to dogs and cats so people should be very careful pets don’t get tastes
Actually it’s xylitol that’s deadly for dogs. Unknown for cats.
I think it is xylitol that is harmful to your pets….never have had any problems sharing something I’ve made with erythritol in it with my black lab, Mike.
Can I substitute King Arthur Unbleached Flour for the Coconut Flour+ Can I use 1/2 the applesauce for 4 eggs+ 4 eggs? Thank You
Hi Barbara, sorry you can not make this recipe with King Arthur Unbleached Flour. It would be better for you to find a regular chocolate cake recipe and use apple sauce to replace the eggs.
For those who don’t want to use eggs in recipes, the past several years I’ve used the product ENER-G Egg Replacer. Comes as a white powder in a box & for 1 egg you use 1 1/2 tsp egg replacer & 2 tablespoons water. The front of the box says gluten free, wheat free, no preservatives, artificial flavorings or sugar added. No cholesterol. Also says A Culinary Egg Substitute. Says Contains no eggs or animal protein. One website says no nuts. I’ve used this for years in any baked goods calling for eggs & the muffins, cakes, pancakes, banana breads etc always come out with same texture as if I had used eggs. I won’t bake without it. There are recipes on the box for things like pancakes, lemon pie filling, quiche, banana bread etc. I’ve found the best way to use it is to put the dry powder of how many egg equivalents in with the dry ingredients & mix well then add the water part of how many eggs (2 TBSP per egg) to the wet ingredients. Thought I’d post this as I see many questions on different sites on how to replace eggs. I’ve found it in health food stores but would imagine it could be found at other places. Says Amazon has a vegan ENER-G egg replacement.
On the ENER-G website.
Mimics what eggs do in recipes to bind baked food together, but it’s completely egg-free. The Egg Replacer simplifies baking for people who cannot use eggs. Use it to replace both egg whites as well as egg yolks.
One 16 oz Package equals approximately 100 eggs.
What a wonderful cake !!!! Thank you !! I’ll bake it next week-end….
Thanks a lot for all your recipes !