Markdown cheatsheet · Footnotes

Footnotes in markdown

A footnote is two parts: a [^1] marker in the text, and a [^1]: definition line anywhere in the document. The renderer moves the note to the end and links both ways.

The syntax

You type
Markdown has footnotes.[^1]

[^1]: In renderers that support them.
You get (on GitHub)

Markdown has footnotes.1


  1. In renderers that support them.

The marker becomes a superscript number that jumps to the note; the arrow jumps back. Where you put the definition does not matter: notes are always collected at the bottom of the rendered page. On GitHub this works in READMEs, issues, pull requests and discussions, but not in wikis.

Keep definitions together at the bottom of the file. They render the same from anywhere, but your future self will find them faster in one place.

Named labels

The label can be a word instead of a number. Labels only pair a marker with its note; the output numbering is always sequential in the order the markers appear, whatever you called them.

You type
Tea is older.[^tea] Coffee moved faster.[^1]

[^tea]: First brewed millennia ago.
[^1]: Reached Europe in the 1600s.
You get (on GitHub)

Tea is older.1 Coffee moved faster.2


  1. First brewed millennia ago.
  2. Reached Europe in the 1600s.

Note that [^1] renders as 2 here: its marker comes second, so it gets the second number.

Longer footnotes

A definition can hold more than one paragraph. Leave a blank line, then indent the continuation by four spaces to keep it inside the note; an unindented line ends the note and returns to body text.

You type
Every claim needs a source.[^detail]

[^detail]: The note starts here.

    A follow-up paragraph, indented four spaces,
    stays inside the same footnote.

For a single line break inside a note, the usual rule applies: end the line with two spaces. See line breaks.

Where footnotes work

Footnotes are an extension, not part of core markdown, so support varies.

RendererFootnotes
GitHubYes, since 2021 (not in wikis)
GitLabYes
ObsidianYes, plus inline notes
Pandoc / MultiMarkdownYes (Pandoc also has inline notes)
Core CommonMarkNo, extension only
Original markdownNo

Pandoc and Obsidian also accept inline notes written right in the text: some claim^[with the note inline], no separate definition needed. GitHub does not render this form. In Pandoc, inline notes cannot contain multiple paragraphs.

Common questions

Why do mine show as literal brackets?

The renderer does not support the extension. Discord, for example, shows the raw [^1] markers, and so does any strict CommonMark renderer. There is no fallback syntax; either switch renderers or write the note as a parenthetical.

What can go in a label?

Letters and numbers are safe everywhere. Spaces are not allowed (Pandoc also forbids ^, [ and ]), and some renderers choke on other characters, so keep labels short and plain.

Related syntax

· All markdown guides

Less syntax. More writing.

Download maxdown

Free · no account · macOS, Windows & Linux