Nanaimo bars are a Canadian no-bake bar cookie built from three layers: a dense cocoa-coconut-walnut base, a vanilla custard buttercream center, and a firm chocolate top. Assembly takes about 35 minutes and the refrigerator does the rest. The real reason to make them is that they cut into neat, sturdy squares that travel and package exceptionally well — no crumbling, no frosting smearing, no special container required.
Shopping notes
- Custard powder: Bird’s is the standard and is sold at most grocery stores in the international aisle, as well as online. It’s not the same as instant pudding mix — it’s unsweetened and starchier — but vanilla instant pudding mix works as a swap in a pinch (the flavor will be slightly sweeter).
- Dutch-processed cocoa: The recipe calls for it in the base. It gives a smoother, less sharp chocolate flavor than natural cocoa. Either will work, but Dutch-processed is worth seeking out here since the base isn’t baked and the cocoa flavor comes through directly.
- Graham cracker crumbs: Buy them pre-crumbed or pulse whole crackers in a food processor. You want fine, even crumbs — not chunks — so the base presses together firmly.
- Semisweet chocolate for the top: Use a bar or good-quality baking chocolate rather than chips. Chips contain stabilizers that can make the top layer slightly grainy and less glossy once set.
The technique that matters
The step that trips people up most is adding the beaten egg to the hot butter-cocoa mixture. You need to pull the saucepan off the heat first, then stir the egg in quickly and continuously. The residual heat cooks the egg just enough to thicken the mixture — that’s what binds the base and gives it its dense, fudgy texture rather than a crumbly one. If the pan is still on the burner when the egg goes in, you risk scrambled bits. Work fast, keep stirring, and the mixture will tighten up within about 30 seconds. Everything else in this recipe is straightforward mixing.
Mistakes to avoid
- Not pressing the base firmly enough: A loosely packed base will fall apart when you slice the bars. Use the flat bottom of a measuring cup or a glass to press the mixture down hard and evenly into every corner of the pan.
- Spreading the buttercream over a warm base: If the base hasn’t cooled completely in the fridge, the buttercream will soften and drag rather than spread cleanly. Give the base at least 15 minutes of chill time before touching it.
- Pouring chocolate that’s too hot over the buttercream: Hot chocolate will melt the buttercream layer underneath and the two will bleed together. Let the melted chocolate cool for 3 to 5 minutes — it should feel just warm to the touch — before pouring.
- Cutting bars straight from the fridge without scoring first: Cold chocolate on top is brittle. If you slice straight through with a heavy hand, the top layer cracks and shatters. Instead, let the bars sit at room temperature for 5 minutes, then score the chocolate top lightly with a sharp knife before cutting all the way through.
- Skipping the sifting on the confectioners’ sugar: Lumps in the buttercream layer are hard to smooth out once you start spreading. Sift the sugar before creaming — skip the garnish, not this step.
Keeping it fresh
Store cut bars in an airtight container in the refrigerator for up to one week. Layer them between sheets of parchment or wax paper so the chocolate tops don’t stick together — this is especially important if you’re boxing them up as gifts. For longer storage, Nanaimo bars freeze well: wrap the uncut slab tightly in plastic wrap, then foil, and freeze for up to three months. Thaw overnight in the refrigerator, then cut. If you’re making them ahead for an event or for gifting, the uncut slab actually holds its shape better than pre-cut bars during transport, so wait to slice until you’re ready to serve or package.

Nanaimo Bar
Equipment
- 8x8-inch baking dish
- Mixing Bowls
- Saucepan
- Spatula
Ingredients
For the Bottom Layer:
- ½ cup unsalted butter melted
- ¼ cup granulated sugar
- ¼ cup cocoa powder preferably Dutch-processed
- 1 large egg beaten
- 1 teaspoon vanilla extract
- 2 cups graham cracker crumbs
- 1 cup shredded coconut sweetened or unsweetened
- ½ cup walnuts finely chopped
For the Middle Layer:
- ½ cup unsalted butter softened
- 2 cups confectioners' sugar sifted
- 2 tablespoons custard powder such as Bird's
- 2 tablespoons milk
For the Top Layer:
- 4 ounces semisweet chocolate
- 2 tablespoons unsalted butter
Instructions
- Bottom Layer: In a saucepan, melt 1/2 cup of butter over low heat. Stir in the sugar and cocoa powder until smooth. Remove from the heat and quickly mix in the beaten egg to thicken. Add vanilla, then mix in graham cracker crumbs, coconut, and walnuts. Firmly press the mixture into the bottom of an ungreased 8x8 inch baking dish.
- Middle Layer: In a medium bowl, cream together softened butter, confectioners' sugar, custard powder, and milk until light and fluffy. Spread evenly over the bottom layer and chill until set, about 15 minutes.
- Top Layer: Melt semisweet chocolate with butter over low heat, stirring until smooth. Allow cooling slightly. Pour over the chilled middle layer, spreading evenly. Chill again until chocolate is set, about 10 minutes.
Notes
Lori’s Tips:
- For a twist, add a tablespoon of instant espresso powder to the bottom layer for a coffee-infused base.
- If custard powder is unavailable, try an equal amount of vanilla pudding mix.
- Ensure each layer is fully set before proceeding to the next for the best presentation.
- Adjust sugar levels to taste.
Nutrition
Your questions, answered
Can I make Nanaimo bars without walnuts?
Yes — leave them out entirely and the bars will still hold together fine. You can substitute an equal amount of finely chopped pecans or almonds, or simply increase the graham cracker crumbs by a few tablespoons to keep the base density consistent.
Do Nanaimo bars need to be kept refrigerated?
Yes, refrigeration is required. The buttercream middle layer contains butter and milk and will soften significantly at room temperature within an hour or two. For gifting or transport, keep them in a cool bag or insulated box and they’ll be fine for a few hours out of the fridge.
Can I use unsweetened coconut instead of sweetened?
Either works. Unsweetened coconut gives a slightly less sweet, more textured base, which many people actually prefer since the buttercream and chocolate layers are already quite sweet. The difference in the final bar is subtle.
Why did my chocolate top crack when I cut the bars?
The chocolate layer is brittle when very cold, so cutting straight from the refrigerator causes it to shatter. Let the bars sit at room temperature for about 5 minutes, then use a sharp knife warmed briefly under hot water and dried before each cut.
Try these next
- Biscoff cheesecake bars
- Nutty maple blondies with tahini
- Tropical lime bars with toasted coconut
- Sweet Canadian maple cream sandwich cookies