Classic Canadian Nanaimo Bars
Nanaimo bars have three distinct layers: a dark chocolate-coconut crumb base, a thick pale-yellow custard-style filling, and a thin chocolate top. In this version, the egg-containing base is cooked gently over simmering water rather than baked, then pressed into the pan to chill.
Let the base and filling firm up before adding the next layer so the bands stay distinct. Scoring the chocolate while it is partly set helps keep it from cracking when the bars are cut into squares.
Ingredients for Nanaimo Bars

- 1/2 cup unsalted butter, for the base
- 1/4 cup granulated sugar
- 5 tablespoons unsweetened cocoa powder
- 1 large egg
- 1 teaspoon vanilla extract, divided
- 1 3/4 cups graham cracker crumbs (200g)
- 1 cup unsweetened shredded coconut (75g)
- 1/2 cup unsalted butter, softened, for the filling
- 2 cups powdered sugar (240g)
- 2 tablespoons custard powder
- 2 tablespoons milk, plus up to 1 teaspoon if needed
- 4 ounces semisweet chocolate, chopped or chips (115g)
- 2 tablespoons unsalted butter, for the topping
- A small pinch of flaky salt (optional)
Custard powder gives the filling its characteristic flavor and pale-yellow color. A cornstarch-and-vanilla filling is a separate adaptation, not an identical substitute.
How to Make Nanaimo Bars

- Prepare the pan: Line an 8-inch square pan with parchment, leaving overhang on two sides. Mix the graham cracker crumbs and coconut in a bowl.
- Cook the base mixture: Bring a small amount of water to a gentle simmer in a saucepan. Set a heatproof bowl securely over it without letting the bowl touch the water. Add the base butter, granulated sugar, cocoa, egg, and 1/2 teaspoon vanilla. Whisk continuously over low to medium-low heat for about 3 to 5 minutes. Start checking after 3 minutes; remove the bowl from the heat when the mixture is smooth and slightly thickened, with no visible egg curds. Do not let it boil.
- Press and chill the base: Stir the crumbs and coconut into the warm cocoa mixture until no dry pockets remain. Press firmly and evenly into the pan. Refrigerate uncovered for about 20 to 30 minutes, until firm to the touch.
- Make the filling: Beat the softened filling butter with the powdered sugar, custard powder, remaining 1/2 teaspoon vanilla, and 2 tablespoons milk until smooth and thick enough to hold soft spatula marks. Add up to 1 teaspoon more milk, a little at a time, only if needed to make it spreadable. Spread over the firm base and refrigerate uncovered for about 30 to 45 minutes, until it can support the chocolate without shifting.
- Add the topping: Melt the chocolate with the remaining 2 tablespoons butter over low heat, stirring until smooth, or use short microwave intervals. Let it cool briefly until fluid but no longer hot. Spread it gently in a thin, even layer over the filling. Scatter a little flaky salt on top, if using.
- Score and cut: Refrigerate until the chocolate is partly set and holds a shallow score without flowing. Mark 16 portions with a sharp knife, then continue chilling until the layers are fully firm, about 2 hours total after adding the topping. Lift out the slab using the parchment. Cut along the score lines with a warm, completely dry knife, wiping it between cuts.
How to Keep the Layers Distinct
A compact base supports the thick filling, so press the crumb mixture firmly into the pan. Wait until the filling is firm before topping it, and let the melted chocolate cool briefly: hot chocolate or a soft filling can blur the boundary between layers. Keep the layers uncovered while they set, then cover the finished bars for storage.
How to Cut Nanaimo Bars Without Cracking the Chocolate
Score only the chocolate while it still yields to a knife; cutting a fully hardened top for the first time is more likely to crack it. Once the bars are fully chilled, warm a sharp knife in hot water and wipe it completely dry before cutting through the layers. Wipe the blade between cuts to keep the filling from smearing.
Serving and Storage
Store the bars covered in an airtight container in the refrigerator. Let them sit briefly at room temperature before serving for a softer bite. Small squares pair well with coffee or hot tea.
The bars can be assembled ahead; let the layers set fully before covering or cutting. To freeze, place them in an airtight container with parchment between layers and thaw before serving. No reheating is needed.
For another layered chocolate dessert, try these No-Bake Chocolate S’mores Bars.
Nutrition
Approximate nutrition per bar, based on 16 small bars: 285 calories, 3g protein, 17g fat, and 33g carbohydrates. Approximate nutrition per 100g: 470 calories, 4g protein, 28g fat, and 54g carbohydrates. Values vary with the ingredients used.
Classic Canadian Nanaimo Bars
Equipment
- 8-inch square pan
- Parchment paper
- Mixing bowls
- Saucepan
- Heatproof bowl
- Whisk
- Electric mixer
- Sharp knife
Ingredients
For the Base
- 1/2 cup unsalted butter
- 1/4 cup granulated sugar
- 5 tablespoons unsweetened cocoa powder
- 1 large egg
- 1/2 teaspoon vanilla extract
- 1 3/4 cups graham cracker crumbs (200 g)
- 1 cup unsweetened shredded coconut (75 g)
For the Filling
- 1/2 cup unsalted butter, softened
- 2 cups powdered sugar (240 g)
- 2 tablespoons custard powder
- 2 tablespoons milk, plus up to 1 teaspoon if needed
- 1/2 teaspoon vanilla extract
For the Topping
- 4 ounces semisweet chocolate, chopped or chips (115 g)
- 2 tablespoons unsalted butter
- A small pinch of flaky salt (optional)
Instructions
- Line an 8-inch square pan with parchment, leaving overhang on two sides. Mix the graham cracker crumbs and coconut in a bowl.
- Bring a small amount of water to a gentle simmer in a saucepan. Set a heatproof bowl over the pan without letting it touch the water.
- Add the base butter, sugar, cocoa, egg, and 1/2 teaspoon vanilla to the bowl. Whisk continuously over low to medium-low heat for 3 to 5 minutes, until smooth and slightly thickened with no visible egg curds. Do not let it boil.
- Stir the crumbs and coconut into the warm cocoa mixture until no dry pockets remain. Press firmly and evenly into the prepared pan. Refrigerate uncovered for 20 to 30 minutes, until firm.
- Beat the softened filling butter, powdered sugar, custard powder, remaining 1/2 teaspoon vanilla, and 2 tablespoons milk until smooth and thick. Add up to 1 teaspoon more milk a little at a time only if needed to make it spreadable.
- Spread the filling over the firm base. Refrigerate uncovered for 30 to 45 minutes, until firm enough to support the chocolate.
- Melt the chocolate with 2 tablespoons butter over low heat, stirring until smooth, or microwave in short intervals. Let it cool briefly until fluid but no longer hot.
- Spread the chocolate gently over the filling in a thin, even layer. Add flaky salt if using.
- When the chocolate is partly set but still yields to a knife, mark 16 portions with a sharp knife. Continue chilling until fully firm, about 2 hours total after adding the topping.
- Lift the slab from the pan using the parchment. Cut along the score lines with a warm, completely dry knife, wiping it between cuts.
Tips
- Press the crumb base firmly and evenly so it supports the filling.
- Keep the base and filling uncovered while they chill and set.
- Let the filling firm before adding the chocolate, and cool the melted chocolate briefly to keep the layers distinct.
- Score the chocolate while it is partly set to help prevent cracking.
- Use a warm, completely dry knife and wipe it between cuts.
