The Short Answer
Does coconut milk need to be refrigerated? It depends on which type you have and whether it has been opened. Canned coconut milk does not need refrigeration before opening. Shelf-stable carton coconut milk does not need refrigeration before opening either. Refrigerated carton coconut milk must stay cold at all times. And all three types must be refrigerated immediately after opening.
The rules are simple once you know which type you have. Getting it wrong mostly matters after opening, when all coconut milk becomes perishable regardless of what it was before. For more on storing pantry staples, see our Food Storage Guide.
Short answer: Canned and shelf-stable carton: no refrigeration needed until opened, then refrigerate immediately and use within 4 to 7 days (canned) or 7 to 10 days (carton). Refrigerated carton: keep cold always, use within 7 to 10 days of opening. Homemade: refrigerate immediately, use within 3 to 5 days.
How Long Does Coconut Milk Last?

Type
Before Opening
After Opening

Canned (full-fat or light)
Pantry, 2 to 5 years
Fridge in airtight container, 4 to 7 days

Shelf-stable carton (unrefrigerated aisle)
Pantry, 6 to 12 months
Fridge, 7 to 10 days

Refrigerated carton (dairy case)
Fridge always, use by printed date
Fridge, 7 to 10 days

Homemade

Fridge immediately, 3 to 5 days

The FDA’s safe food handling guidelines advise keeping perishable foods out of the temperature danger zone (40°F to 140°F) and refrigerating opened dairy-alternative products promptly. Once any coconut milk is opened, that guidance applies regardless of how it was stored before.
Canned Coconut Milk: Pantry Before, Fridge After Opening
Unopened canned coconut milk is shelf-stable and does not need refrigeration. Store cans in a cool, dark pantry away from heat sources and they will keep for 2 to 5 years. Avoid storing cans near the stove or in an uninsulated space, as heat accelerates quality decline over time.
Once you open a can, refrigeration is required. Transfer any leftover coconut milk to an airtight container rather than refrigerating it in the original can. Metal from the can lining can leach into the acidic contents once air is introduced, affecting both flavor and quality. A glass jar with a tight lid is ideal. Label it with the opening date and use within 4 to 7 days.
Shelf-Stable Carton: Same Rules as Canned
Shelf-stable cartons, the kind sold in the non-refrigerated aisle, use aseptic packaging that keeps coconut milk stable at room temperature for 6 to 12 months. No refrigeration needed until opened.
Once you open a carton, treat it exactly like opened canned coconut milk: refrigerate, keep sealed, and use within 7 to 10 days. If the carton does not reseal well, transfer the contents to an airtight container.
Refrigerated Carton: Keep Cold Always
Cartons sold in the dairy case have not been aseptically packaged and must stay refrigerated at all times, even before opening. If you bought it cold, keep it  

Author