Skip to content
GitHub Flavoured Markdown

GitHub Flavoured Markdown (GFM) extends CommonMark with a small, well-chosen set of features designed for collaborative writing and project documentation. It adds tables, task lists, strikethrough text, and extended autolinks — and it restricts certain raw HTML elements. GFM was formally specified by GitHub in 2017.

If you write Markdown on GitHub, GitLab, VS Code, or Discord, you are most likely writing GFM or a closely compatible dialect. It is the single most widely encountered Markdown flavour in everyday use.

Best Practice
  • Use GFM when your content lives on GitHub, GitLab, or another platform that renders it natively — its extensions are well supported and the output is predictable.
  • Prefer [x] (lowercase) in task lists — some renderers do not recognise [X].
  • Be aware that GFM tables require a header row; you cannot create a table without one.
  • Do not rely on GFM extensions (tables, task lists, strikethrough) if you need the file to display correctly on platforms that only support plain CommonMark.
Notes

Origin

GitHub developed its own Markdown extensions long before they were formally specified. Tables appeared on GitHub as early as 2009; task lists and strikethrough followed over the next few years. For years, the behaviour was documented only informally in GitHub's help pages.

In August 2017, GitHub published the GitHub Flavoured Markdown Specification, a precise document modelled on the CommonMark spec. GFM is officially a strict superset of CommonMark — anything valid in CommonMark is valid in GFM.


What GFM Adds to CommonMark

Tables

GFM defines a pipe-separated table syntax with a mandatory header row and a separator row of hyphens. Column alignment is controlled by colons in the separator row.

MARKDOWN
| Destination | Best season | Journey time |
| --- | --- | --- |
| Lisbon | Spring or autumn | 2.5 hours by air |
| Edinburgh | Summer | 1.5 hours by air |
| Bruges | Year-round | 2 hours by Eurostar |

Task lists

Task list items use [ ] for an open checkbox and [x] for a ticked one. On GitHub, ticking a checkbox edits the underlying Markdown source directly.

MARKDOWN
- [x] Pack walking boots
- [x] Book the ferry
- [ ] Arrange cat sitting
- [ ] Print boarding passes

Strikethrough

Text wrapped in double tildes is rendered with a line through it.

MARKDOWN
~~First draft title~~ A Better Title

Extended autolinks

GFM automatically converts bare URLs such as https://example.com into clickable links, without needing angle brackets or inline link syntax.

Disallowed raw HTML

GFM strips certain HTML elements for security reasons, including <script>, <style>, <iframe>, and a small number of others. These are filtered out and rendered as plain text rather than executed.


The Spec vs. GitHub's Live Rendering

The GFM specification defines exactly the extensions listed above. In practice, GitHub's rendering engine goes further with features that are part of the product but not the spec:

  • Syntax highlighting — fenced code blocks with a language tag are syntax-coloured
  • Mermaid diagrams — fenced blocks tagged mermaid are rendered as diagrams
  • Blockquote alerts> [!NOTE], > [!TIP], > [!WARNING], > [!CAUTION], and > [!IMPORTANT] produce styled callout boxes
  • Emoji shortcodes:tada: is rendered as 🎉

These extras are part of GitHub's platform, not the GFM spec. Other GFM-compatible renderers may not support them.


Compatibility

Tools that use GFM or a closely compatible dialect:

  • GitHub — the reference implementation
  • GitLab — GFM-compatible with some additions
  • VS Code — the built-in Markdown preview renders GFM
  • Discord — a GFM subset
  • Obsidian — GFM-compatible core with its own extensions on top

Practical Examples

  • A packing list for a trip: A task list tracks what you have sorted and what still needs doing — and on GitHub you can tick items off directly in the rendered view.
Syntax
MARKDOWN
## Weekend Bag — Lake District

- [x] Walking boots
- [x] Waterproof jacket
- [ ] OS map (Cumbria)
- [ ] Packed lunch supplies
- [ ] First aid kit
Output

Weekend Bag — Lake District

  • [x] Walking boots
  • [x] Waterproof jacket
  • [ ] OS map (Cumbria)
  • [ ] Packed lunch supplies
  • [ ] First aid kit
  • Comparing options in a blog post: A GFM table puts side-by-side information in front of readers cleanly, without any HTML.
Syntax
MARKDOWN
| Variety | Flavour | Best use |
| --- | --- | --- |
| Bramley | Sharp and tart | Cooking, crumbles, pies |
| Cox | Sweet-sharp balance | Eating fresh |
| Braeburn | Sweet with a hint of spice | Eating fresh, salads |
| Granny Smith | Very tart | Baking, cheese boards |
Output
Variety Flavour Best use
Bramley Sharp and tart Cooking, crumbles, pies
Cox Sweet-sharp balance Eating fresh
Braeburn Sweet with a hint of spice Eating fresh, salads
Granny Smith Very tart Baking, cheese boards
  • Noting a title change on a writing blog: Strikethrough shows the rejected version alongside the replacement, making the revision visible rather than silent.
Syntax
MARKDOWN
The working title — ~~A Walk Through the Seasons~~ — has been dropped in favour of something
that better fits the tone: *Mud, Mist, and Bluebells*.
Output

The working title — A Walk Through the Seasons — has been dropped in favour of something that better fits the tone: Mud, Mist, and Bluebells.

© 2026 Docizr. All rights reserved.