Make sure that you label them clearly for seed to avoid temptation. Allow seeds to ripen fully before they are harvested. Mature seeds are more likely to grow well than seeds harvested too soon. Strong, healthy plants produce healthier seeds than seed from weak, stressed plants. Warm, dry conditions while seed matures increases their storage life.
Most vegetable seeds remain viable for three to five years when stored properly.
Place thoroughly dry seed in a tightly closed glass jar and keep the jar in a cool dry location. Put silica gel packets in with the seed to help keep it dry. You can add diatomaceous earth to seed to help prevent insect damage. Store seed in the refrigerator to further increase its life expectancy. If you keep them cool and dry, these seeds should maintain good viability for five years or more.