All formats

Markdown

Full nameMarkdown
Extensions.md, .markdown (also .mdown, .mkd, .mkdn)
MIME typetext/markdown (with charset and optional variant, e.g. text/markdown; charset=UTF-8; variant=GFM)
Typeplain text with lightweight markup, usually converted to HTML
Starts withnothing fixed (plain text); often # Title or YAML front matter ---
SpecificationCommonMark 0.31.2, GitHub Flavored Markdown
Also standardized asRFC 7763 (media type), RFC 7764 (variants)
Maintained byCommonMark project; GitHub (GFM)
Licenseopen

Markdown is plain text with a few punctuation conventions: # for headings, * or - for lists, **bold**, [links](https://example.com) and backtick code spans. The text stays readable as is, and tools convert it to HTML. It’s the standard format for README files, documentation, wikis, static site generators, chat messages, note-taking apps and LLM output.

There is no single Markdown. The original 2004 description was informal, so implementations disagreed on edge cases. CommonMark is the precise, tested specification that most modern parsers follow. GitHub Flavored Markdown (GFM) is CommonMark plus tables, task lists, strikethrough, autolinks and HTML filtering. Many tools add their own extensions: footnotes, front matter, math, definition lists, admonitions.

When to use Markdown#

Syntax#

The core CommonMark syntax:

# Heading 1
## Heading 2

Paragraphs are separated by blank lines. Lines next to each other
join into one paragraph.

*italic* or _italic_, **bold**, `inline code`, [link](https://example.com "title"),
![image alt text](picture.png), <https://autolink.example>

- bullet list
- second item
  1. nested numbered list
  2. second

> block quote

    indented code block (4 spaces)

```python
fenced code block with a language
```

---  (thematic break)

Line ends with a backslash\
for a hard line break. <span>Raw HTML</span> is allowed.

GFM adds:

| Column | Aligned right |
|--------|--------------:|
| cell   |            42 |

- [x] done task
- [ ] open task

~~strikethrough~~, www.example.com and https://example.com become links

Common extensions outside the specs: footnotes (text[^1] and [^1]: note, supported by GitHub), YAML front matter between --- lines at the top of the file, math ($x^2$, $$...$$), heading IDs (## Title {#id}), definition lists, and GitHub alerts (> [!NOTE]).

File structure#

A Markdown file is plain text, normally UTF-8. A CommonMark parser works in two phases:

  1. Block structure: the input is split into lines and grouped into blocks: paragraphs, headings (ATX # or setext underlines), block quotes, lists and list items, code blocks (indented or fenced), HTML blocks, thematic breaks, and link reference definitions ([id]: https://url "title"). Containers (quotes, list items) nest.
  2. Inlines: the text inside paragraphs and headings is parsed for emphasis, code spans, links, images, autolinks, raw HTML, entities, backslash escapes and line breaks.

The result is an abstract syntax tree (document, block and inline nodes) that renderers turn into HTML, or back into normalized Markdown. Raw HTML passes through unchanged, which is why renderers for untrusted input either escape it or sanitize the output.

Front matter#

Static site generators (Hugo, Jekyll, Astro, Docusaurus) put metadata at the top of the file. It’s not part of CommonMark; parsers need an extension to skip or read it:

---
title: Release notes
date: 2026-11-05
tags: [docs, release]
---

# Release notes

Variants#

Variant Where Adds to CommonMark
CommonMark reference spec (base)
GFM GitHub, GitLab, many tools tables, task lists, strikethrough, autolinks, disallowed raw HTML
Original Markdown.pl 2004 Perl script (older, ambiguous rules)
MultiMarkdown MultiMarkdown tools tables, footnotes, metadata, citations, math
PHP Markdown Extra PHP Markdown, many ports tables, footnotes, definition lists, abbreviations, attributes
Pandoc Markdown Pandoc almost everything: citations, math, grid tables, divs, attributes
MDX React documentation sites JSX components and imports
R Markdown, Quarto, MyST data science, Python docs executable code chunks, roles and directives

Converting Markdown#

Shell
# to HTML with the CommonMark reference implementation
cmark --to html README.md > README.html

# GFM with cmark-gfm
cmark-gfm -e table -e strikethrough -e autolink -e tasklist README.md > README.html

# to PDF, DOCX, EPUB and many more with Pandoc
pandoc README.md -o README.pdf
pandoc README.md -o README.docx
pandoc notes.docx -t gfm -o notes.md   # Word to Markdown

Specifications and documentation#

Software that opens Markdown files#

SoftwareWindowsmacOSLinuxWebCanNotes
SumatraPDF✓viewfree, open source; renders .md as GitHub Flavored Markdown
Visual Studio Code✓✓✓✓view, edit, createfree; built-in preview (Ctrl+Shift+V)
Obsidian✓✓✓view, edit, createfree for personal use; Markdown note vault. Also on Android and iOS
Typora✓✓✓view, edit, create, convertcommercial; WYSIWYG Markdown editor
Zettlr✓✓✓view, edit, create, convertfree, open source; academic writing, Pandoc export
Joplin✓✓✓view, edit, createfree, open source notes app. Also on Android and iOS
iA Writer✓✓view, edit, create, convertcommercial. Also on Android and iOS
MarkText✓✓✓view, edit, createfree, open source WYSIWYG editor
Notepad✓view, edit, createbuilt into Windows 11; formatting view for Markdown
GitHub✓view, editrenders .md files and READMEs in repositories
StackEdit✓view, edit, createfree, in the browser
Pandoc✓✓✓convertfree, open source; Markdown to and from HTML, DOCX, PDF, EPUB and more

Libraries#

Every language has CommonMark-compliant parsers. See all Markdown libraries for a comparison.

C/C++cmark, cmark-gfm, MD4C
C#Markdig
Javacommonmark-java, flexmark-java
Gogoldmark
Pythonmarkdown-it-py, mistune, Python-Markdown
Rubycommonmarker, kramdown, Redcarpet
Rustcomrak, pulldown-cmark
PHPleague/commonmark, Parsedown