Markdown Flavors Compared: CommonMark, GFM, MDX
Pick the right Markdown flavor for documentation, blogs, or content management.
Markdown is not one language. It is a family. The original 2004 spec was vague enough that every parser invented its own dialect; CommonMark fixed that, then GFM and MDX extended it.
CommonMark
CommonMark is the de facto strict baseline. Every modern parser starts here.
Heading
bold italic code
[link](https://example.com)
- list item
> quote
If your content needs to portably render across many tools, target CommonMark.
GitHub Flavored Markdown (GFM)
GFM adds the features developers actually want:
- Tables
- Task lists
- [x] done - Strikethrough
~~text~~ - Autolinks for URLs
- Fenced code with language hints
- Footnotes
If you write for GitHub, GitLab, or any developer documentation site, GFM is the lingua franca.
MDX
MDX lets you embed JSX inside Markdown:
My Post
import Chart from './Chart';
Regular markdown continues here.
Used by Docusaurus, Next.js content, Astro. Powerful for interactive documentation; harder to author and review than plain Markdown.
Other Flavors
- Pandoc Markdown — academic features (citations, math)
- Asciidoctor — separate language often confused with Markdown
- DokuWiki, MediaWiki — wiki-specific syntaxes
Math Support
GFM does not support math. CommonMark does not support math. For LaTeX-style equations, use:
$$
E = mc^2
$$
via remark-math or KaTeX. Many platforms (GitHub, Notion) added this on top.
Picking a Flavor
- Public docs site → MDX or GFM
- README files → GFM
- Static blog → GFM is the safe default
- Research notes with math → Pandoc
Use the [Markdown Editor](https://sdk.is/markdown-editor) for live preview.