There is a reason that my Keto Nanaimo Bars are widely considered the best. It was my favorite dessert as a kid! And as a stickler for taste and texture, I worked overtime to make this recipe as close to the original as possible. Now it’s one of my most popular no-bake keto desserts.
They’re almost as popular as my keto peanut butter bars, and that’s saying something!

If you are scratching your head, wondering exactly what they are, you are not alone. They aren’t a well-known dessert outside of Canada, although they have has become increasingly popular in the United States. They consist of a dense chocolate crust, a sweet vanilla layer that’s somewhere between frosting and pudding, and a rich chocolate topping. And once you try my low carb Nanaimo bars, you will be hooked.
Wondering how to pronounce the name? Repeat after me: “Na-Nigh-Mo”. Nanaimo. It’s a small city on Vancouver Island, and originally comes from the anglicized version of a First Nations word meaning “big, strong tribe”.
Reader’s Thoughts
“These are one of the best desserts I’ve ever had. We LOVE them, especially the crust, which I’ve been using for all kinds of keto deserts. There are a lot of steps here, but the final product is worth it!” — Zhenya

Why you will love this recipe
- Three indulgent layers: My keto version has the same rich chocolate base, creamy custard filling, and a silky chocolate topping as the original.
- Made with healthier ingredients: This recipe contains no instant pudding mix or custard powder, just high-quality keto-friendly staples.
- Freezer-friendly: You can make these bars in advance for holidays, potlucks, or just to have some sweet treats on hand.
- Customizable: You can easily adapt these bars to be dairy-free or nut-free.
- Canadian nostalgia: My fellow Canadians will be delighted to enjoy Nanaimo bars again, without blowing their macros!
- Crowd-pleaser: I’ve served these bars to keto dieters and non-keto folks alike. Everyone always loves them!
Ingredient notes

- Heavy whipping cream: This helps make the luscious vanilla cream filling for these bars.
- Almond or hemp milk: I updated the filling with a bit of nut milk to lighten it up just a touch. You can use all heavy cream if you prefer.
- Sweetener: I recommend using powdered sweetener for both the crust and the filling.
- Cream cheese: Conventional Nanaimo bars don’t use any cream cheese, but this allows for a thicker filling without using a ton of sweetener.
- Cocoa powder: I prefer Dutch process cocoa powder as it has a deeper, richer chocolate flavor.
- Almond flour: This replaces the graham cracker crumbs in the original bars.
- Shredded coconut: If you really don’t enjoy coconut, you can use more almond flour instead.
- Nuts: Nanaimo bars almost always have some chopped nuts in the crust.
- Sugar free chocolate: Do note that this isn’t the same as unsweetened chocolate, which contains no sweetener whatsoever. You do want some sweetness in the topping. I usually use Lily’s dark chocolate.
- Kitchen staples: Butter, eggs, vanilla extract and salt.
Recipe overview: How to make Keto Nanaimo Bars
Don’t be daunted by the long ingredient list and lengthy instructions. These are actually quite easy to make, require no baking and are undoubtably worth it. And you get a little taste of Canada into the mix!

- Make some pastry cream: Traditional Nanaimo bars use custard powder for the unique texture and flavor. But custard powder contains cornstarch which isn’t keto friendly. My solution is to create an actual vanilla custard (aka pastry cream) to add to the filling. Preparing pastry cream is very much like making keto pudding on the stove.
- Prepare the crust: The ingredients for the no-bake crust are cooked together in a saucepan for a few minutes. This helps them bind together well before pressing the mixture evenly into a square baking pan. Then the crust is chilled for a little while to set and firm up.
- Complete the filling: While the crust is chilling, beat the cream cheese together with the butter until it’s nice and smooth, then beat in the the cooled pastry cream until combined. Don’t over-beat is as it can begin to separate. Some additional powdered sweetener gives it the classic Nanaimo bar flavor.
- Add the topping: Melt the chocolate and butter and spread evenly over the filling and let set.

Tips for Success
I created an early version of these keto Nanaimo bars back when I first started out on my low carb journey. Not being quite as adept at low carb dessert as I am now, I relied on sugar-free pudding mix to replace the standard custard powder. But I don’t use these things anymore as they have usually contain questionable ingredients.
My solution to this dilemma? Creating a real vanilla custard and mixing that into cream cheese and butter to achieve the requisite flavor and consistency of conventional Nanaimo bars. It’s so good and making custard (pastry cream) is easier than you think.
But keep a close eye on it! Mixtures like this can thicken up suddenly and you don’t want it to curdle. Be sure to stay close to your stove and not walk away while it’s cooking. And make this part first, as indicated in the recipe, so it has time to cool before you add it to the filling.
Chocolate toppings like this can crack as you try to cut them into bars. I recommend heating up your knife so that it slices through the chocolate more easily. I do this over the flame of my gas stove but dipping it into a glass of hot water works as well.
Dairy-Free Option: If you can’t tolerate dairy, you can use coconut cream and your favorite butter substitute in the pastry cream. For the crust and topping, coconut oil or another butter substitute will work nicely. Cut back to 6 tablespoons of coconut oil for the crust as it can be more greasy.
Nut-Free Option: Replace the almond flour with sunflower seed flour and use hemp milk or another nut-free milk for the pastry cream.
Sweetener Options
The sweetener you choose for this recipe definitely has an impact on how it turns out. The crust can be made with your favorite powdered sweetener, but the filling is more finicky. I’ve made it with both erythritol and allulose, and while both technically work, allulose can make it extra soft. This means it takes longer to set properly and it can be a little squishy when you try to cut the bars.
So I recommend erythritol for the filling. If you want to cut back on it more, you can use a little concentrated sweetener like stevia or monk fruit extract.

Frequently Asked Questions
This keto nanaimo bar recipe has 6.8g of carbs and 3.3g of fiber per serving. That comes to 3.5g net carbs per bar.
Store the bars in a covered container on the counter for up to 4 days or in the fridge for up to a week. You can also freeze them for up to 3 months.

Keto Nanaimo Bars Recipe
Ingredients
Pastry Cream
- 1/3 cup (78.86 ml) whipping cream
- 3 tbsp (45.65 g) almond or hemp milk
- 2 large egg yolks
- 1/4 cup (47.5 g) powdered sweetener
- Pinch salt
- 1 1/2 tbsp (21.3 g) butter, cut into two pieces
- 1 1/2 tsp vanilla extract
Crust
- 1/2 cup (113.5 g) butter
- 1/3 cup unsweetened cocoa powder
- 1/4 cup (47.5 g) powdered sweetener
- 1 large egg, beaten
- 1 tsp vanilla extract
- 1 cup (112 g) almond flour
- 3/4 cup (69.75 g) unsweetened shredded coconut
- 1/2 cup (54.5 g) chopped pecans or walnuts
Vanilla Filling
- 4 ounces (113.4 g) cream cheese, softened
- 1/4 cup (56.75 g) butter, softened
- Pastry cream, (from above)
- 6 tbsp (60.87 g) powdered sweetener
Chocolate Topping:
- 3 ounces (85.05 g) sugar-free dark chocolate, such as Lily’s, chopped
- 2 tbsp (28.4 g) butter
Instructions
Pastry Cream:
- In a medium saucepan over medium heat, bring the whipping cream and almond milk to a simmer. In a medium bowl, whisk the egg yolks with the sweetener and salt until well combined.
- Slowly whisk about half of the hot cream into the yolks to temper, then stir the yolk/cream mixture back into the remaining cream in the saucepan and cook until thick and glossy, about 3 to 4 minutes, whisking continuously.
- Remove from heat and whisk in the butter and vanilla. Let cool to room temperature.
Crust:
- In a medium saucepan over low heat, melt the butter. Stir in the cocoa powder and the sweetener, and then slowly whisk in the egg.
- Cook, stirring constantly, until the mixture thickens. Remove from heat and stir in the vanilla, almond flour, shredded coconut and nuts. Press the crust evenly into a 9×9 or 8×8 square pan and refrigerate until firm.
Filling
- Beat the cream cheese and butter until smooth. Beat in the cooled pastry cream until well combined, then beat in the powdered sweetener. Spread the filling over crust and refrigerate until firm, at least one hour.
Chocolate Topping
- Combine the chopped chocolate and butter in a heatproof bowl set over a pan of barely simmering water. Stir until melted and smooth. Spread over filling and let set.
Notes
Nutrition
Nutritional Disclaimer
Please note that I am not a medical or nutritional professional. I am simply recounting and sharing my own experiences on this blog. Nothing I express here should be taken as medical advice and you should consult with your doctor before starting any diet or exercise program. I provide nutritional information for my recipes simply as a courtesy to my readers. It is calculated using MacGourmet software and I remove erythritol from the final carb count and net carb count, as it does not affect my own blood glucose levels. I do my best to be as accurate as possible but you should independently calculate nutritional information on your own before relying on them. I expressly disclaim any and all liability of any kind with respect to any act or omission wholly or in part in reliance on anything contained in this website.
Free Bonus: Secrets to Keto Baking!
Sign up for your favorite recipes delivered straight to your inbox plus get our FREE bonus: Secrets to Keto Baking!






Do you know where I can buy pastry cream for the vanilla filling?
You don’t buy it…you make it. The instructions are right there.
I am soooo happy to find your recipe. I grew up in Nanaimo and actually attended the Sunday School in the church were Nanaimo bars are thought to have originated (a ladies auxiliary cookbook I believe) …can’t wait to try them…it’ll probably take me down a very looooong memory lane!
Good Afternoon. I have a question. any chance I can sub in the whipping cream. I know why it is needed but could I do almond milk and gluccie?
You can certainly give that a try, I am not positive it would work.
What is pastry cream? Where can I find that ingredient?
NM, i’m an idiot it’s the first thing to make… sorry!
Well, I made these last night so I thought I’d share my thoughts! First of all – very tasty! The only thing I did differently was use Baker’s Chocolate instead of Lily’s Chocolate – I followed everything else accurately.
1. While the middle cream layer is tasty, next time I will add more yolk (maybe 2-3 more yolks) to give it more of a custard flavour. Right now it just tastes like sweet butter. I also find it very soft – within minutes of being out of the fridge the cream layer begins to melt. Maybe decreasing the butter and increasing the cream cheese would help.
2. If you’re like me and don’t have Lily’s Chocolate, Unsweetened Baker’s Chocolate SOUNDED like a good idea. Except that adding powdered Swerve made it much too thick to pour. I added 5 tsp of Swerve to try to counter the bitterness, and it was still very bitter and also turned into a thick, gloppy mess. I tried liquefying it with more butter and cream but it didn’t help. When it came time to add the chocolate layer, it simply would not spread onto the cream layer. It began melting the cream layer and just sliding around on top – very frustrating. So I definitely recommend using a pre-sweetened chocolate and pouring it on top when it’s very liquid, so you don’t need to try to spread it around – because it will turn into a slip-n-slide.
3. The crust turned out delicious, but the ingredient amounts produced way too much crust. The layer was very thick. Next time I will decrease the crust ingredient amount by half for a thinner crust.
Hi Janna would using liquid Stevia drops work better with the chocolate ? As to the crust being too thick next time I make this I will use my 9 x 9 pan. I ended upscoring the chocolate and freezing my bars and ate them frozen as the custard was a bit squishy, next time I will add a little Xanthan gum, Carolyn suggested 1/4 tspn. Good luck 🙂
Carolyn’s recipe here gives you a good replacement for Lily’s https://alldayidreamaboutfood.com/2014/04/better-than-mounds-chocolate-coconut-candies-low-carb-gluten-free.html
I used krisida stevia sweetened chocolate chips and my chocolate topping still slid around! I’m not sure what I did wrong?
I’v never heard of that chocolate.
Made these yesterday, oh my I cant do portion control so I have eaten almost a quarter of them. My Pastry Cream is a bit squishy but sort of holds together, think that maybe I could have cooked my custard a little more, plus I cant get Swerve brand sweeteners here in Australia so used Natvia which is a combination of Stevia and Erythritol. Would a tiny touch of Guar or Xanthan Gum help to firm it up a bit? Forgot to put the Natvia through the spice grinder to powder it a bit so things are a bit crunchy but that isn’t stopping me :). I used Lindt 90% dark choc for the topping as I cant find any sugar free, it has set like a rock so I had to use a hot knife to score it. I will definitely be making this again, pleased to see that it can be frozen, that will slow me down a bit
Glad you like them so much. yes, a little xanthan gum would help it set more. Maybe 1/4 teaspoon?
Do you think, in the crust, I could sub the coconut out with golden flax meal? I just not a fan of coconut texture.
Sure that should be fine.
Hi Caroline, I tried these Nanaimo bars and I really love them! But the fact is, that I am the only one in my house eating them (they don’t know what they’re missing! 😉 ), so I was wondering if they can be frozen…will the filling still be good after thawing or will it melt?
Anyway, thanks so much for your recipes….I think they are the best in the low-carb blogging world 😉
I think they should be fine after freezing and thawing. May be a tiny bit grittier in the filling, but worth it!
Great, thanks a lot!
Oh you wonderful lady! I miss Nanaimo bars since I had to go sugar-free and they were my absolute favorite. Now I can have them again! Blessings to you!
I made these yesterday as our dessert for Christmas Dinner; what an awesome recipe! Thank you!! FYI I chose to go with xylitol instead of erythritol (because I forgot to buy some before 10 pm on Christamas Eve – oy!) and the bars turned out so sweet and wonderful. Honestly, Nanaimo Bars can be a major temptation for me – as in “eat the whole box full” if I’m in a derailable-from-keto mood – so knowing that these exist is a big deal. Love your site. Now…how do I go about buying a nut flour company? 😉
Glad you liked them so much.
Can I substitute out almond flour for coconut flour? If so how much ?
thanks!!
No, not in this recipe. it would be awful!
What is pastry cream? I googled it and it has sugar in it.
Please read the recipe more carefully. I give you instructions for making your own pastry cream (without sugar) in step 1, which you then use in the filling in step 3.
Wow, amazing. A godsend for the diabetics, gluten-free and keto dieters at last night’s Christmas party.
help help help………went to make your nanimo bars……lost the recipe I had written out and used before but found this one of yours………the HELP I need is the pastry cream?????? I do not remember this before …..QUESTION……..in all your recipe you do not say where or when to put in the pastry cream???? or am I missing it……..please respond soon as I have been craving these for a week now……edna midland Ontario canada
It says very clearly, under the FILLING section, to “beat in the cooled pastry cream”. Unless I am misunderstanding your question?
my apologies Carolyn but I sure missed that even though read it all a few times before commenting…….even after your reply it took me twice reading it before I saw it……guess this old 70yr old had better not read recipes at night …..hahahaha……sorry to have bothered you but as I stated I am been craving them for a week now and have been so upset I lost the recipe……it was found only because I was trying to get your recipe for your peanut butter chocolate chip blondies that I found this one and I got so excited……once again thanks for putting up with the old gal…….edna
That’s okay, I just wasn’t sure if you were asking something else and I was misunderstanding. You can always ask!
These are to die for. The weather has been really warm here on the West Coast so we love eating these frozen. Thank you so much for all your hard work and sharing the recipes with us. You are amazing.
Glad you like them! Frozen is a great idea.
These were so delicious and easy to put together. My filling was a bit squishy even after refrigeration but who cares…yummy!
Mine were squishy as well…I thought perhaps next time I’d let set longer but then I remembered the originals were squishy so I guess mine were perfect 🙂