I suggest starting with UPSID, which is a collection of sounds from 451 languages of the world, listing 919 segments. There are various queries that you can perform, such as finding the shared segments in the inventories of two languages, or find out what languages have a particular segment (or class). The database is available for your own manipulation, if you want to construct your own queries. The original DOS program is still available from UCLA. UPSID presents what appear to be phonemes (that is, the authors did not do a rigorous phonological analysis of all of the languages, but it is not just a list of all of the surface phones reported in a source).
You can also supplement that list with Ladefoged and Maddieson's book The sounds of the world's languages, which gives you a property-focused survey of the range of variation in languages. It does not give you complete inventories, but for example if you want to know if there is a difference between an epiglottal and a pharyngeal consonant, you can read about that in the book.