If you’ve written a README on GitHub, you’ve used GitHub Flavored Markdown (GFM). It’s GitHub’s extended version of standard Markdown (CommonMark) with extra features that developers love — task lists, tables, autolinks, and more.
But what exactly does GFM add? And how does it differ from plain Markdown? This guide explains every GFM extension with clear examples.
What is GFM?
GitHub Flavored Markdown is a superset of CommonMark (the standard Markdown specification). It adds features that are especially useful for software development workflows. GFM was formalized in the GFM spec and is used across:
- GitHub README files
- Issues and Pull Requests
- Comments and discussions
- Wiki pages
- Gists
GFM Extensions Over Standard Markdown
1. Tables
Standard CommonMark has no table support. GFM adds full table syntax:
| Feature | CommonMark | GFM |
|:------------|:----------:|:---:|
| Headings | ✅ | ✅ |
| Bold/Italic | ✅ | ✅ |
| Tables | ❌ | ✅ |
| Task Lists | ❌ | ✅ |
See our Markdown Tables Guide for complete table documentation.
2. Task Lists (Checkboxes)
One of GFM’s most popular features — interactive checklists:
- [x] Design the homepage
- [x] Set up CI/CD pipeline
- [ ] Write unit tests
- [ ] Deploy to production
Renders as:
- Design the homepage
- Set up CI/CD pipeline
- Write unit tests
- Deploy to production
On GitHub, these checkboxes are interactive — you can check/uncheck them directly in issues and PRs without editing the source.
3. Strikethrough
Standard Markdown has no strikethrough. GFM adds it with double tildes:
~~This text is deleted~~
The price is ~~$50~~ $30!
This text is deleted
4. Autolinks
GFM automatically converts URLs and email addresses into clickable links without requiring [text](url) syntax:
<!-- Standard Markdown requires -->
[https://github.com](https://github.com)
<!-- GFM does it automatically -->
https://github.com
support@example.com
5. Fenced Code Blocks with Syntax Highlighting
While fenced code blocks exist in CommonMark, GFM extends them with language-specific syntax highlighting:
```python
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
```
GitHub supports highlighting for hundreds of languages, including:
| Category | Languages |
|---|---|
| Web | JavaScript, TypeScript, HTML, CSS, React (JSX/TSX) |
| Backend | Python, Java, Go, Rust, C#, Ruby, PHP |
| Mobile | Kotlin, Swift, Dart, Objective-C |
| Data | SQL, R, Julia, MATLAB |
| Systems | C, C++, Rust, Assembly |
| DevOps | Bash, YAML, Dockerfile, HCL (Terraform) |
| Markup | Markdown, LaTeX, XML, JSON |
6. Disallowed Raw HTML
GFM filters certain HTML tags for security:
<!-- These are stripped on GitHub -->
<script>alert('XSS')</script>
<iframe src="..."></iframe>
<textarea>...</textarea>
<style>body{display:none}</style>
Allowed HTML includes: <details>, <summary>, <br>, <hr>, <img>, <table>, and most formatting tags.
GitHub-Specific Features (Beyond GFM Spec)
These features work on GitHub but aren’t part of the official GFM spec:
Alerts / Admonitions
> [!NOTE]
> This is helpful background information.
> [!TIP]
> A helpful tip for better results.
> [!IMPORTANT]
> Critical information the reader must know.
> [!WARNING]
> Something that could cause problems.
> [!CAUTION]
> Dangerous action that could cause data loss.
Issue and PR References
GitHub auto-links references to issues, PRs, and commits:
Fixes #42
Related to #100
See commit abc123f
@username mentioned this in PR #55
Emoji Shortcodes
:rocket: :bug: :tada: :white_check_mark: :x:
:star: :fire: :warning: :information_source:
🚀 🐛 🎉 ✅ ❌ ⭐ 🔥 ⚠️ ℹ️
Collapsible Sections
Using HTML <details> and <summary> tags:
<details>
<summary>Click to expand</summary>
This content is hidden by default.
- Item 1
- Item 2
- Item 3
</details>
Math Equations
GitHub now supports LaTeX-style math (powered by MathJax):
Inline: $E = mc^2$
Display:
$$\sum_{i=1}^{n} x_i = x_1 + x_2 + \cdots + x_n$$
Mermaid Diagrams
GitHub renders Mermaid diagrams natively:
```mermaid
graph LR
A[Code] --> B[PR]
B --> C{Review}
C -->|Approved| D[Merge]
C -->|Changes| A
```
Footnotes
This claim needs a source[^1].
[^1]: Source: Research paper, 2026.
GFM vs. CommonMark: Quick Comparison
| Feature | CommonMark | GFM | GitHub Render |
|---|---|---|---|
Headings (#) | ✅ | ✅ | ✅ |
| Bold / Italic | ✅ | ✅ | ✅ |
| Links | ✅ | ✅ | ✅ |
| Images | ✅ | ✅ | ✅ |
| Blockquotes | ✅ | ✅ | ✅ |
| Code blocks | ✅ | ✅ | ✅ |
| Ordered/Unordered lists | ✅ | ✅ | ✅ |
| Tables | ❌ | ✅ | ✅ |
| Task lists | ❌ | ✅ | ✅ (interactive) |
| Strikethrough | ❌ | ✅ | ✅ |
| Autolinks | ❌ | ✅ | ✅ |
| Syntax highlighting | ❌ | ✅ | ✅ |
| Alerts | ❌ | ❌ | ✅ |
| Emoji shortcodes | ❌ | ❌ | ✅ |
| Issue references | ❌ | ❌ | ✅ |
| Mermaid diagrams | ❌ | ❌ | ✅ |
| Math (KaTeX/MathJax) | ❌ | ❌ | ✅ |
| Footnotes | ❌ | ❌ | ✅ |
Writing Better GitHub READMEs
Essential README Structure
# Project Name
Brief description of what the project does.
## Features
- Feature 1
- Feature 2
## Installation
\`\`\`bash
npm install my-package
\`\`\`
## Usage
\`\`\`javascript
import { myFunction } from 'my-package';
myFunction();
\`\`\`
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
## License
MIT
README Best Practices
- Start with a clear project description — what does it do, who is it for?
- Add badges — build status, version, license
- Include installation instructions — copy-pasteable commands
- Show usage examples — real code, not abstract descriptions
- Add screenshots — for UI projects, show don’t tell
- Link to documentation — for complex projects
Reading GFM on Android
GitHub’s mobile web experience is functional but not optimized for reading long READMEs. MerMD provides a dedicated reading experience:
- ✅ Full GFM rendering — tables, task lists, strikethrough, autolinks
- ✅ Syntax highlighting for all major languages
- ✅ Mermaid diagrams rendered natively
- ✅ KaTeX math support
- ✅ GitHub integration — browse repos and open files directly
- ✅ Offline reading — cached files available without internet
- ✅ Customizable themes — dark, light, and reader-optimized
Frequently Asked Questions
Is GFM backwards compatible with CommonMark? Yes. All valid CommonMark is valid GFM. GFM only adds features — it doesn’t change how standard Markdown elements work.
Do other platforms support GFM? Many platforms support GFM extensions (especially tables, task lists, and strikethrough), including GitLab, Bitbucket, VS Code, Obsidian, and MerMD.
Can I use GFM outside of GitHub? Yes! GFM is a well-documented specification. Most modern Markdown parsers support GFM extensions. MerMD renders full GFM on Android.
What about GitLab Flavored Markdown?
GitLab has its own extensions (like [[_TOC_]] for table of contents), but it also supports most GFM features. MerMD supports GitLab integration too.
Read GitHub Markdown on Android
MerMD renders full GFM — task lists, tables, syntax highlighting, autolinks, and more. Browse GitHub repos on your phone. Free on Google Play.
Download MerMD