A PB&J sandwich is a mainstay of unrefrigerated lunches, so opened jams and jelly should be shelf-stable, right? Some of them can be, up to a very limited point.
Classic jams and jellies have high sugar and acid levels. They are also put through a process called water-bath canning, in which just-sealed jars are submerged in boiling water to kill microbes and keep the jams and jellies safe to eat. These jars can be kept in a cool, dark pantry for up to a week after opening.
Reduced-sugar jams and those with less acidic fruit deteriorate more quickly. Discard the jelly if it becomes moldy or smells bad. Note that some brands have shorter windows, so check the label to be sure. (And those PB&J sandwiches? Don’t leave them unrefrigerated for more than a day.)
While technically you can keep some types in the pantry, in general, it’s advised that jams and jellies be refrigerated once opened, regardless of ingredients or processing method. One potential reason is a home’s warmth, which leads to less-than-ideal storage conditions for open jam jars. Another reason is that the preservatives used may not be enough to keep the jam safe at room temperature.
Homemade jams and jellies should go in the fridge after opening, and “refrigerator” or “freezer” jams should never be left open at room temperature. Those aren’t canned in a boiling water bath and should be treated as perishable.