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
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.
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.
Tea is older.[^tea] Coffee moved faster.[^1] [^tea]: First brewed millennia ago. [^1]: 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.
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.
| Renderer | Footnotes |
|---|---|
| GitHub | Yes, since 2021 (not in wikis) |
| GitLab | Yes |
| Obsidian | Yes, plus inline notes |
| Pandoc / MultiMarkdown | Yes (Pandoc also has inline notes) |
| Core CommonMark | No, extension only |
| Original markdown | No |
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.