Rainbow M&M Cookies

Soft and chewy cookies filled with colorful M&Ms. These are a cookie jar favorite!

Soft and chewy cookies filled with colorful M&Ms. These are absolutely a cookie jar favorite!

These incredibly addicting cookies are super chewy and, by far, the softest cookie I’ve ever baked. They completely disappeared when I brought them into work, with some people even asking me if they were store-bought. Store-bought? The horror!

I adapted the recipe from the famous Cooks Illustrated Chewy Chocolate Chip Cookie.

Rather than melting the butter – as directed in the Cooks Illustrated recipe – I creamed the butter with the sugars and eggs, which produced an exceptionally thick and puffy cookie. Just the way I like them! I also add cornstarch for extra softness and increase the baking soda for extra lift.

Another trick to get a thick and puffy cookie is to chill the dough.

cookies with colorful m&ms candies

The unbelievably soft texture and chewiness to this cookie can be attributed to the extra egg yolk. Egg yolks are the source behind a cookies soft texture. This recipe calls for 1 whole egg and 1 egg yolk. Also credited to the chewiness of this cookie is the brown sugar to white sugar ratio. This recipe calls for double the amount of brown sugar to white. So, with double egg yolks and double brown sugar, these babies have double the softness and double the chewy texture!

Make them now and you’ll understand the hype– you will use this recipe time and time again!

clock clock icon cutlery cutlery icon flag flag icon folder folder icon instagram instagram icon pinterest pinterest icon print print icon squares squares icon
cookies with colorful m&ms candies

Rainbow M&M Cookies

  • Author: Sally
  • Prep Time: 40 minutes
  • Cook Time: 10 minutes
  • Total Time: 1 hour
  • Yield: 30 cookies
  • Category: Cookies
  • Method: Baking
  • Cuisine: American


Soft and chewy cookies filled with colorful M&Ms. These are a cookie jar favorite!


  • 2 cups + 2 Tablespoons (265gall-purpose flour (spoon & leveled)
  • 1 teaspoon cornstarch
  • 1 teaspoon baking soda
  • 1/2 teaspoon salt
  • 3/4 cup (1.5 sticks) unsalted butter, softened to room temperature
  • 1 cup (200g) packed light brown sugar
  • 1/2 cup (100g) granulated sugar
  • 1 large egg + 1 egg yolk, at room temperature
  • 1 and 1/2 teaspoons pure vanilla extract
  • 1 cup mini M&Ms


  1. Whisk the flour, cornstarch, baking soda, and salt together in a large bowl. Set aside.
  2. In large bowl using a hand-held mixer or stand mixer fitted with a paddle attachment, beat softened butter for about 1 minute on medium speed until creamy. Add the brown sugar and granulated sugar, then beat on medium-high speed until creamy and combined. Scrape down the sides and bottom of the bowl as needed. Beat in egg, egg yolk, and vanilla extract. Scrape down the sides and bottom of the bowl as needed. With the mixer running on low speed, slowly add dry ingredients to wet ingredients. Pour in the M&Ms and beat on low speed for 20 seconds or until combined. Once completely combined, cover cookie dough tightly and chill in the refrigerator for 30 minutes and up to 5 days.
  3. Preheat oven to 350°F (177°C). Line baking sheets with parchment paper or silicone baking mats. Set aside.
  4. Roll cookie dough into balls, about 1.5 Tablespoons of dough per cookie, and arrange 3 inches apart on the baking sheets. Bake for 11-12 minutes or until lightly browned on the sides. The centers will look soft.
  5. Remove from the oven and allow cookies to cool on the baking sheet for 5 minutes. While the cookies are still warm, feel free to press a couple more M&Ms into the tops. This is just for looks. Transfer to a wire rack to cool completely.
  6. Cookies stay fresh covered at room temperature for up to 1 week.


  1. Make Ahead & Freezing Instructions: You can make the cookie dough and chill it in the refrigerator for up to 5 days. Allow to come to room temperature and continue with step 4. Baked cookies freeze well for up to 3 months. Unbaked cookie dough balls freeze well for up to 3 months. Bake frozen cookie dough balls for an extra minute, no need to thaw. Click here for my tips and tricks on freezing cookie dough.
  2. Keep Dough Cold: Make sure to keep dough cold at all times while the batches are baking. I keep my dough in the refrigerator in between batches.
  3. Add-Ins: You can easily swap add more add-ins to these cookies (chopped candy bars, nuts, chocolate chips, etc) as long as the total does not go over 1 cup. Get creative!
  4. Be sure to check out my top 5 cookie baking tips AND these are my 10 must-have cookie baking tools.

Keywords: m&m cookies


Comments are closed.

  1. I have finally found an m&m cookie recipe that works! After many failed attempts and experiments with several different recipes, I just couldn’t seem to prevent my cookies from spreading too much. This recipe actually helped the cookies keep their shape pretty well. I made a large batch of these for my children’s t-ball team and they were a huge hit. This recipe is a keeper. I used a whole jumbo bag of regular sized m&m candies and mixed 1 cup into the batter. Then I pressed the remaining 1/2 cup of m&m’s onto the top of the dough balls before baking. Wonderful!!


  2. OMG These are amazing~!
    I just tried making them and they’re perfect! I’ve been searching for a recipe like this for ages! Thank you!

    1. YAY! sooo glad to hear that Georgia. I love these oatmeal cookies too 🙂

  3. hey sally i wont have time to cool the m & m cookies because im doing food gcse and we wont have time so what can we do to make the cookies thicker and what if you put 2 eggs instead of 1 egg and 1 egg yolk please get back quick . Thanks!

    1. I do not recommend using an entire egg for the extra egg yolk. It is what makes the cookies soft and chewy. Unfortunately, there is no way getting around chilling them! TRy rolling them and throwing the dough balls into the freezer for up to 10 minutes before baking! I hope this helps.

  4. i made these a couple of weeks ago for a club meeting and added pretzels to them (because sweet and salty is fantastic). the extra brown sugar makes them DIVINE! they were super duper soft. every time i make cookies they come out crunchy or undercooked. these were perfect. thank you so much for your blog. you give me so many new staple recipes 🙂

    1. Kayla, that is SO wonderful to hear – I’m glad your cookie problems are solved! I swear by extra brown sugar in cookie recipes. Sweet and salty – LOVE it! I have to make your version 🙂

  5. Heyy, do you think it’s the same if we use peanuts M&M? since its have peanuts on it,its still the same right and I love making your cookies ,its awesome 🙂

    1. Hi Lily! Yes, peanut M&Ms will work just fine. Make sure to use more dough per cookie since the peanut m&ms are larger.

  6. Sally will these cookies hold up if I make the dough ahead of time and freeze it? I have so many cookies to bake and I like making the dough ahead of time and freezing.

    1. Hi Betty! Of course! Make the dough now, roll into balls, and then thaw for about 10 minutes (don’t need to thaw the whole way through) and bake them when you are ready – you could freeze them up to two months.

  7. These cookies turn out flat just like the rest of recipes I have tried ):

    1. sorry to hear than Abby! I am not sure what to tell you since I wasn’t actually there when you made these cookies – was the butter softened or was it melted at all? Was the weather humid? Even a slight moisture in the air can have an effect on the amount a cookie spreads. Ddi you sufficiently chill the dough? Was the flour measured accurately? IS the oven temperature precise to match the recipe requirements? My oven is hotter than what the dial says, so I use an oven thermometer. Did you overmix the dough?

      1. I did everything that the recipe said to do. They tasted good but was flat and spreaded out too much.

      2. A tablespoon or two extra flour always helps, as well as baking on a silicone mat.

      3. Thank you. I followed your recipe to the T. I even purchased a silicon mat. Could my gas stove be the issue if not then I messed up somewhere and I’ll be happy to try them again. P.s I loved your cookies.

  8. Thank you so much for sharing this recipe. These cookies were delicious! Not too sweet, and hits the right spot. Happy Holidays!

    1. Hi Tammy – that’s so nice to hear! Thanks for writing in to let me know you loved them. Happy Holidays to you as well!

  9. Perfection! I made these for Christmas with red & green m &m’s & chocolate chips and they were a big hit. Always used traditional recipes that turned out flat, but these were fluffy & light with the right amount of everything. Thank you<3. wish I could add a pic to this post to show you.

    1. Hi Deb! That is so wonderful to hear! Thanks for letting me know how great the cookies turned out for you – that makes my day. I truly love this recipe. I come back to it often. I’m sure your cookies were gorgeous with those festive Christmas M&Ms! Thanks Deb and happy new year!

  10. Hi Sally- I just started following your blog and wanted to let you know how much I love it already! Your photos are amazing!

    My sister and I have co-blogged together at 2 Sisters 2 Cities for the past three years. In the past, I have been much more into cooking than baking, but the combination of holiday baking and being pregnant has definitely gotten me off into a bit of a baking kick.

    I made these Rainbow M&M cookies yesterday with Valentine’s Day M&Ms to share with friends during yesterday’s football games…I believe I now only have 2 cookies left! I can’t wait to try more of your recipes…


    1. Thanks Meaghan! You are so sweet. I am much more of a baker than a cook! I LOVE these cookies – especially made for any holiday using different colored M&Ms. They are incredible. 🙂 Let me know any other recipes you try. Hope you’re doing well in the pregnancy. Thanks Meaghan!

  11. Are these cookies fluffy and puffy (cake like)? or are they thick and chewy (more dense)?

    1. Hi Megan! They are not cakey at all. Chewy and soft.

      1. That’s good to hear! I think I’ll have to try these out!

  12. Sally,
    I was wondering if I could use your awesome chocolate chip cookie dough recipe and just add m&ms to it? I really LOVE that basic chocolate chip dough!! Is there something about the m&ms that wouldn’t work with that? Now, I’m sure this one is amazing as well, but I just wanted to know…. Thanks!

    1. Hi Kim! If you’re referring to my Perfect Chocolate Chip Cookie base (the one I use for many cookies) https://sallysbakingaddiction.com/2012/08/06/the-chocolate-chip-cookie/ then YES, you may certianly use that and stuff it with M&Ms just like these cookies. I love this post’s cookie dough base as well. Thanks Kim!

  13. I have margarine sticks, not butter. I’ve made this recipe several times (always using salted or unsalted butter), but would margarine work? I plan on chilling the dough as always, and I have the eggs and margarine sticks coming up to room temp as I write this. Any help would be great! Love the recipe! (I’m using the Easter M&M’s, too, yay!)

    1. Hey Chelsea! Margarine should work just fine. Enjoy!

  14. These were so good!! Thank you for sharing the recipe.

    1. I’m glad to hear that Amanda! Thank you for letting me know!

  15. Great recipe! Made a double batch and used half choc chips & half M&M’S. Even better if you use homemade brown sugar. Now on to more of your recipes!

    1. Thanks for reporting back about them!

  16. Is the cornstarch supposed to be mixed in with the flour mixture?

      1. Sally,
        Might you tell me just what corn starch does in the recipe? I’ve seen many MM Cookies recipes that do not have corn starch, and many that do. What odes it do? For that matter, what does the baking soda do? I’m on way to try your recipe. It sure sounds good. Hey, for what-it-is-worth…..what a knock out web site. So beautiful and professionally done. I applaud you!

      2. Hi Tim! No problem. Cornstarch makes cookie dough much softer. It makes the baked cookies softer AND thicker. Sort of how it thickens soups, jams and gravy. It does the same to cookie dough. I talked more about the use of cornstarch (aka cornflour outside of the US) here: https://sallysbakingaddiction.com/2012/11/22/soft-baked-white-chocolate-chip-cranberry-cookies/

        Baking soda neutralizes the acidity of the cookie dough and allows the cookies to brown in the oven.

  17. Can dark brown sugar be used instead if you don’t have light or is it not advised?:)

    1. Yes, dark may be used instead of light.

  18. Quick question! Just realized I have unsalted butter at room temperature, will it matter? Ready to make them….

    1. Unsalted butter is fine. Taste the dough after it’s made and add more salt if needed. Enjoy!

  19. I made these, and they were a hit with my friends! Nice, soft, thick and chewy! Will be using this recipe over and over again in the future 🙂 Thanks for the recipe! I also posted about these, so you can check it out if you’re interested

    1. I love these cookies and I’m so happy that you did too! I love how chewy they are. I’ll check them out!

  20. Hi there!

    If using regular sized M&M’S, would you suggest changing the amount or keeping it at 1 cup?


    1. Hey Stacy! About 1 cup of regular M&Ms would be just fine.

  21. Great recipe! My cookies were almost too puffy 🙂 thanks for sharing!

  22. Can I substitute the flour with white wheat flour? Would it be same measurement?

    1. Hey Marissa! You sure can. It would be an equal measurement.

  23. These cookies are delicious! The only problem I had was that they seemed to be just a little undercooked. I had them in for 9 minutes, but probably could’ve gone a few minutes more. This could probably be due to the size I rolled them. Maybe too thick?

    1. It sounds like the cookie may have been too big. Also, check your oven temperature. My oven runs hot, but a lot of ovens I’ve used run cold! I always use an oven thermometer to be completely accurate. It may just be that your cookies need another minute or two. That’s an easy fix! Thanks for trying them, Nicole.

  24. Hi Sally,

    I am planning to make these M&M cookies for Christmas. Do they freeze well after they are baked?

    1. Yep! They freeze well for up to 2 months.

  25. Hi Sally,
    First off I CAN NOT WAIT to make these, I am going to make some this weekend in fact! I just have a quick question about the recipe ingredients you have listed on this post – in this one it includes a teaspoon of cornstarch, but on another of your posts also saying it is your “go-to, standard, no-fail, GUARANTEE cookie dough recipe” that you use for all your cookies the cornstarch is not included (https://sallysbakingaddiction.com/2012/06/14/chocolate-covered-pretzel-cookies/). I’m curious as to if you usually add the cornstarch or not, and what the result is of not adding it? I don’t have M&Ms so will be suing 1 cup of chocolate chips instead, should I add the cornstarch or leave it out as stated on your other recipe? Also, how long do these cookies last for?
    Sorry to be a bore and ask what are most likely really silly questions, I just don’t want to mess these up!
    Please get back to me a.s.a.p., I plan to make these either tomorrow or the day after at the latest. Many thanks, and congratulations on the FABULOUS blog, your photography is stunning I wish I was creative as you.
    Philia x

    1. Hi Philia! The Chocolate Covered Pretzel Cookies were posted so long ago! I updated this Rainbow M&M Cookie about 18 months ago, after the Chocolate Covered Pretzel Cookies were published. When I make the Chocolate Covered Pretzel Cookies now, I add cornstarch. It just gives the cookies a little something extra. Much softer in my opinion. You may add it or leave it out. 1 cup of chocolate chips will be just fine with this recipe! The cookies will stay fresh for 1 week at room temperature.

      1. Hi Sally,
        Thank you so much for replying to my comment, I really appreciate it! Thank you ever so much for the update on the cornstarch, I think I’m going to do a double batch and add it to one of them, then I can see for myself if they turn out any differently – plus then I will have double the amount of your delicious cookies!
        That’s great that they stay fresh for up to a week. Perfect for school/work lunches as I can make a batch at the weekend, and make them last throughout the week (or attempt to at least, I suspect they may get gobbled up the moment the come out of the oven!).
        Many thanks again Sally for getting back to me so quickly, I can’t wait to bake these they look fabulous xXx

      2. You’re very welcome. You’ll have to let me know how you like them when they’re baked!

  26. I tried this recipe today but unfortunately i heated the oven to 425F without noticing my mistake O_O so my first batch turned out really brown…..
    But i took out the second and third batches out a few minutes earlier and they turned out amazing! slightly crunchy on the outside with a soft middle just like I like them best 😀 This is the first M&M cookie recipe I’ve tried where the cookies actually kept their shape 🙂
    I’m going to take the cookies to school with me on monday and i bet they’ll be gone reallly really fast! ;D

  27. Hi Sally, ive started following your blog about a month ago and I’ve to say that everything it’s been a success. I live in ibiza a small island (Mediterranean sea) of Spain. Some of the chocolate ingredients are difficult to get. I’ve been to the USA several times so every time I go I try to stock up. My mother in law stais in Scotland so she also brings me some ingredients that I cannot find or cost you an arm. I really enjoy your post. Thank you for the great recepies.

    1. Thank you, Belen. So sweet of you to say hi. I’m happy you are loving the recipes so far and able to work with what you have available to you. Let me know any new recipes you try, love hearing from all over the world!

  28. If I have no corn starch, can I leave it out? Or is that not recommended? I

    1. The cookies won’t be as soft without it – so keep that in mind.

  29. How many sticks of butter is 1.5 I would like to make them tomorrow

  30. Hi.. Is it possible to make it as a cake size?
    Like giant?

1 2 3

With kitchen-tested quality recipes and step-by-step tutorials, my goal is to give you the confidence to bake and cook from scratch.

Sally's signature

Recipes You’ll Love



Join the community on the 1st of every month as we tackle a new challenge recipe. Review Sally's Baking Challenge FAQ page if you have any questions.

View More

A tradition since 2013, every December we countdown to Christmas with 10 new cookie recipes in a row!

View More

The first week of every November is all about Thanksgiving Pies.

View More

My Cookbooks

Sally's Cookbooks

About Sally

Welcome to my Kitchen!

I’m Sally, a cookbook author, photographer, and blogger. My goal is to give you the confidence and knowledge to cook and bake from scratch while providing quality recipes and plenty of pictures. Grab a cookie, take a seat, and have fun exploring! more about Sally