Markdown Footnotes: How to Add Footnotes in Markdown
Learn how to add footnotes in Markdown with examples. Works in GitHub, Obsidian, Jekyll, and most Markdown processors.
Footnotes let you add references, citations, or extra information without cluttering your main text. Here's how to use them in Markdown.
Basic Footnote Syntax
Here is a sentence with a footnote.[^1]
[^1]: This is the footnote content.
Result: Here is a sentence with a footnote.
The footnote appears at the bottom of the document.
Step-by-Step Guide
1. Add the Reference in Your Text
Use [^identifier] where you want the footnote number to appear:
The research shows significant results.[^study1]
2. Define the Footnote Content
Anywhere in your document (usually at the bottom), add:
[^study1]: Smith et al., 2024. Journal of Examples.
3. The Result
Markdown processors automatically:
- Number footnotes sequentially
- Link the reference to the footnote
- Place footnotes at the document end
Footnote Examples
Simple Footnote
Markdown was created by John Gruber.[^1]
[^1]: In collaboration with Aaron Swartz in 2004.
Named Footnotes
Use descriptive names for easier management:
The study found positive outcomes.[^smith2024]
[^smith2024]: Smith, J. (2024). Research findings. Science Journal.
Multiple Footnotes
First point[^1] and second point[^2] are both important.
[^1]: Explanation of the first point.
[^2]: Explanation of the second point.
Multi-line Footnotes
Indent continuation lines with spaces or tabs:
Complex topic here.[^detailed]
[^detailed]: This is a longer footnote that spans
multiple lines. Just indent the continuation
with spaces or a tab.
You can even include multiple paragraphs.
Footnotes with Links
See the documentation.[^docs]
[^docs]: Official docs at [example.com](https://example.com)
Footnotes with Code
Use the function carefully.[^code]
[^code]: Example: `console.log("hello")`
Footnotes Across Markdown Flavors
Not all Markdown processors handle footnotes the same way. Here is a comparison of how footnotes work across the most common flavors:
| Feature | GitHub (GFM) | CommonMark | Pandoc | Obsidian | Jekyll (kramdown) | Hugo (Goldmark) |
|---|---|---|---|---|---|---|
Basic footnotes [^1] | Yes | No (extension needed) | Yes | Yes | Yes | Yes |
Named footnotes [^name] | Yes | No | Yes | Yes | Yes | Yes |
Inline footnotes ^[text] | No | No | Yes | No | No | No |
| Multi-line footnotes | Yes | No | Yes | Yes | Yes | Yes |
| Footnotes with lists | Partial | No | Yes | Yes | Yes | Yes |
| Auto-numbering | Yes | N/A | Yes | Yes | Yes | Yes |
| Back-references (return link) | Yes | N/A | Yes | Yes | Yes | Yes |
| Nested footnotes | No | No | Yes | No | No | No |
| Footnotes in tables | No | No | Yes | Partial | No | No |
Key takeaways:
- Pandoc has the broadest footnote support, including inline syntax and nested footnotes
- GitHub supports the standard syntax well, but not inline footnotes
- CommonMark does not include footnotes in its specification; you need extensions
- If you need maximum portability, use the basic
[^identifier]syntax, which works almost everywhere
You can preview how your footnotes render by pasting the HTML output into the HTML Viewer.
Platform Support
| Platform | Footnotes Supported |
|---|---|
| GitHub | Yes |
| GitLab | Yes |
| Obsidian | Yes |
| Notion | No (use toggle blocks) |
| Jekyll | Yes (with kramdown) |
| Hugo | Yes |
| Gatsby | Yes (with plugin) |
| VS Code Preview | Yes (with extension) |
| Typora | Yes |
Inline Footnotes
Some processors support inline footnotes (shorter syntax):
Here is an inline footnote.^[This is the footnote content.]
Note: Inline footnotes have less universal support than the standard
[^ref] syntax.
Advanced Footnote Techniques
Multi-Paragraph Footnotes
When a footnote needs to contain multiple paragraphs, indent each continuation paragraph with four spaces or a tab:
This claim needs detailed support.[^longnote]
[^longnote]: First paragraph of the footnote provides
the initial explanation.
Second paragraph goes deeper into the topic.
It can also span multiple lines as long as
indentation is consistent.
Third paragraph wraps up the supporting detail.
This works in Pandoc, GitHub, Obsidian, and Jekyll. Each indented paragraph is treated as part of the same footnote.
Footnotes Containing Lists
You can embed lists inside footnotes by indenting the list items:
Several factors contributed to the result.[^factors]
[^factors]: The main factors were:
- Temperature control
- Sample size
- Duration of the experiment
All three were significant.
Footnotes Containing Code Blocks
For technical documentation, you may need code inside a footnote:
The function has a known limitation.[^workaround]
[^workaround]: Use this workaround:
```python
result = fallback_method(data)
```
This bypasses the limitation in most cases.
Support for code blocks inside footnotes varies. Pandoc handles this well, but GitHub may not render it correctly. Test on your target platform.
Reusing Footnote References
If you want to reference the same footnote from multiple places in your text, the syntax depends on the processor. In standard Markdown, each [^id] reference creates a new superscript number pointing to the same footnote definition. However, some processors may not handle duplicate references well. A safe alternative is to write "see note 1" in parentheses to guide the reader manually.
When to Use Footnotes vs Inline Links
Choosing between footnotes and inline links depends on your content and audience:
| Criteria | Footnotes | Inline Links |
|---|---|---|
| Reading flow | Minimal disruption; reader can skip | Visible in text; may distract |
| Citation style | Academic and formal | Casual and web-native |
| URL visibility | Hidden at bottom | Visible as clickable text |
| Multiple references | Clean when citing the same source often | Repetitive with the same URL |
| Accessibility | Requires navigation to bottom | Immediately actionable |
| Platform support | Not universal | Works everywhere |
Use footnotes when:
- You are writing academic or research-oriented content
- You need to cite sources without breaking the narrative
- Your document has many references that would clutter the text
- You want to add tangential but useful information
Use inline links when:
- The link is part of the main content and the reader should follow it
- You are writing for the web where clickable links are expected
- Your Markdown will be viewed on platforms that may not support footnotes
- The reference is essential, not supplementary
Academic Citation with Footnotes
Markdown footnotes are widely used for academic and research writing, particularly when combined with tools like Pandoc that can generate properly formatted citations.
Basic Academic Citation Pattern
The results confirmed the original hypothesis.[^chen2023]
Further analysis revealed additional patterns.[^lee2024]
[^chen2023]: Chen, W. (2023). Data patterns in climate models.
*Journal of Environmental Science*, 45(2), 112-128.
[^lee2024]: Lee, S. & Park, J. (2024). Replicating climate
data studies. *Nature Climate Change*, 14, 55-61.
Using Pandoc with BibTeX
For larger academic projects, Pandoc can automatically generate footnotes from a BibTeX bibliography file:
The findings were significant [@chen2023; @lee2024].
With a corresponding .bib file, Pandoc converts these citations into properly formatted footnotes or a bibliography section during export.
Citation Styles
Different academic fields use different styles. Footnotes are standard in:
- Chicago (Notes-Bibliography): Full citation in footnotes, bibliography at end
- Turabian: Similar to Chicago, common in humanities
- Legal writing (Bluebook): Extensive footnote use for case citations
For APA or MLA styles, parenthetical references are more appropriate than footnotes. Consider whether your target audience expects footnotes or in-text citations.
Managing Large Numbers of Citations
For documents with dozens of references:
- Use descriptive identifiers (
[^chen2023]) instead of numbers ([^1]) - Group all footnote definitions in a "References" section at the bottom
- Consider using Pandoc with a citation manager for automatic formatting
- Export to HTML and check the rendered result in the HTML Viewer
Best Practices
1. Use Descriptive Identifiers
Instead of numbers, use meaningful names:
Avoid: [^1], [^2], [^3]
Better: [^citation1], [^definition], [^source]
2. Group Footnotes at the End
Keep your document organized:
# My Document
Content with references.[^ref1] More content.[^ref2]
---
## References
[^ref1]: First reference details.
[^ref2]: Second reference details.
3. Keep Footnotes Concise
Long explanations are better as regular paragraphs or separate sections.
4. Don't Over-Use Footnotes
Too many footnotes interrupt reading flow. Consider:
- Parenthetical notes for brief additions
- A references section for citations
- Inline links for sources
Common Issues
Footnotes Not Rendering
Cause: Your Markdown processor doesn't support footnotes.
Solutions:
- Check processor documentation
- Use a plugin or extension
- Switch to a processor with native support
Footnote Numbers Out of Order
Cause: Markdown numbers footnotes by order of appearance, not definition order.
Solution: Rearrange your [^ref] references in the text.
Duplicate Footnote IDs
Cause: Using the same identifier twice.
Wrong:
Text[^1] and more text[^1] <!-- Same ID used twice -->
Correct:
Text[^1] and more text[^2] <!-- Unique IDs -->
Styling Footnotes
CSS for Web
/* Footnote reference in text */
.footnote-ref {
font-size: 0.75em;
vertical-align: super;
}
/* Footnote section */
.footnotes {
font-size: 0.9em;
border-top: 1px solid #ccc;
margin-top: 2em;
padding-top: 1em;
}
Return Links
Most processors add a return link to go back from the footnote to the text. This is automatic in GitHub-flavored Markdown.
Alternatives to Footnotes
Inline Parentheses
For brief notes:
The results were significant (p < 0.05).
Reference Links
For citations:
According to [Smith, 2024][1], the findings show...
[1]: https://example.com/study
Endnotes Section
Manual references section:
## Notes
1. First note content
2. Second note content
Converting Documents with Footnotes
When you convert Markdown to other formats:
To PDF
Most converters (Pandoc, etc.) preserve footnotes properly.
To HTML
Footnotes become anchor links with automatic navigation. You can inspect the rendered HTML using the HTML Viewer to confirm footnotes are linking correctly.
To DOCX
Pandoc converts Markdown footnotes to Word footnotes.
Tools for Footnotes
Editors with good footnote support:
- Obsidian
- Typora
- VS Code with Markdown Preview Enhanced
- iA Writer
Converters:
- Pandoc (universal document converter)
- Marked 2 (Mac)
Frequently Asked Questions
Do footnotes work on GitHub?
Yes, GitHub-flavored Markdown supports footnotes natively. Both basic [^1] and named [^name] syntax work in README files, issues, pull requests, and wiki pages.
Can I use footnotes in README files?
Yes, GitHub renders footnotes in README.md files. The footnotes appear at the bottom of the rendered page with automatic back-reference links.
How do I number footnotes manually?
You cannot force specific numbers. Markdown auto-numbers based on the order the references appear in the text, not the order of the definitions. Use descriptive identifiers instead of numbers to avoid confusion when reordering content.
Can footnotes contain images?
Technically yes, but it is not recommended. Images make footnotes too heavy and disrupt the reading experience. Use regular paragraphs for content that includes images instead.
What happens to footnotes when I convert Markdown to PDF?
Most conversion tools like Pandoc preserve footnotes correctly during PDF export. The footnotes appear at the bottom of each page (true footnotes) rather than at the end of the document (endnotes). You can control this behavior with Pandoc flags. For HTML output, footnotes become clickable anchor links that you can verify in the HTML Viewer.
Quick Reference
Simple footnote:
Text with note.[^1]
[^1]: Note content.
Named footnote:
Text with note.[^myref]
[^myref]: Note content.
Inline footnote (limited support):
Text with note.^[Inline note content.]
Multi-line footnote:
[^multiline]: First line
Indented continuation
More content
Summary
Basic syntax:
- Reference:
[^identifier] - Definition:
[^identifier]: Content
Best practices:
- Use descriptive identifiers
- Keep footnotes concise
- Group definitions at document end
Supported on:
- GitHub, GitLab, Obsidian, Jekyll, Hugo, and most modern Markdown processors