This keto peanut butter cake is rich, tender, and deeply nutty. It comes together in one bowl with eight simple ingredients.
The coconut flour gives it a soft, slightly crumbly crumb, while the peanut butter brings a creamy, roasted flavor. A little cinnamon and vanilla round it out.

We bake it in a small pan, so it is perfect for a quiet evening when you want something sweet without the carbs.
Why you’ll love this recipe
This cake is the dessert we reach for when we want peanut butter without the sugar spike. It is moist in the middle, with a lightly golden top. Best of all, there is no special equipment needed, just a bowl, a whisk, and a small pan.
Ingredients
Full quantities are in the recipe card below.
- Butter: adds richness and moisture, and helps the cake brown evenly. Substitute with coconut oil or ghee.
- Creamy peanut butter: provides the main flavor and fat. Substitute with almond butter, though the taste will be milder.
- Swerve: a keto-friendly sweetener that does not raise blood sugar. Substitute with erythritol or allulose, adjusting to taste.
- Eggs: bind the batter and lift the cake as they set. Substitute with flax eggs for a vegan option, though the texture will be more fragile.
- Coconut flour: absorbs liquid and gives structure. Substitute with almond flour, using about twice the amount, though the texture changes.
- Vanilla extract: rounds out the peanut butter and makes the cake taste sweeter. Substitute with a few drops of almond extract.
- Baking powder: gives the cake its rise. Substitute with an equal amount of a gluten-free, aluminum-free baking powder.
- Cinnamon: adds warmth that pairs well with peanut butter. Substitute with nutmeg or simply leave it out.
How to make keto peanut butter cake
Step 1: Preheat and prepare the pan
Preheat your oven to 350°F (175°C). Grease a small 6-inch round pan with a little of the measured butter.
Step 2: Cream the butter and peanut butter
In a mixing bowl, beat the butter and peanut butter together until smooth. We find this step matters, because it traps air and keeps the texture light.
Step 3: Add the sweetener and eggs
Mix in the Swerve until blended. Add the eggs one at a time, beating well after each, so the batter becomes smooth and glossy.
Step 4: Mix in the dry ingredients
Stir in the vanilla extract. Then add the coconut flour, baking powder, and cinnamon, mixing until no dry streaks remain. Coconut flour is thirsty, so let the batter sit for two minutes to thicken.
Step 5: Bake until set
Spread the batter evenly in the pan and smooth the top. Bake for 22 to 25 minutes, until the center springs back and a toothpick comes out clean.
Step 6: Cool before slicing
Let the cake rest in the pan for 10 minutes. This lets the structure firm up, so it slices cleanly without crumbling.
Tips
- Use room-temperature eggs: they blend more smoothly with the butter and peanut butter.
- Measure coconut flour carefully: too much makes the cake dry and chalky, so spoon it into the cup and level it.
- Choose a no-stir peanut butter: oil separation can make the batter greasy, so stir it well before measuring.
- Do not overbake: keto cakes dry out quickly, so pull it out as soon as a toothpick comes out clean.
- Check your baking powder: an old tin may not rise, so test it in a little warm water first.
- Use a small pan: a thin layer bakes more evenly than a deep one, which can stay gummy in the center.
- Let it cool fully: slicing warm cake causes crumbling, since the coconut flour needs time to set.

Storage & make ahead
Keep leftover cake covered at room temperature for up to two days. For longer storage, wrap the cooled slices individually and refrigerate for up to five days.
To freeze, place slices in a sealed container with parchment between them. They keep well for up to three months. Thaw in the fridge overnight.
We like to serve it slightly chilled from the fridge, because the peanut butter firms up and the texture becomes denser and fudgier.
Variations
Chocolate peanut butter cake
Add a tablespoon of unsweetened cocoa powder to the dry ingredients for a richer, fudgy version. Reduce the cinnamon slightly so the chocolate stays in front.
Cinnamon swirl peanut butter cake
Swirl an extra half teaspoon of cinnamon through the batter before baking. The warm spice becomes more pronounced in each slice.
Frequently Asked Questions
Is peanut butter cake keto friendly?
Yes, this version is keto friendly because it uses coconut flour and Swerve instead of wheat flour and sugar. Peanut butter adds healthy fats, so the cake stays satisfying with low net carbs per slice.
Can I use natural peanut butter instead?
You can, but choose a creamy, no-sugar-added variety. Natural peanut butter with oil on top should be stirred well first, otherwise the batter may turn out greasy and dense.
Why did my keto cake turn out dry?
Coconut flour absorbs a lot of liquid, so too much flour or overbaking usually causes dryness. Measure carefully, spoon the flour into the cup, and check the cake at the minimum baking time.
Can I make this peanut butter cake in a larger pan?
A larger pan will make the layer thinner and it will bake faster. Check it early, around 15 minutes, and rely on a toothpick test rather than the timer alone.
Does this cake need frosting?
No, it is delicious plain, especially with a dusting of cinnamon. For extra indulgence, spread a thin layer of sugar-free peanut butter glaze on top once it has cooled.
Keto Peanut Butter Cake

Ingredients
- 1/4 cup Butter
- 1/4 cup Creamy Peanut Butter
- 1/2 cup Swerve
- 3 Eggs
- 1/4 cup coconut flour
- 2 teaspoons Vanilla extract
- 1.5 teaspoons Baking Powder
- 1.5 teaspoons Cinnamon
Instructions
- Preheat the oven to 350°F (175°C) and grease a small 6-inch round pan with a little of the measured butter.
- Beat the butter and creamy peanut butter together in a bowl until smooth and fluffy.
- Mix in the Swerve until fully blended.
- Add the eggs one at a time, beating well after each addition until the batter is smooth.
- Stir in the vanilla extract.
- Add the coconut flour, baking powder, and cinnamon, mixing until no dry streaks remain.
- Let the batter rest for two minutes so the coconut flour can absorb moisture and thicken.
- Spread the batter evenly into the prepared pan and smooth the top.
- Bake for 22 to 25 minutes, until the center springs back and a toothpick inserted comes out clean.
- Cool in the pan for 10 minutes, then transfer to a rack to cool completely before slicing.
Notes
- Coconut flour is very absorbent, so measure it by spooning into the cup and leveling off.
- For a firmer, fudgier texture, chill the cake for an hour before slicing.
- Calorie count is an estimate and will vary with the brands and sweetener used.

