If kept cool and dry, they will last 5 to 10 years.
Some less others more.
Some say they loose about 5% of the seeds each year, so you will need to plant more thickly.
Sealed in a coffee can, with a couple pouches of dried milk to take the moisture that might collect is a good idea, dark and cool is the ticket.
I have planted 10 year old onion seeds and gotten a crop, even tho they will tell you that you need a fresh crop of onion seeds each year.
Any seeds you have left over, save them and buy extra of the main crops.
Try to not buy the hybrids, as if you save the seeds from hybrids, most time you will get nothing from them but a plant.
LOL, but yes, I also plant the saved seeds from hybrids for the simple reason that every seed should be planted.
I can’t think of a hybrid saved seed that has ever produced for me.
Remember the "volunteer" tomato? I planted ten yesterday and left the other seed out. I couldn't find them this morning when I looked. I searched the kitchen (my daughter had cleaned up). After about an hour, I started on the garbage. Sure enough, there was the envelope, in the very bottom, but only about 25 seeds - about 75 were gone. By that time, I was relieved to have found any.
But it doesn't end there. I pulled them out of the now wet envelope and put them on a plastic lid to dry - and debated on just planting them tonight. A few minutes later I went into the kitchen, and they were gone. The plastic lid was about 8 feet away, on the spagetti, no seeds. I saw one seed on the countertop, and got it. Then I got the bifocals and flashlight. I ended up finding about 17 or 18, and immediately secured them! Whew, what a day!