To avoid any loss in quality, freeze cookie for up to 2 months. In theory, cookie dough can be frozen indefinitely without any safety concerns. However, the USDA says homemade cookie dough is best when consumed within 2 months of freezing it.