Markdown
By John Gruber and Aaron Swartz
Markdown is a lightweight plain-text markup language that lets writers format documents using simple, readable symbols like asterisks and pound signs, which are then converted to HTML or other output formats. It was designed so that a…
Definition
Markdown is a lightweight plain-text markup language that lets writers format documents using simple, readable symbols like asterisks and pound signs, which are then converted to HTML or other output formats. It was designed so that a Markdown file is legible on its own, without rendering, while still carrying enough structure for headings, lists, links, emphasis, and code blocks to be produced automatically by a converter.
Overview
Markdown emerged from a simple observation: writing raw HTML by hand is tedious and clutters plain text with tags that obscure the content underneath. Its creators set out to define a syntax that mirrors the informal conventions people already used in plain-text email, such as surrounding a word with asterisks to indicate emphasis or prefixing a line with a dash to make a list item, and then to write a tool that converts that syntax into valid HTML. Mechanically, a Markdown processor reads a text file line by line and pattern-matches against a small set of rules: lines starting with `#` become headings whose level matches the number of hash characters, lines starting with `-` or a number become list items, text wrapped in backticks becomes inline code, and blank lines separate paragraphs. The original Perl implementation and its many successors parse these patterns into an intermediate structure, often an abstract syntax tree, before emitting HTML, so the same source can in principle target multiple output formats. Markdown sits between raw HTML and full word-processor formats like DOCX. Compared to HTML, it trades expressive power for readability and speed of authoring; compared to a word processor, it trades WYSIWYG editing for portability, version-control friendliness, and a syntax that is trivial to diff. Extended dialects such as CommonMark, GitHub Flavored Markdown, and MultiMarkdown add tables, footnotes, and strikethrough on top of the original minimal set, at the cost of some fragmentation in what "Markdown" precisely means across tools. In practice, Markdown is the default authoring format for README files, technical documentation sites, static site generators, developer forums, chat platforms, and note-taking applications. Developers write commit messages, GitHub issues, and pull request descriptions in it because it renders acceptably even when left unprocessed, and because most code hosting and collaboration tools parse it natively without any special editor. Its main limitation is the lack of a single, universally enforced specification for years, which led different renderers to disagree on edge cases like nested lists or mixed emphasis markers; CommonMark was created specifically to close that gap. Markdown is also a poor fit for documents requiring precise layout control, complex tables, or citations, where LaTeX, DOCX, or a dedicated documentation format is a better choice. For quick, structured, portable prose, it remains hard to beat, and static site generators such as Jekyll and Hugo build entire publishing workflows around treating Markdown files as the primary source of truth for page content.
Key Features
- Plain-text syntax that remains readable even before conversion to HTML
- Simple heading, list, link, and emphasis markers using common punctuation
- Converts cleanly to HTML, and via extensions to PDF or DOCX
- Widely supported across code hosting platforms, wikis, and editors
- Extensible through dialects like GitHub Flavored Markdown and CommonMark
- Diff-friendly format that works naturally with version control systems
- Low barrier to entry compared with HTML or word-processor markup
- Supports embedded code blocks with syntax highlighting in most renderers
Use Cases
Alternatives
Frequently Asked Questions
From the Blog
Build a Markdown Editor: A Beginner Project
Build a Markdown editor by pairing a textarea with a live preview that converts Markdown to HTML on every keystroke. Learn parsing, sanitization, and localStorage persistence.
Read More Projects & Case StudiesBuild a Blog With Next.js: Step-by-Step Project
Build a fast, SEO-friendly blog with Next.js using the App Router, Markdown content, and static generation. A practical step-by-step project for beginners.
Read More