I used to have a mess with my earrings. I have pierced ears as most of us do, but for this little hint it makes no difference.
One time several years ago I was complaining to my sister that I had a little box I kept my earrings in and it was always a mess and finding the mates was annoying. She suggested I use a set of ice cube trays. It has turned out to be about the best suggestion I have ever received.
They are cheap, find yours at Goodwill or the dollar store. If you need a lot of space, they stack neatly if they are the same size/make and take up very little room on your dresser, vanity or you can even do like I do and keep them in a drawer.
Here are a few picture to give you the idea. I tend to group mine together by color and then have one little place for all the backs. If I lose a back there are always plenty more and I know where to find them. Let me know what you think.
As an added little tip, when you travel and want to take earrings and not get them on a jumbled in a baggie or little bag. Just wrap a piece of plastic cling wrap around the whole tray and stick it in your suitcase.