HTML Superscript Generator
Generate a <sup> superscript element for exponents, ordinals, footnote references, and trademark symbols — and copy the HTML with live preview.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is HTML Superscript Generator?
The HTML `<sup>` element renders its content as a superscript — text positioned above the baseline at a smaller size. Common uses include:
- Mathematical exponents: x`<sup>`2`</sup>` (x squared), E = mc`<sup>`2`</sup>` - Ordinal indicators: 1`<sup>`st`</sup>`, 2`<sup>`nd`</sup>`, 3`<sup>`rd`</sup>` - Footnote or citation references: "according to Smith`<sup>`[1]`</sup>`" - Trademark or registered symbols: Brand`<sup>`™`</sup>`
For purely decorative vertical text positioning without semantic meaning, use CSS `vertical-align: super` instead.
How to Use HTML Superscript Generator
Enter the superscript text (e.g. "2" for x²)
Optionally add id, class, or title attributes
Copy the generated HTML and insert it within surrounding text
Common Use Cases
- Science and maths content authors writing exponents and formulas.
- Bloggers adding footnote reference numbers in article text.
- Developers generating ordinal number suffixes (1st, 2nd, 3rd) dynamically.
Example Input and Output
A superscript "2" for a mathematical exponent.
Text: 2<sup>2</sup>Privacy
All HTML generation runs in your browser. No data is sent to any server.
Frequently Asked Questions
How do I write E = mc² in HTML?
Write: E = mc<sup>2</sup> — only the exponent "2" is wrapped in <sup>. The rest is plain text.
Should I use <sup> for the ™ or ® symbol?
You can, but modern practice is often to use the Unicode characters ™ (U+2122) and ® (U+00AE) directly in text, or their HTML entities ™ and ®. Using <sup> gives you more sizing control but adds markup overhead.
Related Tools
HTML Subscript Generator
Generate HTML <sub> subscript elements for chemical formulas, footnote markers, and mathematical notation. Configure id, class, and title. Live preview included.
HTML Emphasize Text Generator
Generate HTML <em> (emphasize) elements with optional id, class, title, and lang attributes. Adds semantic stress emphasis to inline text. Live preview included.
HTML Strong Text Generator
Generate HTML <strong> elements for strong importance, seriousness, or urgency. Configure id, class, title, and lang attributes. Live preview included.
HTML Mark Text Generator
Generate HTML <mark> elements to highlight text for reference or search result emphasis. Configure id, class, and title attributes. Live preview included.
HTML Underlined Text Generator
Generate HTML <u> underline elements for unarticulated annotations, proper noun marking, and spelling error indication. Configure id, class, title, and lang. Live preview.
HTML Citation Generator
Generate HTML <cite> elements to mark titles of creative works — books, films, articles, and more. Optionally wrap in a link. Live preview included.

