You can freeze food in a glass jar, but not just any jar: use jars without shoulders, with openings as wide as their bodies, and marked as freezer-safe. In a jar with shoulders, expanding ice gets trapped in the narrower neck and can crack the glass at the shoulder. When filling with liquid, leave headspace at the top and tighten the lid after the food has frozen.
The problem with glass in the freezer is pressure, not cold. Water is known to expand as it freezes; when this expansion happens inside a jar, the ice pushes upward. In a straight-sided jar with an opening as wide as its body, the ice can expand freely upward without stressing the glass. In a jar with shoulders, however, the ice presses against the narrowing surface as it moves from the body into the neck; the glass cracks at its weakest point, around the shoulder. Since shards from a broken jar can get into nearby packages, the damage is not limited to losing one container.
That is why you should choose a jar by its shape. Shoulderless, straight-sided jars are suitable for the freezer; most classic jam and pickle jars have shoulders and are unsuitable. Jars labeled freezer-safe by the manufacturer are also made from thicker, tempered glass, which gives them more resistance to sudden temperature changes. Before putting an empty jar from the grocery store in the freezer, check its shoulder and glass thickness; that is all you need to decide.
Do not fill the jar to the rim. For liquid foods such as soup, stock, sauce, or fruit purée, leave 2–3 cm of headspace at the top; leave a little more in containers with narrow openings. Do not screw the lid on tightly while filling; cover it loosely and tighten it after the food has frozen completely. This lets the contents expand in an unobstructed direction. Place jars upright in the freezer without letting them touch; in a jar frozen on its side, the ice expands sideways and puts pressure on the glass again.
The second risk is a sudden temperature change. Choose a container suitable for freezing and follow the glass jar manufacturer’s instructions. Do not leave food on the counter until it reaches room temperature; divide it into shallow containers for rapid cooling and refrigerate within 2 hours, or within 1 hour above 32°C / 90°F. Once chilled, the food can be frozen in a suitable jar. Thaw the frozen jar in the refrigerator; do not try to thaw it with hot or lukewarm water.
The advantages glass offers in return make it worth meeting these conditions. Glass does not retain odors or colors, does not stain even after holding a tomato-sauce dish, does not get scratched, so it stays airtight for years, and lets you see what is inside. Plastic containers become cloudy over the years, retain odors, and their seals loosen. That is why setting aside a few suitable glass jars is a one-time investment that pays off in kitchens that regularly freeze soup, sauce, and stock.