WebToolsPlanet
Developer Tools

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

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What 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

1

Enter the superscript text (e.g. "2" for x²)

2

Optionally add id, class, or title attributes

3

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.

Configuration
Text: 2
HTML output
<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 &trade; and &reg;. Using <sup> gives you more sizing control but adds markup overhead.