What Is GitHub-Flavored Markdown (GFM) and What Does It Add to Standard Markdown?
Updated
GFM (GitHub-Flavored Markdown) is a Markdown dialect that extends CommonMark with features GitHub needed for its own content: tables, task lists, strikethrough, autolinks, and fenced code blocks with syntax highlighting. If you write Markdown in an online editor that advertises GFM live preview, you can use those extensions and see them rendered as you type. The main condition to keep in mind: GFM is a superset of CommonMark, so plain Markdown still works, but some extensions (tables, task lists) will not render in tools that only support basic Markdown.
What GFM adds to standard Markdown
Standard Markdown (and its stricter specification, CommonMark) covers headings, emphasis, links, images, lists, blockquotes, and code. GFM keeps all of that and adds a defined set of extensions:
| Feature | Syntax example | What it renders as |
|---|---|---|
| Tables | | Name | Role | with a |---|---| separator row |
A formatted table with header and cells |
| Task lists | - [x] Done / - [ ] Todo |
Checkboxes, checked or unchecked |
| Strikethrough | ~~removed~~ |
Text with a line through it |
| Autolinks | Bare https://example.com |
A clickable link without angle brackets |
| Fenced code blocks | Triple backticks with a language tag | A code block, highlighted when the renderer supports it |
The fenced code block is the one people most often associate with GFM, because the language tag after the opening backticks is what enables syntax highlighting in a GFM-aware preview.
How GFM differs from standard Markdown in practice
The differences matter most when you move a document between tools:
- Tables and task lists are extensions, not core Markdown. A strict CommonMark renderer will show the pipe characters and bracket syntax as plain text instead of a table or checkbox.
- Autolinks are looser in GFM. A bare URL becomes a link; in strict CommonMark you generally need
<https://example.com>or[text](url). - Strikethrough is GFM-only.
~~text~~is not part of CommonMark, so it may appear literally elsewhere. - Underscores inside words. GFM follows CommonMark's rule that
snake_case_wordsare not turned into emphasis, which avoids a common formatting surprise.
A practical rule: if a document must render identically everywhere, stick to core Markdown for structure and treat tables, task lists, and strikethrough as enhancements for GFM-capable viewers.
Using GFM in an online editor with live preview
In a browser-based editor such as Markdown Viewer, the workflow is:
- Start a document. Create a new file, open a local
.mdor.markdownfile, paste text, or import from GitHub. - Switch to Split view. The editor and preview sit side by side, so formatting changes appear as you type. Edit and Preview modes are also available in the toolbar.
- Write GFM syntax. Add a table, a task list, or a fenced code block with a language tag.
- Check the preview. Confirm the table has aligned columns, the checkboxes render, and the code block is highlighted.
- Export when done. The result can be downloaded as Markdown, HTML, PDF, or PNG.
Two behaviors from the tool's own documentation are worth knowing before you rely on it:
- Ordinary editing and autosave stay on the device, but sharing, GitHub import, external images, and remote diagram rendering use network services.
- Clearing browser storage can remove locally saved documents, so keep a separate backup by downloading a Markdown copy.
Code blocks, math, and diagrams in GFM preview
GFM's fenced code blocks are the foundation for richer previews:
- Syntax-highlighted code: open with triple backticks, add a language identifier (for example
jsorpython), write the code, and close with triple backticks. The preview highlights it when the renderer supports the language. - LaTeX math: the editor's preview supports LaTeX math, so formulas render rather than showing raw notation.
- Mermaid diagrams: diagram blocks render as graphics in the preview. Because remote diagram rendering uses a network service, a diagram may not appear if that service is unavailable.
For a quick check, write one table, one task list, and one fenced code block in the same document. If all three render correctly in Split view, your GFM syntax and the preview are working together as expected.