Superscript text
A practical review of superscript: Unicode characters versus markup and CSS, when the raised form stays usable after copy and share, and when plain text is the better choice.
Is this transformation suitable for your intended use?
Superscript is a reasonable choice when a short raised mark carries a convention readers already know: an exponent, a footnote cue, an ordinal ending, or a phonetic label. The main benefit is compact notation. A raised two is enough for “squared” in a formula; a raised number is enough for a note marker in print-like prose.
The decisive tradeoff is completeness versus what actually travels with the string. Only some letters and digits have dedicated raised characters, and formatting that only looks raised is stripped in many plain destinations. If every character must raise evenly, if the string will be searched, sorted, parsed, or spoken as ordinary letters, or if the effect is decorative, keep the base characters and write the meaning in plain text (for example x squared, or x^2).
Use the raised form for brief, conventional marks in prose, citations, and math notes you control. Prefer ordinary characters for code, identifiers, passwords, data fields, long passages, and any value a machine or a search box must match against normal letters and digits.
What the transformation actually changes
Raised text is not a single operation. Three different mechanisms are commonly labeled the same way, and they do not store the same thing.
| Mechanism | What is stored | What you see |
| Unicode substitution | Different characters that resemble raised letters or digits | Raised glyphs, only where a matching character and font exist |
| Markup or rich-text style | The original letters, plus a superscript style | Raised, smaller type while the style is honored |
| CSS presentation | The original letters; the stylesheet raises and shrinks them | Raised type in that page or app only |
Unicode substitution changes the stored code point. The digit two becomes the character ², not a styled 2. The available set is sparse: superscript digits ⁰ through ⁹ and a few signs such as ⁺ ⁻ ⁼ ⁽ ⁾ ⁿ are the usual core; many Latin letters exist as phonetic modifier letters; large parts of the alphabet, other scripts, and most punctuation have no raised counterpart. Tools typically leave unsupported characters on the baseline, so a word can mix full-size and raised glyphs.
Markup and CSS leave the original characters in place. HTML superscript, a word-processor character style, or a smaller font with raised vertical alignment only changes presentation. Strip the tags or the stylesheet and the letters and digits are still the ordinary ones.
That is the stored-versus-visual split. Calling the Unicode set a font is misleading: a font restyles the same character, while substitution writes a different one. The transformation is also unrelated to reversing a string, mirroring glyphs, or changing bidirectional display order. Those alter sequence or orientation. Superscript only attempts to raise and reduce.
A mechanism check, without a supplied converter sample: input 2 remains digit two under markup and CSS, and becomes ² under Unicode substitution. Combining marks and multi-code-point emoji are outside what a raised-letter map is built to handle; they should be left unchanged rather than forced through a one-for-one character table.
Plain stored text: x2
Unicode substitution: x² (the 2 is a different character)
Markup / CSS: x2 (same 2, displayed raised while style lasts)
Will the result remain readable and usable after copying or sharing?
Copy and paste follow what was stored, not the look on screen. Substituted raised characters usually paste as those same characters into destinations that accept Unicode. Recipients see a raised glyph only if their font includes it; otherwise the result can be a missing-glyph box, a fallback from another face, or an uneven mix. The pasted string will not match a search for the original letters or digits.
If the raised look came from HTML, a document style, or CSS, paste into another rich editor may keep the style. Paste into a plain field, a terminal, many chat boxes, or source code typically drops the appearance and leaves ordinary characters, which is often the safer outcome.
Assistive technology, caret movement, and find-in-page treat substituted raised characters as distinct symbols. A reader may hear the corresponding letter or number, a phonetic modifier, a character name, or nothing; editing may step through them as separate units. That behavior is product-specific. This review has no scoped test of a named screen reader, browser, or editor, so announcement and search in any given tool remain unverified. One successful rendering does not imply the same string will be found, sorted, or spoken as ordinary text elsewhere.
Keep a plain-text equivalent when the raised form must be understood without special glyphs: in indexes and search, in data interchange, in code, and whenever a person or a parser should treat the content as the original letters. Store or repeat the meaning in ordinary characters even if the page displays a raised mark (m2 or m^2 beside a displayed m²).
Bounded recommendation
- Choose Unicode raised characters only for a few well-supported marks, especially ² and ³, that you are willing to treat as distinct characters.
- Choose markup or CSS when you control the document and need the real letters preserved.
- Choose plain text when meaning, search, editing, or assistive access matter more than the raised look.