A Canadian classic, Nanaimo bars feature a coconut and walnut base, sweet custard filling, and crisp chocolate topping. This layered dessert is a favourite for good reason! Not just popular on the west coast, of course, but beloved both across Canada and abroad, these sweet no-bake bars are a classic, delicious dessert.

This is an authentic recipe, no mocha or mint (forbidden when it comes to Nanaimo bars). It's based off of the recipe from this cookbook, a typical book in many British Columbian homes in the '80s and '90s. The three of us are from B.C., Manitoba, and Nova Scotia, though, and all of us grew up making and eating these bars.

A chocolate-y coconut, walnut, and graham wafer base gives a good starting point here. The middle layer is an easy no-cook custard, made with custard powder, and semi-sweet chocolate provides a nice slightly bitter counterpoint as the topping. The base and custard layer should be about equal in thickness, as pictured, for a proper bar.

Close up of nanaimo bars.
Jump to:


Base Layer

Nanaimo bar base ingredients.

Custard Filling

Custard filling ingredients.

Chocolate Topping

Butter and dark chocolate.

Ingredient Notes and Substitutions

  • Chocolate: use any kind of chocolate you like for the topping. 55% is ideal, but you may prefer darker chocolate to offset the sweetness of the filling, or go for ultra-sweet with milk chocolate.
  • Walnuts: pecans are a good substitution for walnuts. For a nut-free option, use seeds or leave them out.
  • Make it dairy-free: we use Bird's custard powder, which is vegan. To make these dairy free, use non-dairy milk and a good vegan butter.
  • Vanilla: sub almond or coconut extract for vanilla if you don't have any.
  • Custard powder: if you can't find custard powder, sub 3 tablespoons cornstarch and a teaspoon of vanilla extract.
  • Make it gluten-free: use gluten-free graham crackers for a GF option.


Custard bars steps 1 to 4, cooking and mixing the base layer.

Step 1: add the butter, sugar, and egg to a heat safe bowl.

Step 2: cook until thickened over a double boiler.

Step 3: add the remaining base ingredients and mix to combine.

Step 4: press into a lined tin and chill.

Nanaimo bars steps 1 to 4, mixing the custard and assembling the bars.

Step 5: beat the custard filling until smooth.

Step 6: spread over the chilled base layer.

Step 7: top with melted chocolate.

Step 8: chill until set and cut into small slices.

Top Tips

  • Use two pieces of parchment: two criss-crossed strips of parchment paper will make for the cleanest corners on your bars.
  • Keep them chilled: once the bars are finished, they have to stay cold, or they'll soften too much. If transporting for a picnic, use an ice pack.
  • Chill before slicing: then use a hot knife! The chocolate needs to set before slicing, and the custard should be cold, for the tidiest squares.

Recipe Notes

Using a hot knife is necessary to get clean slices. Otherwise the chocolate will crack and the soft custard filling will push out, losing the straight edges. Run your knife under hot water and dry well before slicing.

If you're concerned about the quality of your eggs and don't feel comfortable only cooking the base over the double boiler, you can bake it briefly. After pressing the base into the tin, bake for five minutes at 350°F (180°C) before cooling fully and continuing with the recipe.

How to Store Nanaimo Bars

To Store: The bars will last about a week and a half in the fridge in a sealed container. The filling softens at room temperature so they're best chilled.

To Freeze: Freeze in an airtight container for up to 3 months - Nanaimo bars freeze perfectly! You can take them out individually from the freezer or thaw all at once, but it's best to thaw overnight in the fridge.

Nanaimo bars in the pan.


Are Nanaimo bars a Canadian thing?

Sure are! They're named after the city of Nanaimo in B.C., Canada, and are a very popular dessert across the country. If you grew up in Canada, you've eaten a Nanaimo bar.

How do you cut Nanaimo bars without cracking them?

The secret is a hot, dry knife. Once the chocolate has set, using a knife that's been dipped in hot water and then dried will make a nice clean slice and tidy looking bars.

What's in custard powder?

Typically milk, sugar, and egg yolk. Some versions will have thickeners like cornstarch in them, too, and Bird's, which we use, doesn't contain milk or eggs.

Can Nanaimo bars be made without custard powder?

They can! While the custard powder is traditional and called for in any old-school Canadian recipe, you can sub cornstarch and vanilla in this recipe instead.

If you make this Nanaimo Bar recipe or any other chocolate recipes on the Baked Collective, please take a moment to rate the recipe and leave a comment below. It’s such a help to others who want to try the recipe. For more baking, follow along on Instagram, TikTok, and YouTube.

Close up of several nanaimo bars showing the layers.
Print Recipe
5 from 2 votes

Nanaimo Bars

A Canadian classic, no-bake Nanaimo bars feature a coconut and walnut base, simple sweet custard filling, and crisp chocolate topping.
Prep Time10 minutes
Chilling Time40 minutes
Total Time50 minutes
Yield: 24


  • 8-inch (20 cm) square baking tin
  • Parchment paper
  • 2 Mixing bowls at least one needs to be heat safe
  • Small saucepan
  • Spatula or spoon
  • Electric beaters
  • Double boiler optional
  • Knife
  • Measuring cups and spoons or a digital kitchen scale



  • ½ cup salted butter softened
  • ¼ cup sugar
  • 1 large egg
  • 2 teaspoons vanilla extract
  • 2 tablespoons cocoa powder
  • 2 cups graham cracker crumbs
  • 1 cup unsweetened shredded coconut
  • ½ cup chopped walnuts raw

Custard Filling

  • ½ cup salted butter softened
  • ¼ cup + 2 tablespoons milk
  • 4 cups icing sugar
  • ¼ cup custard powder


  • 6 oz. semi-sweet chocolate
  • 1 tablespoon salted butter


  • Grease an 8-inch (20cm) square baking tin and line with parchment paper. Set aside.


  • Place the butter, sugar, and egg in a heat-safe glass bowl. Place the bowl over a small saucepan of simmering water (don’t let the bottom of the bowl touch the water). Heat, stirring constantly, for about five minutes. It should thicken to the consistency of custard.
  • Remove the bowl from the heat and add the vanilla, cocoa, graham wafer crumbs, coconut, and walnuts. Stir well to combine.
  • Scoop the mixture into the prepared pan. Using a spatula or spoon, press it evenly into the pan. Place this into the refrigerator to firm while you prepare the filling.


  • To make the custard filling, add the butter, milk, icing sugar, and custard powder to a large bowl. Mix on high speed with electric beaters until light and fluffy.
  • Spread the filling over the chilled base in an even layer. Place in the refrigerator for about 20 minutes to firm again.

Topping and Slicing

  • Add the chopped chocolate and butter to a bowl. Melt, using a microwave, or with a double boiler (as outlined for the base).
  • Stir to combine, then pour over the chilled filling, spreading as needed into an even layer.
  • Place the tin back into the refrigerator to set completely, another 15 minutes.
  • Once the chocolate has set, slice the bars. Use a hot, dry knife to cut 24 small slices.
  • Keep the bars in the refrigerator for up to 10 days, or freeze up to one month. Thaw in the refrigerator if possible as the filling softens at room temperature.


  • Using a hot knife is necessary to get clean slices. Otherwise the chocolate will crack and the soft custard filling will push out, losing the straight edges. Run your knife under hot water and dry well before slicing.


Serving: 1bar | Calories: 271kcal | Carbohydrates: 33g | Protein: 2g | Fat: 16g | Saturated Fat: 9g | Polyunsaturated Fat: 6g | Cholesterol: 31mg | Sodium: 110mg | Fiber: 2g | Sugar: 27g

Leave a Reply

Your email address will not be published. Required fields are marked *

Recipe Rating