Superscript ¹ ² ³ sit in Latin-1 for historical reasons; the other digits are in the Superscripts and Subscripts block. Because they come from different blocks, many fonts draw them at slightly different heights. All of them have compatibility decompositions, so NFKC turns x² into x2.
Unicode encodes superscript letters as phonetic modifier letters, not as a formatting feature, so the set is incomplete: superscript capitals C, F and Q only arrived in Unicode 14.0 (2021), there is still no superscript capital S, X, Y or Z, and only a handful of subscript letters exist. For real formulas, use markup (<sup>, <sub>) or a math renderer; use these characters where markup is not available, such as usernames, plain-text chat or filenames.
Click any symbol to copy it. Names link to the full character page with every encoding.