Headspace is the unfilled space between the food in a jar and the lid of a jar. General canning headspace recommendations from the United States Department of Agriculture are as follows: Leave ¼ inch headspace for jams and jellies; leave ½ inch for tomatoes, fruits and pickles that will receive a boiling water bath process; leave 1 inch headspace for most low acid foods that will be pressure canned. Some vegetables and meats require 1¼ to 1½ inches headspace.
Headspace is needed because foods expand as jars are heated. The air in a food, its starch content and the processing temperature determine how much a food will expand. Air expands greatly when heated to high temperatures; the higher the temperature, the greater the expansion. Starchy foods such as corn, potatoes, lima beans and rice expand and absorb water during heat processing.
If too little headspace is allowed, the food may expand and bubble out when air is being forced out from under the lid during processing. The bubbling food may leave a deposit on the rim of the jar or the seal of the lid and prevent the jar from sealing properly. If too much headspace is allowed, the food at the top is likely to discolor. Also, the jar may not seal properly because there will not be enough processing time to drive all air out of the jar.