The Nanaimo bar (or Le nanaïmo) is a bar dessert that requires no baking and is named after the Canadian city of Nanaimo in British Columbia. It consists of three layers: a wafer, nut (walnuts, almonds, or pecans), and coconut crumb base; custard icing in the middle; and a layer of chocolate ganache on top. Many varieties exist, consisting of various types of crumb, various flavours of icing (such as peanut butter or coconut, mocha), and various types of chocolate.
 The earliest confirmed printed copy of the recipe using the name "Nanaimo bars" appears in the Edith Adams' prize cookbook (14th edition) from 1953. Following research into the origins of Nanaimo bars, Lenore Newman writes that the same recipe was published in the Vancouver Sun earlier that same year under the name "London Fog Bar". The recipe later also appears in the publication His/Her Favourite Recipes, Compiled by the Women's Association of the Brechin United Church (1957), with the recipe submitted by Joy Wilgress, a Baltimore, Maryland, native. (Brechin United Church is in Nanaimo.)
 In 1954, the recipe "Mabel's Squares" was published in The Country Woman's Favourite by the Upper Gloucester Women's Institute (New Brunswick).  The recipe was submitted by Mrs. Harold Payne, the daughter of Mabel (Knowles) Scott (1883–1957).
 The first printing of recipes featuring Nanaimo bar ingredients is found in the 1952 Women's Auxiliary to the Nanaimo Hospital Cookbook, which features three nearly identical recipes that differ only slightly from the modern Nanaimo bar. They are referred to as the "chocolate square" or the "chocolate slice".
 Other unconfirmed references date the bar back to the 1930s, when it was said to be known locally as "chocolate fridge cake". One modern reference mentions the bars' existence in 19th century Nanaimo.
 The popularity of the bar in Nanaimo led local residents to mobilise to have it voted "Canada's Favourite Confection" in a National Post reader survey. In 1985, Mayor Graeme Roberts initiated a contest to find the ultimate Nanaimo bar recipe. The recipe submitted by Joyce Hardcastle, a resident of Nanaimo, was unanimously selected by a panel of judges. The Nanaimo bar was popularized nationwide after being highlighted as a classic Canadian dessert at Expo 86.
 Recipes for similar desserts are found in various places, under various names, in North America and Europe. The designation "Nanaimo bar" is Canadian, and appears in the Canadian Oxford Dictionary, but not in other language or dialect versions.[citation needed]
 An episode from the first season of the competition television show MasterChef Canada features an elimination challenge where competitors made desserts inspired by Nanaimo bars, chosen among three Canadian desserts.
 A 2016 US state dinner in honour of Canadian Prime Minister Justin Trudeau featured Nanaimo bars as the main dessert. The elaborate dinner, hosted by then-US President Barack Obama and his wife Michelle Obama, consisted of a blend of American and Canadian dishes. The Nanaimo bars were presented on a plate inspired by the Rocky Mountains.
 In April 2019, Canada Post announced the release of a booklet of postage stamps dedicated to Canadian desserts and sweets. The booklet of 10 stamps features images of the Nanaimo bar, the butter tart, tarte au sucre (sugar pie), blueberry grunt, and Saskatoon berry pie. Canada Post described the stamps as "fun-shaped", and the booklet of stamps resembled a recipe card. The image of the Nanaimo bar on the stamp received some criticism for its ratio of "the crumbly base, the custard filling, and the chocolate ganache icing."