Skip to main content

Markdown Footnotes

How to write footnotes in Markdown: reference syntax, numbering, multi-paragraph notes, inline notes, code in footnotes, and what works on GitHub, Obsidian, Pandoc, and beyond.

Footnotes are an extension, not part of CommonMark or the GFM spec. GitHub, GitLab, Obsidian, and Pandoc support them; Reddit, Discord, Slack, and Notion do not.

Short answer

Put [^1] where the marker should go, then define the note on its own line anywhere in the document: [^1]: Your note. The marker becomes a superscript number and the notes are listed at the bottom, numbered in the order the references appear, whatever labels you used. It works on GitHub, GitLab, Obsidian, and Pandoc, but not in plain CommonMark, Reddit, Discord, Slack, or Notion.

Reference Syntax

The standard footnote has two parts: a marker like [^1] placed where you want the superscript, and a definition like [^1]: on its own line. The definition can go anywhere in the document; the renderer collects every note and lists them at the bottom.

Two footnote references with separate definitions
Markdown is easy to learn.[^1] It was created in 2004.[^origin]

[^1]: Most people pick up the basics in 10 minutes.
[^origin]: John Gruber and Aaron Swartz created Markdown together.
Rendered preview

Markdown is easy to learn.[1] It was created in 2004.[2]


  1. 1.Most people pick up the basics in 10 minutes.
  2. 2.John Gruber and Aaron Swartz created Markdown together.
Auto-numbering: footnotes are numbered in the order their references first appear in the text, not by label and not by where the definitions sit. Write [^99] first and [^7] second and they render as 1 and 2. Reuse a label and both markers share one number.

Multi-paragraph Footnotes

Footnotes can hold multiple paragraphs, lists, and code blocks. Indent every paragraph after the first with 4 spaces (or one tab) and separate paragraphs with a blank line. For a plain line break inside a note, end the line with two spaces instead.

Multi-paragraph footnote with indented continuation
Here's a complex footnote.[^longnote]

[^longnote]: First paragraph of the footnote.

    Second paragraph — indent with 4 spaces to keep it inside the footnote.

    Inline `code` and **bold** work too.
Rendered preview

Here's a complex footnote.[1]


  1. 1.First paragraph of the footnote.Second paragraph — indent with 4 spaces to keep it inside the footnote.Inline code and bold work too.

Inline Footnotes (Pandoc and Obsidian)

Pandoc and Obsidian support a shorter inline syntax: ^[note text] placed exactly where the footnote should appear, with no label and no separate definition. The caret goes outside the brackets. Obsidian only renders inline footnotes in Reading view, not in Live Preview, and GitHub does not support them at all.

Inline footnote — single linePandoc, Obsidian
This is the main text.^[Inline footnotes are written right where they appear.]

Pandoc and Obsidian support this. GitHub does not.
How Pandoc renders it

This is the main text.[1] Pandoc and Obsidian support this. GitHub does not.


  1. 1.Inline footnotes are written right where they appear.
Heads up: on GitHub the inline syntax ^[note] renders literally as the characters ^[note]. Use the reference style on GitHub.

Code Blocks Inside Footnotes

Fenced and indented code blocks both work inside footnote definitions. Indent every line that belongs to the footnote by 4 spaces, including the fence lines, and leave a blank line before the block.

Footnote with a fenced JS code block
The function returns a Promise.[^api]

[^api]: See the `fetch()` API:

    ```js
    const data = await fetch(url)
    ```
Rendered preview

The function returns a Promise.[1]


  1. 1.See the fetch() API:
    const data = await fetch(url)

Word Labels Instead of Numbers

Labels can be words, numbers, or a mix, as long as they contain no spaces. GitHub matches them case-insensitively. Pandoc also rules out tabs and the characters ^, [, and ]. The output is still numbered 1, 2, 3: word labels only make your source easier to read.

Word labels ([^bold], [^italic])
Bold uses two asterisks.[^bold] Italic uses one.[^italic]

[^bold]: Two asterisks: **like this**.
[^italic]: One asterisk: *like this*.
Rendered preview

Bold uses two asterisks.[1] Italic uses one.[2]


  1. 1.Two asterisks: like this.
  2. 2.One asterisk: like this.

Common Mistakes

If a footnote renders as raw text or in the wrong place, one of these is almost always the cause.

Missing the colon

The definition needs a colon directly after the closing bracket: [^1]: text, not [^1] text. Without it both lines stay as literal text.

Spaces in the label

[^my note] is not a footnote on GitHub. Use a hyphen or underscore instead: [^my-note].

Second paragraph indented 2 spaces

A continuation paragraph needs 4 spaces of indentation. With only 2, GitHub renders it as an ordinary paragraph in the body text, and the footnote keeps just its first line.

Reference and definition don't match

A marker with no matching definition stays as literal [^1] text, and a definition that nothing references is silently dropped. Check the labels for typos.

Using inline syntax on GitHub

^[inline note] works in Pandoc and in Obsidian's Reading view. GitHub renders it as literal text, so use the reference style there.

Expecting the label to set the number

[^3] does not render as 3. Footnotes are numbered 1, 2, 3 in the order their references appear, whatever the labels say.

Platform Support

Footnotes are an extension to Markdown, not part of CommonMark. Support varies — here is what works where.

PlatformSupported?Notes
GitHub (READMEs, issues, PRs, discussions)YesSince September 2021. Notes render at the bottom with back-links. End a line with two spaces for a line break inside a note.
GitHub WikisNoGitHub's docs state that footnotes are not supported in wikis.
GitLabYesReference footnotes in GitLab Flavored Markdown. The rich text editor cannot insert new ones.
PandocYesReference footnotes and inline ^[...] notes, including multi-paragraph notes.
ObsidianYesReference footnotes in Reading view and Live Preview. Inline ^[...] footnotes render only in Reading view.
VS Code previewNoThe built-in preview has no footnote support. Install a footnotes extension, or preview with Pandoc.
NotionNoNo footnote syntax. [^1] stays as plain text.
RedditNoFootnote syntax is rendered as plain text. Emulate with superscript and a list.
DiscordNoNo footnote syntax. Emulate with subtext (-# ) for the note.
SlackNoNo footnote syntax in Slack messages or canvases.
CommonMark / GFM specNoFootnotes are in neither spec. GitHub supports them through an extra extension in its parser.

Frequently Asked Questions

How do I write a footnote in Markdown?

Put [^1] where you want the marker, then define the note on its own line anywhere in the document: [^1]: Your footnote text. The renderer turns the marker into a superscript number and lists the notes at the bottom. The label is only an identifier: it does not have to be a number or sequential.

Does GitHub support Markdown footnotes?

Yes. GitHub added footnote support on 30 September 2021. Footnotes work in READMEs and other Markdown files, issues, pull requests, discussions, and comments. GitHub's docs say they are not supported in wikis, and GitHub does not support the inline ^[...] style.

How are Markdown footnotes numbered?

In the order their references first appear in the text, not by label and not by where the definitions sit. If you write [^99] first and [^7] second, they render as 1 and 2. Using the same label twice gives both markers the same number, and the note gets a back-link to each.

Where should I put footnote definitions?

Anywhere, on a line of its own. The position of the definition does not change where the note renders: GitHub, GitLab, Obsidian, and Pandoc all collect the notes at the end of the document. Putting each definition right after the paragraph that cites it keeps them easy to maintain.

What's the difference between reference and inline footnotes?

Reference footnotes have two parts: a marker like [^1] in the text and a definition like [^1]: text on its own line. Inline footnotes put the note right in the sentence as ^[note text], with no label and no separate definition. Pandoc and Obsidian (Reading view only) support inline footnotes. GitHub does not.

Can footnote labels be words instead of numbers?

Yes. [^bignote] or [^source-2024] work as long as the label has no spaces. GitHub matches labels case-insensitively, so [^Note] finds [^note]. Pandoc also rules out tabs, newlines, and the characters ^, [ and ]. The output is still numbered 1, 2, 3; the label only links the marker to its definition.

How do I add multiple paragraphs to a footnote?

Leave a blank line after the first paragraph of the definition, then indent each following paragraph with 4 spaces (or one tab). Lists and code blocks inside the note need the same 4-space indent. For a line break without a new paragraph, end the line with two spaces, which is the method GitHub's docs show.

Why is my footnote rendering as plain text?

Either the platform does not support footnotes (CommonMark, Reddit, Discord, Slack, Notion, VS Code's built-in preview), or the syntax is off: the definition is missing its colon ([^1]: text), the label contains a space, or the marker and definition labels do not match. An unmatched [^1] marker stays as literal text.

Why aren't my footnotes working in Obsidian Live Preview?

Reference footnotes ([^1] plus a definition) work in Live Preview. Inline footnotes (^[note]) only render in Reading view, which Obsidian's own docs state. Switch to Reading view to see them, or rewrite them as reference footnotes.

Can I put a footnote inside a table or blockquote?

The marker, yes: on GitHub [^1] works inside a table cell, a list item, or a blockquote. Put the definition on its own line at the top level of the document. A table cell cannot hold one at all, because a cell is a single line.

How do I write citations in Markdown?

Plain Markdown has no citation syntax, so footnotes are the usual way to cite a source: [^1]: Author, Title, Year, URL. Pandoc goes further with real citations: write [@smith2020] in the text, pass a bibliography file and --citeproc, and Pandoc formats the citations and the reference list for you.

How do you write footnotes on Reddit, Discord, or Notion?

None of them support footnote syntax, so fake it. On Reddit, use superscript for the marker (word^1) and a numbered list at the bottom of the post. On Discord, put the note on its own line as subtext (-# [1] Note text). On Notion, add the notes at the bottom of the page and link to them, or use a callout block.