Context. Ultraluminous and hyperluminous X-ray (ULX and HLX) sources could constitute interesting laboratories to further improve our understanding of the supermassive black hole growth through super-Eddington accretion episodes and successive mergers of lighter holes. ULXs are thought to be powered by super-Eddington accretion onto stellar-mass compact objects, while HLXs are of an unknown nature, but they could be good candidates for accreting intermediate mass black holes (IMBHs). However, a significant portion of the sample of ULX and HLX candidates derived from catalogue searches are in fact background active galactic nuclei (AGN). Aims. Here we build samples of ULXs and HLXs from the three largest X-ray catalogues available, compiled from XMM-Newton, Swift-XRT, and Chandra detections, and the GLADE catalogue containing 1.7 million galaxies at D < 1000 Mpc. We aim to characterise the frequency, environment, hardness, and variability of ULXs and HLXs to better assess their differences and understand their populations. Methods. After a thorough classification of these X-ray sources, we were able to remove ∼42% of sources with a signal-to-noise ratio (S/N) > 3 which were shown to be contaminants, to obtain the cleanest sample of ULXs and HLXs to date. From a sample of 1342 ULXs and 191 HLXs detected with a S/N > 3σ, we study the occupation fraction, hardness, variability, radial distribution, and preferred environment of the sources. We built their Malmquist-corrected X-ray luminosity functions (XLFs) and compared them with previous studies. Thanks to the unprecedented size of the sample, we were able to statistically compare ULXs and HLXs and assess the differences in their nature. The interpretation of HLXs as IMBHs is investigated. Results. A significant break is seen in the XLF at ∼1040 erg s−1. With our ULX sample, containing ≲2% of contaminants, we are able to confirm that ULXs are located preferentially in spiral galaxies and galaxies with higher star formation rates. While X-ray binaries (XRBs), ULXs, and most HLXs share common hardness and variability distributions, a fraction of HLXs appear significantly softer. Unlike ULXs, HLXs seem to reside equally in spiral as well as lenticular and elliptical galaxies. We note that 35% of the HLX candidates have an optical counterpart, and we estimate the mass of 120 of them to be in the range of 2 × 103 − 105 M⊙. Most of the HLX population is found to be consistent with an accreting massive black hole in a dwarf galaxy satellite of the primary host. This diverse nature needs to be confirmed with deeper optical and infrared observations, as well as upcoming X-ray facilities.