I put my spare buttons into a clear canister style jar, and I display it on my dresser along with my jewelry boxes and hat stands. My grandmother always kept spare buttons in jars, so I think keeping them this way appeals to me because it reminds me of being in her house when I was young. I take them out of the little plastic bags first, unless the buttons look like they might damage easily. The delicate looking buttons remain in the bags, and those go into one of my jewelry boxes. If I end up needing to replace a button, I just sift through the jar until I find a match.
BTW, if the little plastic bags are the kind that reseal, and if they are still in good condition (no large holes from staples, etc.), then I reuse those to protect and store small jewelry items inside of my jewelry boxes. It keeps pairs of small earrings together, and keeps brooches from scratching each other.
If you happen to have buttons left over from clothing that you no longer own, and you don't find keeping jars of random buttons sitting around as charming as I apparently do, then consider giving them to a crafter you may know. My cousins make jewelry with leftover buttons. I spent an hour or so sorting old buttons by color and style with them at our last family gathering, and found it incredibly soothing for some reason. I took great pleasure in grouping together old buttons that complemented each other.
If I happen to have a garment that I need to purge, but which isn't up to snuff for donation, I always check to see if the buttons are worth salvaging. If they are, I snip them off before discarding the garment.