Markdown basics

How to Add Footnotes in Markdown

A Markdown footnote has two halves. In the text you put a marker, [^1], right after the word it belongs to. Anywhere else in the file you write the note itself on its own line: [^1]: The note.. The marker turns into a small raised number that links down to the note, and every note is collected into a numbered list at the bottom of the page, wherever you wrote it in the file.

QuickMark on iPad in split view. Left: Markdown source with [^caffeine] and [^roast] markers, an inline ^[...] note and two footnote definitions. Right: the rendered page with raised [1], [2], [3] links and a numbered list of notes at the bottom
Two named footnotes and one inline footnote. Captured in QuickMark on an iPad (A16) simulator while writing this post.

Footnotes are not part of CommonMark, the core Markdown spec. They are an extension, and GitHub, Obsidian and QuickMark each describe theirs a little differently. So instead of repeating the usual example, I ran 31 footnote cases through QuickMark's own renderer and wrote down what came out. Everything below is that output, not a reading of a spec.

The basic footnote

You write
Arabica has less caffeine.[^1]

[^1]: Roughly 1.2% against 2.2%.
You get

Arabica has less caffeine.[1]


  1. Roughly 1.2% against 2.2%. ↩︎

Three details matter:

  • No space between the word and the marker is the usual style, but a space does no harm. caffeine [^1] still works.
  • The colon after the label is required in the definition. The space after the colon is not: [^1]:Note works too.
  • The definition can sit anywhere. Top of the file, under the paragraph, at the very end. The note always renders in the list at the bottom.

In QuickMark the raised number is a real link. Tap or click it and the page scrolls smoothly down to the note; the small ↩︎ arrow after the note scrolls you back to where you were reading. That works in the app on Mac, iPhone and iPad, and on pages you publish as a web link.

Name your footnotes, the numbers take care of themselves

The label inside [^…] does not have to be a number. It can be a word, and that is the better habit. [^source] tells you what the note is when you come back to the file in six months; [^7] tells you nothing.

Whatever you type, the reader sees numbers, and those numbers follow the order the markers appear in the text. Not the label, not the order of the definitions:

You writeThe reader sees
A[^source]A[1]
A[^10] B[^2]A[1] B[2]. The labels 10 and 2 are thrown away.
A[^b] B[^a], with [^a]: defined firstA[1] B[2]. Note 1 is the b note, because b was referenced first.
Câu[^ghi-chú]Câu[1]. Accented letters and hyphens in labels are fine.

This is what makes footnotes painless to edit. Insert a new note at the top of a long document and every number below it shifts on its own. You never renumber anything by hand.

Labels: what breaks them

Labels are stricter than they look. These are the cases that surprised me:

You writeWhat happens
A[^Note] with [^note]:No footnote. Labels are case-sensitive, so Note and note are two different labels. The marker shows up as the literal text [^Note].
A[^my note]No footnote. A label cannot contain a space. Use my-note or my_note.
A[^nope] with no definitionShown as plain text, A[^nope]. A marker without a note is easy to spot.
A definition nothing points toSilently dropped. It does not appear anywhere on the page, so an orphaned note is easy to miss.
The same label defined twiceOnly one note survives: in my test, the second definition won.
`a[^1]` inside backticksPlain code, not a footnote. Code spans are never parsed.

The case-sensitive rule is worth remembering, because ordinary reference links in Markdown are not case-sensitive. [Link][Docs] finds [docs]: … just fine. Footnote labels do not get that kindness.

Using one footnote twice

Point at the same note from two places and you get one note with two back-links:

You write
First claim.[^src] Second claim.[^src]

[^src]: Both come from the same report.
You get

First claim.[1] Second claim.[1:1]


  1. Both come from the same report. ↩︎ ↩︎

The second marker reads [1:1], meaning "note 1, second reference", so each of the two ↩︎ arrows can take you back to the right spot.

Inline footnotes: ^[like this]

For a quick aside you do not want to name, write the note right where it belongs, inside ^[ and ]:

You write
Brew at 92 to 96 °C.^[Boiling water scorches the grounds.]
You get

Brew at 92 to 96 °C.[1]


  1. Boiling water scorches the grounds. ↩︎

Inline notes get a number in the same sequence as the named ones, so you can mix both styles in one file, as the screenshot at the top does. Bold, links and even square brackets inside the note all survive.

Not every app reads this form. Obsidian documents it, with the caveat that it only renders in reading view. GitHub's footnote documentation does not list inline footnotes at all, so if a file is headed for a GitHub README, stick to [^label].

Longer notes: paragraphs, lists and code

A note can hold more than one line. How you continue it decides what you get:

ContinuationResult
Next line, no blank line in betweenSame paragraph. The line break disappears, like any Markdown paragraph.
Two spaces at the end of the first line, then the next lineSame paragraph with a real line break. This is GitHub's documented method.
Blank line, then 4 spaces (or a tab)A second paragraph inside the note. Lists and code blocks indented the same way also stay inside.
Blank line, then 2 or 3 spacesThe text escapes the note and becomes a normal paragraph in the body of the document.

That last row matters if you come from Obsidian. Its help page says to add 2 spaces at the start of each new line of a footnote. In QuickMark that works for lines that follow directly, but once there is a blank line between paragraphs you need 4 spaces. Four spaces work everywhere I tested, so that is the safe habit.

You write
[^roast]: A rule of thumb, not a law.

    Grind size matters just as much.
You get
  1. A rule of thumb, not a law.

    Grind size matters just as much. ↩︎
QuickMark preview on iPhone showing three paragraphs with raised blue [1], [2] and [3] links, and below them a numbered list of three notes in smaller grey text, the second note spanning two paragraphs
The same document on an iPhone 17 Pro simulator. Note 2 has two paragraphs because its second one is indented 4 spaces.

What else works inside footnotes

A note is ordinary Markdown, so formatting carries over. In my tests these all rendered correctly inside a note: bold, inline code, links (external ones open in a new tab, like everywhere else), and KaTeX math such as $x^2$. A footnote inside another footnote works too: it simply becomes the next number.

Markers also work in headings and inside table cells.

One thing that is not a footnote: x^2^. QuickMark reads a caret pair as superscript, so that renders as x². The [^ opening bracket is what makes a footnote.

Footnotes when you export

Footnotes travel differently depending on the format:

  • HTML and PDF keep the page as you see it in the preview: raised numbers in the text and the numbered note list at the end. See Markdown to HTML and Markdown to PDF.
  • Word (.docx) does not produce native Word footnotes. I exported a test file and unzipped it: the markers come out as small superscript text and the notes become plain paragraphs at the end of the document, so Word's own footnote tools will not see them. If real Word footnotes matter for a paper, plan to convert them in Word afterwards. More on what survives in Markdown to Word.

Quick reference

GoalWrite
Footnote markertext[^label]
Footnote definition[^label]: The note.
Inline footnotetext^[The note.]
Second paragraph in a noteBlank line, then indent 4 spaces
Line break in a noteTwo spaces at the end of the line
LabelsNo spaces, case-sensitive, words are fine

For the rest of the syntax on one page, see the Markdown cheat sheet.

QuickMark app icon

Get rendered Markdown previews everywhere

QuickMark is a free, native Markdown app for Mac, iPhone and iPad. Live preview, export and publish built in.