How to write superscript in markdown using caret syntax or HTML. Syntax, examples, and platform support.
Superscript text appears above the normal line of text at a smaller size, commonly used for exponents (x²), ordinals (1st), and footnote numbers. Markdown has no standard superscript syntax — platforms use either caret (^) notation or raw HTML.
Supported in Pandoc, Obsidian, and some extended markdown parsers.
Raw HTML works on any platform that allows HTML in markdown.
| Platform | Supported | Notes |
|---|---|---|
| Obsidian | Yes | Caret ^ syntax supported |
| GitHub | Partial | HTML <sup> works; ^ syntax does not |
| GitLab | Partial | HTML <sup> works |
| Discord | No | — |
| Notion | No | No superscript support |
| Slack | No | — |
x^2
x^2^ or x<sup>2</sup>
Caret syntax requires closing caret on most parsers. A lone ^ may render literally.
x<sup>2</sup> works wherever HTML is allowed in markdown. It is more verbose but universally supported.
Some parsers automatically render footnote markers [^1] as superscript. Use footnote syntax when available instead of manual superscript.
Everything you need to know.
Use HTML: x<sup>2</sup>. If your platform supports extended markdown (Obsidian, Pandoc), you can use x^2^.
Subscript text appears below the normal baseline at a smaller size, used for chemical formulas (H₂O), mathematical notation, and technical content. Like superscript, subscript has no standard markdown syntax and requires either extended markdown or raw HTML.
Footnotes add numbered references to text that link to definitions at the bottom of the document. The inline marker [^1] or [^label] appears in the text, and the corresponding [^1]: definition appears elsewhere. Footnotes are a GitHub Flavored Markdown extension.
Inline code is formatted by wrapping text in single backticks (`). It renders in a monospace font with a subtle background, making it ideal for variable names, commands, file paths, and short code snippets within a sentence.
Paste your markdown and see superscript rendered instantly with professional themes.