Eggs are something that have a surprisingly long shelf life in the refrigerator: A carton will keep for up to five weeks from the purchase date, regardless of the sell-by date. However, because we’re all stocking up in order to limit our grocery trips, you may be wondering if you can keep eggs fresh for even longer than that. The short answer is yes, but it comes with a catch.

If you want to hold eggs for longer than five weeks, you can, but you should freeze them. Freezing eggs might seem unconventional, but they actually hold up incredibly well in the freezer. The only trick is how you freeze them. Here’s what you need to know.

Avoid Freezing Eggs in the Shell

Eggs freeze well, but you want to take them out of their shell first. That’s because when frozen in the shell, the shells can crack as the liquid inside freezes and expands. Sure, freezing can make for a great fried egg, as we’ve mentioned, but it doesn’t come with the risk of cracking. Also, when frozen as is, the texture of the yolk changes and becomes thick and gummy.

Instead, for successful long-term storage, your best bet is to either freeze whole, lightly beaten eggs, or freeze the yolks and whites separately.

3 Methods for Freezing Eggs