Sortable list of materials by Mohs scale and by Vickers hardness — the two numbers people actually mean by "hard."
Classic comparisons
A scratch-test ranking devised by Friedrich Mohs in 1812. Material A is harder than material B if A scratches B and B doesn't scratch A. The scale is anchored by 10 reference minerals: talc (1), gypsum (2), calcite (3), fluorite (4), apatite (5), orthoclase (6), quartz (7), topaz (8), corundum (9), diamond (10).
It's not linear — the gap between corundum (9) and diamond (10) is far bigger than between any other adjacent pair. Cheap, fast, but coarse.
Press a pyramid-shaped diamond indenter into the material under a known load, measure the diagonal of the resulting dent. Hardness = load / dent-area, reported as a pressure in gigapascals (GPa). Developed by Vickers Ltd. in 1921.
Quantitative, reproducible, comparable across material types. Diamond comes out at ~70–150 GPa depending on which crystal face you indent, with single-crystal {111} faces near the top.
Lonsdaleite and wurtzite boron nitride are theoretically harder than diamond — a 2009 first-principles simulation showed both should exceed diamond. Neither has been confirmed by experiment on a defect-free sample, because making one is the unsolved problem. Natural lonsdaleite from meteorites is too contaminated to measure cleanly. So the title "hardest known material" still pragmatically goes to diamond.