Skip to content
All referenceText Formatting

Markdown Superscript

How to write superscript in markdown using caret syntax or HTML. Syntax, examples, and platform support.

What is markdown superscript?

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.

Syntax

Caret syntax (extended)

Supported in Pandoc, Obsidian, and some extended markdown parsers.

Result
x2

HTML (universal)

Raw HTML works on any platform that allows HTML in markdown.

Result
x2

Platform support

PlatformSupportedNotes
ObsidianYesCaret ^ syntax supported
GitHubPartialHTML <sup> works; ^ syntax does not
GitLabPartialHTML <sup> works
DiscordNo
NotionNoNo superscript support
SlackNo

Common mistakes

Wrong
x^2
Right
x^2^ or x<sup>2</sup>

Caret syntax requires closing caret on most parsers. A lone ^ may render literally.

Tips for superscript

1Use HTML for cross-platform compatibility

x<sup>2</sup> works wherever HTML is allowed in markdown. It is more verbose but universally supported.

2Combine with footnotes

Some parsers automatically render footnote markers [^1] as superscript. Use footnote syntax when available instead of manual superscript.

Frequently asked questions

Everything you need to know.

1

How do I write exponents in markdown?

Use HTML: x<sup>2</sup>. If your platform supports extended markdown (Obsidian, Pandoc), you can use x^2^.

Related elements

Try it in the editor

Paste your markdown and see superscript rendered instantly with professional themes.