Every December, Nanaimo bars turn up on cookie trays across Canada, and every December the same two things go wrong: the custard layer slumps, and the chocolate top shatters into shards when you cut it. This version starts from the recipe the City of Nanaimo itself publishes, Joyce Hardcastle’s 1986 contest winner, adds gram weights and temperatures, and focuses on the steps that decide whether you get neat, three-layer squares or a delicious mess. It makes one 20 cm (8 in) square pan, about 25 small squares.
Where this recipe comes from
In 1986, Nanaimo mayor Graeme Roberts and Harbour Park Mall ran a four-week contest to find the definitive Nanaimo bar. According to the City of Nanaimo, almost 100 versions were submitted and Joyce Hardcastle’s won. The city still publishes her recipe, and The Canadian Encyclopedia reproduces it too. Our method keeps her proportions and ingredients, converts them to weights, and adds the technique notes that the original leaves to experience. For the bar’s longer history, including the competing claims about where it was first made, see our Nanaimo bar history and day trip from Victoria.

Ingredients
Bottom layer
- ½ cup (113 g) unsalted butter
- ¼ cup (50 g) granulated sugar
- 5 tbsp (about 30 g) cocoa powder
- 1 large egg, beaten
- 1¾ cups (about 210 g) graham wafer crumbs
- ½ cup (about 60 g) finely chopped almonds
- 1 cup (about 80 g) shredded coconut
Middle layer
- ½ cup (113 g) unsalted butter, soft but not greasy
- 2 tbsp plus 2 tsp (40 ml) whipping cream (35%)
- 2 tbsp (about 16 g) vanilla custard powder
- 2 cups (about 250 g) icing sugar
Top layer
- 4 oz (115 g) semi-sweet chocolate, chopped
- 2 tbsp (28 g) unsalted butter
About custard powder: it’s the ingredient that makes a Nanaimo bar taste like one. Bird’s is the brand most Canadian supermarkets stock, usually in the baking or dessert aisle. Vanilla instant pudding mix is a common swap, but it’s sweeter and slightly softer; cut the icing sugar by 2 tbsp if you use it.
Method
- Line the pan. Line a 20 cm (8 in) square metal pan with parchment, leaving two long flaps hanging over the sides. You’ll use them to lift the whole slab out for clean cutting. The original recipe uses an ungreased pan; the parchment sling is our addition.
- Cook the base (8 min). Melt the butter, sugar and cocoa in a heatproof bowl set over barely simmering water. Whisk in the beaten egg and keep stirring for 2 to 3 minutes until the mixture thickens and looks glossy, like a loose pudding. If you’ve a thermometer, take it to 74°C (165°F), Health Canada’s safe temperature for egg dishes; an instant-read thermometer makes this quick to check. Take it off the heat.
- Add the crumbs and press hard. Stir in the crumbs, coconut and almonds until every crumb is coated. Weigh the crumbs on a digital scale rather than packing a cup: crumbs vary a lot by volume, and too many make a base that crumbles. Tip into the pan and press very firmly with the bottom of a flat measuring cup, especially into the corners. Refrigerate for 20 minutes.
- Beat the custard layer (5 min). Beat the soft butter, cream and custard powder until smooth, then add the icing sugar a cup at a time and beat for 2 to 3 minutes until pale and fluffy. It should hold soft peaks. If it’s stiff, add cream a teaspoon at a time.
- Spread and chill (30 min). Spread the custard over the cold base with an offset spatula and smooth the top. Refrigerate until the surface is firm to a light touch, about 30 minutes. Pouring chocolate on soft custard is the main reason layers blur.
- Make the top (5 min). Melt the chocolate and butter together over low heat or in 20-second bursts in the microwave, stirring between each. Let it cool until it’s barely warm but still fluid, about 10 minutes. Pour it over the custard and tilt the pan to spread it thinly.
- Score, then chill. Refrigerate for 10 to 15 minutes, just until the chocolate turns matte, then lightly score the top into a 5 × 5 grid with a sharp knife. Return to the fridge for at least 2 hours more. Scoring now means the final cut won’t crack the set chocolate.
- Cut clean squares. Lift the slab out with the parchment. Let it sit at room temperature for 5 minutes so the chocolate is less brittle. Dip a long, sharp knife such as the Victorinox Fibrox 8-inch in hot water, wipe it dry, and cut along your score lines in one firm press. Wipe and reheat the blade between every cut.

Troubleshooting
| Problem | Likely cause | Fix next time |
|---|---|---|
| Base crumbles when cut | Not pressed firmly, or too many crumbs | Weigh the crumbs; press hard; chill before the next layer |
| Custard oozes out | Butter too warm, or not chilled before topping | Chill until firm to the touch before the chocolate goes on |
| Chocolate top cracks | Cut straight from the fridge with a cold knife | Score while matte; rest 5 min; use a hot, dry knife |
| Grainy middle layer | Icing sugar added all at once | Add it a cup at a time; beat 2 to 3 min |
| Chocolate seized | Overheated or a drop of water got in | Melt low and slow; keep the bowl dry |
Make ahead and freeze
Nanaimo bars keep well, which is why they’re a holiday staple. Store cut squares in an airtight container in the fridge, with parchment between layers, for up to a week. For longer storage, freeze the uncut slab or the squares wrapped tightly; thaw them in the fridge overnight so condensation doesn’t spot the chocolate. Health Canada recommends keeping your freezer at -18°C (0°F) or colder.
Variations worth trying
- Nut-free: leave out the almonds and add 30 g more graham crumbs. Check that your chocolate is made in a nut-free facility if you’re baking for a school or office.
- Mint: replace 1 tsp of the cream with peppermint extract to taste and tint the custard pale green, a common holiday version.
- Bigger batch: double everything for a 23 × 33 cm (9 × 13 in) pan; chill times stay about the same.
- Less sweet: swap half the semi-sweet chocolate for 70% dark chocolate.
More Canadian holiday baking
Pair these with our butter tarts for a properly Canadian cookie tray, or see what Québec families bake for the holidays in our guide to réveillon foods. If you’re in British Columbia this month, our Victoria Christmas markets guide covers where to find holiday bakes on Vancouver Island.
FAQ
Do Nanaimo bars need to be refrigerated?
Yes. The middle layer is mostly butter and icing sugar, so the bars soften at room temperature. Keep them in the fridge and set them out about 5 minutes before serving.
What can I use instead of custard powder?
Vanilla instant pudding mix is the usual substitute. It’s sweeter, so reduce the icing sugar slightly. Without either, the middle layer is a plain buttercream and won’t taste like a classic Nanaimo bar.
How do you cut Nanaimo bars without cracking the top?
Score the chocolate while it’s just set and matte, chill fully, then let the slab rest 5 minutes and cut with a long knife dipped in hot water and wiped dry between cuts.
Research sources
- City of Nanaimo, “The Legendary Nanaimo Bar” (1986 contest and Joyce Hardcastle recipe): nanaimo.ca
- City of Nanaimo, Nanaimo Bar Recipe (PDF): nanaimo.ca
- The Canadian Encyclopedia, “Nanaimo Bar”: thecanadianencyclopedia.ca
- BC Food History Network, “The Nanaimo Bar”: bcfoodhistory.ca
- Health Canada, “Safe cooking temperatures” (egg dishes 74°C): canada.ca
- Health Canada, “Food safety and you” (freezer -18°C): canada.ca