Other than eating them straight out of the oven.

Whether you've converted your kitchen into a Christmas cookie factory or are just baking a single batch of treats to satisfy a sudden dessert craving, you'll need to know the best way to store your cookies to preserve their flavor and texture. (Unless you plan on eating all of them straight off of the cookie sheet—no judgment!)

The best way to store cookies depends on the type of cookie and how long you want to store them. Read on for our best tips.

Salted Butter-Pecan Shortbread Cookies
Credit: Antonis Achilleos; Prop Styling: Kay E. Clarke; Food Styling: Emily Nabors Hall

Crisp Cookies

Moisture is the enemy of treats like gingersnaps, shortbread, biscotti, and crunchy-edged chocolate chip and sugar cookies. While you might think an airtight container or plastic storage bag is the way to go, it will actually trap moisture inside, making the cookies soften. Instead, leave it partially unsealed. The cookies should stay fresh for several days.

If you want to enjoy the cookies later on, your best bet is to make and freeze the unbaked dough. Shape the dough into logs, wrap in plastic, place in a freezer bag or airtight container, and freeze. Or flash freeze individual scoops of dough on cookie sheets, then place the frozen balls of dough in a freezer bag and freeze.

Soft Cookies

For puffy and tender treats like snickerdoodles and chocolate chip, peanut butter, or sugar cookies, a little moisture will help them retain their soft texture. If you are planning to eat the cookies within a few days, place them in an airtight container or ziplock bag. You can also place a slice of sandwich bread inside the container, which will absorb excess moisture and help keep the cookies soft.

If you want to enjoy the cookies later on, bake them, then let them cool. Flash freeze them on cookie sheets, then transfer the frozen cookies to air airtight container or freezer bag. To defrost the cookies, place them on a paper towel-lined plate at room temperature.