Markdown file extensions: .md, .markdown, .rmd, .qmd and the rest
.md is the standard extension for Markdown files, and .markdown means exactly the same thing. Older and rarer spellings such as .mdown, .mkd and .mdwn hold the same plain text. R Markdown (.rmd) and Quarto (.qmd) files are Markdown with code chunks for R or Python. MDX (.mdx) mixes Markdown with JSX components, so it is not plain Markdown.
Every common Markdown extension
| Extension | What it is | Where you see it |
|---|---|---|
.md | Markdown, the usual spelling | README files, docs, notes, AI-written plans |
.markdown | Markdown, the long spelling | Older projects, some static site generators |
.mdown, .mkd, .mkdn, .mdwn | Markdown, rarer short spellings | Older tools and wikis |
.mdtxt, .mdtext | Markdown, saved as text | Some writing apps and exports |
.rmd | R Markdown: Markdown with R code chunks | Data analysis and reports in R |
.qmd | Quarto: Markdown with code chunks for Python, R and others | Reports, papers and websites built with Quarto |
.mdx | MDX: Markdown mixed with JSX components | Documentation sites built with React |
Is there any difference between .md and .markdown?
No. The extension is only a label. A file named notes.md and one named notes.markdown can hold identical text, and any Markdown app reads both the same way. Most projects use .md because it is shorter, and GitHub shows both as formatted pages.
The Markdown media type
On the web, Markdown has its own registered media type, text/markdown, defined in RFC 7763. It is plain text underneath, which is why any text editor can open a Markdown file.
Which Markdown flavour is in the file?
The extension doesn't say. CommonMark is a precise specification of core Markdown. GitHub Flavored Markdown adds tables, task lists and strikethrough on top. R Markdown and Quarto add code chunks and options in YAML front matter. A file can use any of these and still end in .md.
How Pagewide handles each extension
Pagewide renders .md, .markdown, .mdown, .mkd, .mkdn, .mdwn, .mdtxt, .mdtext, .rmd and .qmd files as Markdown, with tables, task lists and YAML front matter shown as a quiet block at the top. Code chunks in R Markdown and Quarto files are shown as code, not run.
Other text files, MDX included, open read-only and appear exactly as written, in a monospace font. See text and large files for the details.
Questions
Can I rename a .markdown file to .md?
Yes. The contents don't change, so renaming is safe. Check first whether a site generator or script in your project looks for a particular extension.
What is a .md file on a Mac?
It is a Markdown file, which is plain text with simple formatting marks. A Mac opens it as plain text by default. To read it formatted, open it in a Markdown viewer or an editor with a preview.
Is a README file always Markdown?
Most are, as README.md. Some projects use README.txt for plain text or README.rst for reStructuredText, which is a different format.
References
- IETF, RFC 7763: The text/markdown Media Type.
- CommonMark, specification, and GitHub, GitHub Flavored Markdown spec.
- R Markdown, Quarto and MDX documentation.
Next: how to open and read .md files on a Mac, or make one app the default for all of them.