Diamond has the highest number density (i.e., the number of atoms per unit volume) of all known substances and a remarkably high valence electron density (rws = 0.697 Å). Searching for possible superdense carbon allotropes, we have found three structures (hP3, tI12, and tP12) that have significantly greater density. The hP3 and tP12 phases have strong analogy with two polymorphs of silica (β-quartz and keatite), while the tI12 phase is related to the high-pressure SiS2 polymorph. Furthermore, we found a collection of other superdense structures based on the motifs of the aforementioned structures, but with different ways of packing carbon tetrahedra, and among these the hP3 and tI12 structures are the densest. At ambient conditions, the hP3 phase is a semiconductor with the GW band gap of 3.0 eV, tI12 is an insulator with the band gap of 5.5 eV, while tP12 is an insulator, the band gap of which is remarkably high (7.3 eV), making it the widest-gap carbon allotrope. These allotropes are metastable and have comparable to diamond or slightly higher bulk moduli; their Vickers hardnesses are calculated to be 87.6 GPa for hP3, 87.2 GPa for tI12, and 88.3 GPa for tP12, respectively, thus making these allotropes nearly as hard as diamond (for which the same model gives the hardness of 94.3 GPa). Superdense carbon allotropes are predicted to have remarkably high refractive indices and strong dispersion of light.