What is Markdown? The .md file format explained
A .md file is a plain-text file written in Markdown. It opens in any text editor and renders as formatted text on GitHub, in editors and in viewers. Markdown itself is the syntax inside: asterisks for bold, # for headings, dashes for lists.
Updated
A .md file is a plain text file written in Markdown, and Markdown is a lightweight markup language created by John Gruber and Aaron Swartz in 2004. Instead of clicking formatting buttons, you type conventions straight into the text — **bold**, # heading, - list item — and any markdown-aware app turns them into formatted output. The design goal, in Gruber's words, was text that's publishable as-is: readable even when it never gets rendered.
You type
# Trip notes **Flight** lands at *14:30* — then: 1. Pick up the rental car 2. Check in before 18:00 > Confirmation code: `KX-42871`
Readers see
Trip notes
Flight lands at 14:30 — then:
- Pick up the rental car
- Check in before 18:00
Confirmation code:
KX-42871
What is a .md file?
A .md file is a plain text file written in Markdown syntax. It opens in any text editor and renders as formatted text on GitHub, in editors with preview, and in Markdown viewers. There's no special format to decode and no app that owns it. Every repository's README.md is one, and .md files diff cleanly in version control. A .md file from 2004 still opens today.
Is plain text valid Markdown?
Yes. A paragraph of ordinary text with no symbols in it is already valid Markdown. The CommonMark specification defines a paragraph as "a sequence of non-blank lines that cannot be interpreted as other kinds of blocks", so a plain sentence renders as a plain sentence. Markdown attaches meaning to only a handful of characters — #, *, -, >, backticks and brackets — and leaves everything else alone. That is why any .txt file can be renamed .md and nothing breaks, and why a Markdown file is readable in an editor with no preview at all. The one thing to know: a single line break inside a paragraph does not start a new line; leave a blank line between paragraphs (see the new line guide).
Markdown file extensions: .md, .markdown, .mdx
| Extension | What it is |
|---|---|
.md | The most common extension for Markdown files. |
.markdown | The same content with the long extension. Treated like .md by most tools. |
.mdx | Markdown that also allows JSX components. Needs a build step; plain viewers show it as text. |
How to open a .md file
To edit: Notepad on Windows, TextEdit on Mac (plain text mode), or any code editor. To view it rendered: VS Code's built-in preview (Cmd/Ctrl+Shift+V), GitHub, Obsidian, or the browser-based Markdown viewer on this site, with no install. An AI agent can publish it to Docs MD to give you a shareable link, and you can convert it to PDF or to HTML.
How do you create a Markdown file?
Open any text editor — Notepad, TextEdit in plain-text mode, VS Code, or the Markdown viewer on this site — type your text with Markdown symbols where you want formatting, and save the file with the .md extension, for example notes.md. There is nothing to install and no template to start from; the sample at the top of this page is a complete Markdown file. To check the result, open it in the Markdown viewer, and if a tool wants a different format, convert it to Word or PDF. Many apps also create the file for you: Google Docs (File → Download → Markdown), Notion and Apple Notes have an Export as Markdown option, and every Obsidian note is a .md file on disk.
Who created Markdown?
John Gruber, who announced it on his site Daring Fireball on 15 March 2004 in "Introducing Markdown": a plain-text formatting syntax plus a Perl script that converts it to HTML, inspired by the conventions of plain-text email. Aaron Swartz worked with him on the syntax — in his own words, the two "pored over the syntax details from top to bottom" — and wrote html2text, the converter that runs the other way. The Markdown project page still hosts the original syntax description and version 1.0.1 from 17 December 2004. Gruber never versioned the syntax further; the ambiguities were pinned down later by the CommonMark specification, and GitHub, Slack, Discord and others added their own flavors on top.
Why did developers and AI tools standardize on markdown?
Because plain text wins everywhere it matters: it works in git, survives every platform, and is trivial for programs to generate. That last property made markdown the native output format of AI assistants — ChatGPT, Claude, and coding agents all emit it, and AI IDEs read and write .md context files. Writing, docs sites, note apps (Obsidian, Notion), forums (Reddit, Discord in dialect form), and READMEs all converged on the same syntax — learn it once, use it everywhere.
Why do AI tools answer in Markdown?
Because it is plain text: a model can produce it one token at a time and the chat window can render headings, lists, bold text and code fences as they stream in, with only a few extra characters. The same text pastes cleanly into editors, issues and notes, and the models learned the syntax from the READMEs, forums and documentation in their training data, where it is the dominant lightweight format. If you want the answer without the symbols, the Markdown for AI output sheet shows how to read, strip or keep it.
How do you learn the syntax?
The core takes ten minutes: skim the cheat sheet for every element with rendered examples, and use the guides when a specific question comes up — checkboxes, line breaks, comments, centering. Chat apps differ: see Discord and Slack.