M&M cookie bars are the easy dessert you are looking for! These delicious cookie bars are soft and chewy, taste like something from a bakery, and stay soft for days. And they are filled to the brim with M&M’s!

These M&M cookie bars come together with both white and brown sugar to create the perfect texture and flavor. The white sugar gives crisp edges, and the brown sugar makes them deliciously chewy. They are baked just long enough to set while staying soft and moist. Finally, we skip the chocolate chips and stuff these with only M&Ms so their crunch and color can be the star of the show.
If you want the perfect treat without rolling out individual M&M cookies, this is the perfect recipe for you!
How to Make M&M Cookie Bars
- In a large bowl, whisk together flour, baking soda, and salt. Set aside.

- In a large bowl with a hand mixer or in the bowl of a stand mixer, beat together the butter and sugar until it is light and fluffy. Then add in the eggs and vanilla, one at a time.



- All at once, add in the flour mixture. Beat on low until it begins to combine, then turn the speed up high until it is fully, yet just, combined.

- Stir in the M&Ms with a spatula, not the mixer, so they don’t break. Then press the batter into a 9-by-8-inch baking dish.


5. Bake in a preheated oven for 20-25 minutes until the edges are golden brown. Remove it from the oven and let it sit and cool before slicing.

Recipe Tips for Success
- Measure the flour correctly: It is best to measure flour with a kitchen scale (this is the one I use, and it is so reliable). If you don’t have one, use a dry measuring cup, scoop the flour from its container into the cup with a spoon, then level off with the flat edge of a knife. See the full tutorial here: How to Measure Flour.
- Add the flour all at once: Adding the flour mixture to the beaten butter and sugar a little at a time can lead to over-beating of the flour. Instead, pour it all in and turn your mixer on low. Mix just to the point where you can turn the mixer all the way up without the flour flying out of the bowl. The whole process should take no more than 30 seconds to a minute.
- Use room temperature butter: The butter should be easy to dent with a finger, but not so soft that you can push all the way through. It will feel cold to the touch even at room temperature.
- Beating butter and sugar together: This is an important step in cookie recipes because the sugar actually beats air into the butter and makes your cookies – or in this case, cookie bars – light and fluffy. You could beat them together for three to six minutes.
- Ensure that your baking soda is fresh: It lasts about six months. To ensure it is still reactive, toss a little in some vinegar. It should bubble right away.
Storing
After allowing the bars to cool, store them in an airtight container for up to two weeks, keeping in mind that they are best when eaten within the first week.
Freezing
To freeze, place the cooled bars in a single layer on a baking sheet lined with parchment or wax paper. Flash freeze them for four hours. Then transfer the partially frozen bars to an airtight container. This will prevent them from sticking together while freezing. Store them in the freezer for up to three months. They will thaw at room temperature in about 30 minutes to an hour when placed in a single layer.

Other Cookie Recipes to Turn into Bars
Cookie Bars are so easy to make; we might as well make all our favorite cookie recipes into cookie bars!
- My very favorite sugar cookies make incredible sugar cookie bars.
- My husband’s favorite oatmeal raisin cookies become these insane oatmeal chocolate chip bars (or swap the chips for raisins like in the OG cookie).
- And of course these amazing chocolate chip cookies become chocolate chip cookie bars.
If you make this M&M Cookie Bar recipe or any of my other recipes, please leave me a comment and let me know what you think!
Recipe Video

M&M Cookie Bars
Ingredients
- 3 cups all purpose flour scooped into the measuring cups and then leveled off (360 grams)
- 1 teaspoon baking soda 6 grams
- 1/2 teaspoon salt 3 grams
- 14 tablespoons unsalted butter (198 grams) room temperature
- 3/4 cup granulated sugar (150 grams)
- 3/4 cup light brown sugar (165 grams)
- 2 teaspoons vanilla extract (9.9 ml)
- 2 large eggs room temperature
- 1 1/2 cups M&Ms
Instructions
- Preheat your oven to 350 degrees Fahrenheit. Spray a 9 by 13 inch baking dish with cooking spray. Set aside.
- In a medium bowl whisk together the flour, baking soda, and salt. Set aside.3 cups all purpose flour, 1 teaspoon baking soda, 1/2 teaspoon salt
- In a large bowl, beat together the butter with the granulated sugar and brown sugar until it is light and fluffy, about 3 to 6 minutes.14 tablespoons unsalted butter, 3/4 cup granulated sugar, 3/4 cup light brown sugar
- One at a time, add the eggs and then the vanilla extract. Make sure to scrape down the sides of the bowl as necessary.2 teaspoons vanilla extract, 2 large eggs
- Add all of the flour mixture and either fold it in with a spatula at first or turn on the mixer very low until it begins to combine, then turn the mixer on high and beat until just fully combined. Fold in the M&Ms with a spatula.1 1/2 cups M&Ms
- Press the dough into the prepared baking dish and bake for 20 to 25 minutes or until the edges have just begun to turn golden brown. Allow to cool before slicing.













Kari says
I take it the last 1/2 cup of M&Ms are strategically place on top before baking?
Gah! That was a typo. It can all go in the bars and then you can add more to the top if you like.
Johnnetta Milberry says
Can you use self-rising flour?
Lauren says
I use Bobs red mill gluten free flour as a 1:1 sub in all recipes I try- cakes, cookies, brownies, etc and I have never had anything turn out poorly. Gluten free flour is easily substituted if you use one suitable for baking.
Rory says
I tried these m&m squares. Baked them in a glass 9 x 13 baking dish for 25 minutes at 350. Tried them with a toothpick, it came out clean. But they still look under cooked. Any thoughts?
If the toothpick came out clean, they are definitely cooked and you are good to go.
Cw says
I had the same problem as Rory. They didn’t look baked through. I think they were too thick. I will try a cookie sheet next time.
I love these a little on the undercooked side, but a few extra minutes in the oven would easily solve this.
Sean says
Hi Lisa! I made your sugar cookie bars recipe and absolutely loved them. Now I’m going to try these. I’m curious, why do you use baking soda in this recipe and baking powder in the other? Thanks!
Hi Sean! This is such a good question! Baking soda reacts with acid and baking powder reacts with any liquid. There are a few other reasons you’d pick one over the other but that is the biggest reason. In this recipe the baking soda reacts with the acid in the brown sugar (in other recipes sour cream or yogurt are great reactors) and in the other recipe there is nothing with acid and therefor the baking powder.