GitHub Flavored Markdown (GFM): The Complete Syntax Guide
GitHub Flavored Markdown (GFM) adds tables, task lists, strikethrough, autolinks, and more on top of plain Markdown. Learn every GFM feature with copy-paste examples.
GitHub Flavored Markdown — almost always abbreviated GFM — is the dialect of Markdown popularized by GitHub. It takes standard CommonMark Markdown and adds a handful of features that make everyday writing dramatically more useful: tables, task lists, strikethrough, autolinks, and a few parsing improvements. This guide covers every GFM feature with examples you can copy and paste.
GFM is a strict superset of CommonMark. Anything valid in plain Markdown is valid in GFM — GFM simply adds more.
What GFM adds to plain Markdown
| Feature | Plain Markdown | GitHub Flavored Markdown |
|---|---|---|
| Tables | ✗ | ✓ |
| Task lists (checkboxes) | ✗ | ✓ |
Strikethrough (~~text~~) | ✗ | ✓ |
| Autolinks (bare URLs) | limited | ✓ |
| Disallowed raw HTML | — | Certain tags filtered; sanitization is a separate step |
| Intra-word underscores | Supported by CommonMark | Supported |
The good news: if your tool supports GFM (the converter on this site does), you get all of the above for free.
Tables
Tables are the headline feature of GFM. You build them with pipes | and a separator row of dashes ---:
| Format | Extension | Best for |
| --- | --- | --- |
| Word | `.docx` | Business documents |
| PDF | `.pdf` | Print & archival |
| HTML | `.html` | Web pages |
You can control column alignment with colons in the separator row:
| Syntax | Alignment |
|---|---|
:--- | Left |
:---: | Center |
---: | Right |
A few rules to remember:
- Cells can contain inline formatting, links, and
inline code. - Cells cannot contain block-level elements like headings, blockquotes, or nested tables.
-
Merged cellsare not supported — there is nocolspan/rowspanin Markdown. - The leading and trailing pipes are optional, but including them keeps tables readable.
Wide tables overflow on small screens. If you export to PDF or Word, consider splitting very wide tables into two narrower ones.
Task lists
Task lists turn bullet lists into interactive checkboxes on GitHub, and they render as checkboxes (or clear list markers) in most GFM renderers:
- [x] Paste your Markdown
- [ ] Preview the formatting
- [ ] Export as .docx
Which renders as:
- Paste your Markdown
- Preview the formatting
- Export as .docx
Task lists work inside both bulleted (-) and ordered (1.) lists, and you can nest them.
Strikethrough
Wrap text in two tildes to strike it through:
This feature is ~~deprecated~~ legacy.
Renders as: This feature is deprecated legacy.
Autolinks and bare URLs
GFM turns bare URLs and email addresses into clickable links automatically:
Visit https://markdowntoword.org for a free converter.
For explicit, readable links, prefer the standard syntax:
[Markdown to Word](https://markdowntoword.org)
You can also wrap a URL in angle brackets to force a link even when GFM wouldn't autolink it: <https://example.com>.
Code blocks and syntax highlighting
Fenced blocks can include a language label after the opening fence. GitHub uses that label for syntax highlighting, but the label alone does not add colors in every GFM renderer. This site keeps monospaced code without syntax colors:
```js
function convert(md) {
return render(md);
}
```
Common language tags:
| Tag | Language |
|---|---|
md | Markdown |
js / ts | JavaScript / TypeScript |
py | Python |
bash / sh | Shell |
json | JSON |
html | HTML |
css | CSS |
When you need to show a fence inside a code block, use four backticks for the outer fence (as shown above) or use tilde fences (~~~).
Lists and line breaks
GFM clarifies a few behaviors that trip people up in plain Markdown:
- A blank line before a list improves readability. Some lists can interrupt a paragraph without one; an ordered list interrupting a paragraph must start at 1.
- A soft line break (single newline) inside a paragraph renders as a space in most contexts; use two trailing spaces or a backslash
\at the end of a line for a hard line break. - Ordered lists don't have to start at 1 in source, but GFM will renumber them sequentially when rendering.
Disallowed and raw HTML
The GFM specification filters certain raw HTML tags, but that is not a complete security sanitizer. GitHub applies additional processing. This site's renderer separately removes executable HTML, unsafe URL schemes, and arbitrary inline styles while allowing a limited set of structural tags such as <sub> and <sup>. Remote images can still make network requests. See the GFM specification.
Putting it together
Here is a small document that exercises several GFM features at once:
## Release notes v2.0
- [x] Add **table** export to Word
- [x] Support ~~strikethrough~~ rendering
- [ ] Autolink bare URLs in PDF
| Feature | Status |
| :--- | :---: |
| Tables | ✓ |
| Task lists | ✓ |
See the [changelog](https://example.com/changelog) for details.
Converting GFM to Word, PDF, and HTML
This site maps common GFM structures as follows:
- To Word — editable tables, list items with
[x]or[ ]text, and monospaced code. Column alignment may need adjustment in Word. - To PDF — image-based pages with the rendered headings, tables, and monospaced code. There is no searchable text layer or clickable-link layer.
- To HTML — structural HTML for a website or CMS. Syntax coloring requires a separate highlighter on the destination site.
Conclusion
GitHub Flavored Markdown gives you tables, task lists, strikethrough, autolinks, and safer HTML handling on top of plain Markdown — everything most writers actually need. Once you know these features, you can author richer documents without leaving your text editor. Ready to turn GFM into a polished document? try the Markdown to Word converter and export your next file to .docx, PDF, or HTML.