If you’re going to treat yourself to homemade chocolate chip cookies, they’d better be damn good. But trying a new chocolate chip cookie recipe can be kind of a gamble. After all, everyone has a different idea of what a perfect chocolate chip cookie should be. And if the treats that come out of the oven don’t meet your standards, you’re in for some serious disappointment.

So, how can you tell whether the batch you’re about to make will turn out perfectly chewy or crispy? What if you’re after extra chocolate flavor? And what should you do if you want to transform a standard recipe to be vegan or gluten-free? Making the perfect chocolate chip cookie is easier than you think. We chatted with three experts on how to turn a standard chocolate chip cookie recipe—like the classic Toll House one —into exactly the kind of cookie that you’re craving, and here’s what they had to say.

A Super-Chewy Cookie

To achieve that dense, fudgy texture, you need to add extra moisture. One way? Slightly underbake your cookies by a few minutes, says Jenny McCoy, pastry baking arts chef-instructor at the Institute of Culinary Education in New York. Scooping rounded mounds of dough onto your baking sheet (instead of flattening them) also helps, since it keeps the cookies denser.

Still not chewy enough? McCoy recommends adding more:

  • Butter: For every stick of butter your recipe calls for, add an additional tablespoon.
  • Brown sugar: Fun fact… brown sugar has more moisture than white sugar, and dark brown sugar has more moisture than light brown sugar. Swap the light brown sugar for dark, or switch up your sugar ratio. If your recipe calls for an equal amount of white and brown sugar, try 40 percent white and 60 percent brown instead.
  • Eggs: For every egg your recipe calls for, add an additional egg yolk.

A Crispy, Crunchy Cookie

If the key to a chewy cookie is more moisture, then yes, you guessed it, the key to a crispy one is less. Achieve drier cookies by baking them for a few minutes longer than the recipe calls for, McCoy says. You can also flatten the mounds of dough with your palm before baking. That makes the cookies thinner, so they spread out more and bake faster.

For even more crispiness:

  • White sugar: Since white sugar has less moisture than brown, try making your cookies with 75 to 100 percent white sugar, McCoy recommends.
  • Don’t cut back on eggs or butter. The protein from the egg gives your cookie structure and keeps it from becoming sandy or crumbly, like shortbread, says McCoy. And lower-fat cookies with less butter, well, quite frankly, just don’t taste as good.

A Double Chocolaty Chocolate Chip Cookie

If you’re in the mood for a chocolate cookie with chocolate chips (double chocolate), good news: They’re crazy easy to make.

  • Cocoa powder: For every cup of flour your recipe calls for, replace 3 tablespoons of it with cocoa powder, says McCoy. Remember to sift the cocoa powder first to get rid of any lumps.

A Vegan Chocolate Chip Cookie

Some baked goods might be tough to veganize (hello, lemon meringue pie!), but chocolate chip cookies aren’t one of them. Here’s how Rachel Klein, founder of the vegan restaurant Miss Rachel’s Pantry in Philadelphia, does it:

  • Swap dairy butter for vegan butter: This is an obvious one, but the good news is that vegan butters, like Earth Balance, have the same ratio of fat to water as dairy butters, so they won’t mess with your cookie’s consistency.
  • Swap each egg for a flax egg: Mixing ground flaxseeds with water creates a sticky, gel-like mixture that mimics the viscous texture of beaten eggs, Klein says. For each flax egg, whisk 1 tablespoon ground flaxseeds with 1 tablespoon warm water.
  • Swap dairy milk for soy milk: Most chocolate chip recipes don’t call for milk. But if yours does, just sub soy. It’s richer and creamier than almond milk, Klein says.
  • Swap chocolate chips for vegan ones: Remember to double-check the ingredient list for your chocolate chips, since some contain milk. Enjoy Life Semi-Sweet Chocolate Chips are vegan. You can also go for carob chips to be 100 percent sure.

A Gluten-Free Chocolate Chip Cookie

There are tons of gluten-free store-bought cookies out there, but they’re never as good as a homemade batch. First—and most important—is swapping out that all-purpose flour. “Use a blend of gluten-free flours to mimic the taste and texture of wheat,” says Pamela Ellgen, author of The Gluten-Free Cookbook for Families. You can use a store-bought blend designed for baking, like Bob’s Red Mill All-Purpose Gluten-Free Baking Flour, or make your own. Here’s how to do that, according to Ellgen:

  • Replace 2/3 of the all-purpose flour with whole-grain gluten-free flour. She suggests 1 part millet, 1 part sorgum, and 3/4 part brown rice flour. The millet and sorghum flours are light and sweet, and they have protein to mimic the protein found in all-purpose flour. And the brown rice flour act as a thickener, she says.
  • Replace the remaining 1/3 of the all-purpose flour with a gluten-free starch. “Starches improve texture and mimic the elastic qualities of gluten,” Ellgen says. Try tapioca or cornstarch for a crispier cookie, and potato starch for a cookie that’s more cake-like.
    Our opinion: We say just buy the store-bought GF flour to minimize how many ingredients you have to buy.
  • Add guar or xanthan gum. Use 3/4 teaspoon for every cup of flour your recipe calls for. They keep GF baked goods moist and create the elastic properties that conventional baked goods get from gluten.
  • Up the brown sugar. Gluten-free cookies tend to be drier than ones made with all-purpose flour. To bump up the moisture and achieve a richer texture, try using 3 parts brown sugar to 2 parts white sugar, Ellgen recommends.
  • Double the amount of vanilla extract. (Always check to make sure your vanilla extract is gluten-free.) “This adds an incredible amount of flavor, which will hide the flavor of strongly flavored gluten-free flours,” she says.

Want More?
Can You Become Addicted to Chocolate? Science Explains
How to Keep Cookies Soft