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.
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.
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. You can also paste it into the editor to get a shareable link, and convert it to PDF or to HTML.
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.
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.