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 | — | sanitized |
| Multiple underscores in words | broken | ✓ (no false italics) |
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
GFM keeps fenced code blocks from plain Markdown and adds language-based syntax highlighting when you name the language after the opening fence:
```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:
- Lists need a blank line before them to be recognized reliably.
- 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
For security, GFM sanitizes raw HTML — it strips <script>, <style>, and other potentially dangerous tags. This is why the converter on this site is safe to use with untrusted Markdown. Plain, harmless tags like <sub>, <sup>, <kbd>, and <details> generally pass through.
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
Because GFM is just Markdown with extra syntax, a good converter handles all of it directly:
- To Word — tables become Word tables, task lists become list items, code keeps monospace formatting.
- To PDF — clean page layout with headings, tables, and highlighted code.
- To HTML — semantic HTML you can paste into a CMS or publish on the web.
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.