Magic Cookie Bars · Classic

Classic Magic Cookie Bars

Buttery graham crust, gooey condensed milk, chocolate chips and toasted coconut come together in one pan with almost no effort. A reliable crowd-pleaser for potlucks and bake sales.

New, no ratings yet0 reviewsby Simmerbee Kitchen

Prep
15 min
Cook
28 min
Total
2 hr 43 min
Serves
24 bars
Level
Easy

Ingredients

  • 1 ½ cups graham crackers, finely crushed crumbs, from about 12 full sheets
  • ½ cup butter, melted ≈ 113 g
    Swaps for butter

    Instead of butter

    • Plant-based butter sticks: The same amount. The closest swap.
    • Refined coconut oil: The same amount: solid when the butter is soft or cold, melted when it is melted. It is all fat, so bakes are a bit more tender and rich, with no butter flavor.
    • Vegetable oil: 3 tbsp oil for every 4 tbsp (¼ cup) melted butter. Cakes and muffins come out moister and stay soft longer, without a buttery taste.

    More for butter

    Cooking for an allergy? Check every label.

  • 2 tbsp granulated sugar
    Swaps for granulated sugar

    Instead of sugar

    • Less sugar: Up to ¼ less in cookies, muffins and quick breads. Less browning and spread, a drier, more cake-like texture, and bakes go stale sooner.
    • Brown sugar: The same amount, packed. Moister and chewier, with a caramel flavor and darker color.
    • Coconut sugar: The same amount. Darker and caramel-like, a little less sweet; cookies spread slightly less.

    All 4 swaps for sugar

  • 1 cup chocolate chips, semisweet ≈ 168 g
    Swaps for chocolate chips

    Instead of chocolate and chocolate chips

    • Semisweet and bittersweet: The same amount, either way. Bittersweet is less sweet and more intense; semisweet is milder and sweeter.
    • Chopped bar chocolate for chips: The same weight (a 12 oz bag of chips is about 2 cups). Melty puddles and streaks instead of neat chips.
    • Chips for bar chocolate when melting: The same weight. Chips melt thicker and less smoothly, so ganache and glazes are a bit stiffer.

    All 4 swaps for chocolate and chocolate chips

  • 1 cup shredded coconut, sweetened
  • 1 cup pecans, roughly chopped ≈ 109 g
    Swaps for pecans

    Instead of nuts

    • Another nut: The same amount. Pecans are sweeter and softer, walnuts slightly bitter, almonds firmer and milder.
    • Toasted pumpkin or sunflower seeds: The same amount. Smaller and crunchier, with an earthy taste.
    • Leave them out, or use chocolate chips or toasted oats: The same amount (or none). Leaving nuts out doesn't change how a batter bakes.

    More for nuts

    Cooking for an allergy? Check every label.

  • 14 oz sweetened condensed milk, 14 oz can
  • 1 tsp vanilla extract
    Swaps for vanilla extract

    Instead of vanilla extract

    • Vanilla bean paste: The same amount. Stronger, with visible vanilla seeds.
    • Vanilla bean: The seeds of 1 bean for each 1 tbsp extract. A deeper, floral flavor and visible seeds.
    • Alcohol-free vanilla: The same amount. Made with glycerin; a slightly milder taste.

    All 5 swaps for vanilla extract

  • ¼ tsp salt
    Swaps for salt

    Instead of salt

    • Kosher salt: About twice as much Diamond Crystal, or about 1¼ times as much Morton. The same saltiness when measured this way.
    • Salt by weight: 1 tsp is about 6 grams of table salt, 5 grams of Morton kosher, 3 grams of Diamond Crystal kosher. The most reliable way to swap, especially in baking and brines.

    More for salt

Different pan? Written for 9x13-inch rectangle; rescale the amounts for an 8x8, 9x13, round, loaf or sheet pan.

Cooking for a crowd? Pans, timing and salt for 12 to 50.

Missing something? Tap Swaps next to an ingredient, or see all substitutions.

Steps

Kid helper. A child can do steps 2, 3, 4, 5 and 6: no knife, no heat. Steps marked “Grown-up” use a knife or heat. Cooking with kids

  1. Heat the oven to 350°F and
    line (how to line a pan) Line a pan Cover the bottom (and sometimes sides) of a pan with parchment or foil so food doesn't stick and lifts out easily. 1. For a sheet pan, tear parchment the size of the pan and lay it flat.2. For a round cake pan, trace the bottom on parchment, cut the circle out and press it in.3. For brownies and bars, leave two long sides hanging over to make handles (a "sling").4. A little grease under the paper holds it in place. Done when: The paper lies flat with no folds where the batter could run under it. How to line a baking pan with parchment: mistakes to avoid
    a 9x13-inch baking dish with parchment, leaving an overhang on the two long sides to lift the bars out later.
    350°FGrown-up: heat
  2. Stir the graham crumbs, melted butter, sugar and salt together in a bowl until the crumbs look like damp sand.
    Kid step
  3. Press the crumbs firmly and evenly into the bottom of the dish, using the flat bottom of a measuring cup to pack them down.
    Kid step
  4. Stir the vanilla into the sweetened condensed milk.
    Kid step
  5. Sprinkle the chocolate chips evenly over the crust, followed by the coconut and then the pecans.
    Kid step
  6. Drizzle the condensed milk evenly over the top, making sure it reaches the edges and corners so they brown and set.
    Kid step
  7. Bake until the coconut is golden and the edges are bubbling and lightly browned.
    350°F⏱ Bake: 28 minGrown-up: heat
  8. Cool the pan on a rack until completely room temperature, about 2 hours. Cutting too early makes the bars sticky and messy.
    ⏱ Cool: 2 hrGrown-up: knife, heat
  9. Lift the slab out by the parchment, set it on a cutting board and cut into 24 bars with a sharp knife.
    Grown-up: knife

Tap an underlined word for how to do it, or see all techniques.

Tips

  • Crush the graham crackers in a food processor or a zip bag with a rolling pin until fine, for a crust that holds together.
  • For neater squares, chill the cooled slab for 30 minutes and wipe the knife between cuts.

Storage

Keep covered at room temperature for up to 4 days, or in the fridge for up to a week.

Make ahead

Bake up to 2 days ahead and store uncut, or freeze cut bars in layers separated by parchment for up to 2 months.

Quick answers

Can I freeze it?

Bake up to 2 days ahead and store uncut, or freeze cut bars in layers separated by parchment for up to 2 months.

What can I swap?
  • Instead of butter: Plant-based butter sticks, the same amount.
  • Instead of sugar: Brown sugar, the same amount, packed.

Cooking for an allergy? Check every label.

Answered from this recipe's own storage, make-ahead and swap notes.

Estimated nutrition per serving

Calories
200
Protein
3 g
Carbohydrates
20 g
Fiber
2 g
Sugars
16 g
Fat
13 g
Saturated fat
7 g
Sodium
105 mg

Whole recipe, 24 servings: about 4,860 calories.

Estimate from USDA FoodData Central; not medical or dietary advice. Based on 9 of 9 ingredients.

How we estimate

We add up USDA FoodData Central values for each measured ingredient as written and divide by the recipe's 24 servings, so changing the servings or units here doesn't change a serving. Brands, swaps, trimming and cooking all change the real numbers.

Estimated cost

About $0.40 a serving

About $9.80 for the recipe as written (24 servings).

Estimate; prices vary by store and region. U.S. average prices for September 2026 from BLS Average Price Data and USDA ERS Purchase to Plate prices updated with the BLS Consumer Price Index. Priced: 6 of 9 ingredients, 91% by weight.

How we estimate

Each measured ingredient is weighed as in the nutrition estimate and priced at the U.S. average: BLS's average price where BLS publishes one, else USDA ERS's Purchase to Plate price for 2017-18 raised to September 2026 with the CPI for that food group. Whole packages, store brands, sales and regions all change the real cost: treat it as a ballpark.

  • pecans $3.55 ERS
  • chocolate chips $2.05 ERS
  • sweetened condensed milk $1.80 ERS
  • graham crackers $1.35 ERS
  • butter $1.00 BLS
  • granulated sugar $0.05 BLS

Not priced (no official average price we can match, so not in the total): shredded coconut, vanilla extract, salt.

More dishes for less: cheap eats.

Keep this one

Sign in to save recipes into your own collections, log the days you cook them and keep private notes, like "use less sugar next time". Only you see them.

Sign in to saveNo password: we email you a code.

Gear for this recipe

As an Amazon Associate we earn from qualifying purchases. Brands are suggestions; any similar item works.

Cleanup score 4/5 (easy cleanup): 2 things to wash, 9x13 baking dish, mixing bowl.

More kitchen gear and our gear guides

Reviews (0)

No reviews yet. Made it? Tell us how it went.