What is a .md file?A text file written in Markdown.
You found README.md, CLAUDE.md or a download from an AI chat. Here is what the file is, what is inside it, and how to read it.
macOS 14 or later. Reading is free; editing and reviews are one payment.
Quick answer
A .md file is a plain text file written in Markdown, a simple way to mark up text with symbols such as # for a heading and ** for bold. The .md ending tells apps that the text follows Markdown rules. Any text editor opens it, and a Markdown viewer shows it as a formatted page.
·
What Markdown is
Markdown is a plain text format for writing structured documents. John Gruber published it in 2004 as a syntax description and a Perl script that turns the syntax into HTML. The CommonMark specification, which many tools follow today, describes it the same way.
The idea is that the file reads well even before it is converted. A line that starts with a hash mark is a heading. Words between two asterisks are bold.
What is inside a .md file
This is the text in the file:
# Shopping list
Things to buy **today**:
- Bread
- Coffee
See [the shop](https://example.com) for hours.
A viewer shows it like this:
Shopping list
Things to buy today:
- Bread
- Coffee
See the shop for hours.
If you see the hash marks and asterisks on screen, the app is showing the file as text. It is not broken. You need a viewer. For every symbol, see the Markdown cheat sheet.
Where .md files come from
- Code projects. GitHub shows a project's README.md on its front page, and documentation is often a folder of .md files.
- Notes apps that store notes as plain text files.
- AI assistants and coding agents. They write plans, specs and notes in Markdown, and they read instruction files such as
CLAUDE.mdandAGENTS.md. See CLAUDE.md vs AGENTS.md and README.md.
Agents use Markdown because it is plain text: easy to write, easy to read in a terminal, and easy to track in git.
Is it safe to open a .md file?
A .md file is text. It has no program inside and nothing runs when you open it in a text editor. Be careful with the content, not the format: a Markdown file can contain links, and some viewers can show HTML or load images from the internet. Do not click a link you do not trust, as with any document.
.md, .markdown or .txt
.md and .markdown are the same format with a longer or shorter name. .md is the common one. A .txt file is plain text with no promise of Markdown rules, but the content of a .txt file can be Markdown too. DotMD opens files ending in .md, .markdown, .mdown, .mkd, .mkdn, .mdx and .txt.
How to open a .md file
Open it in any text editor to read the raw text. To see it rendered, use a Markdown viewer. On a Mac, DotMD is a free one: press ⌘O and choose the file. For Windows, Linux, iPhone and Android, see Open an MD file.
How to make a .md file
Save plain text with a name that ends in .md. On a Mac this takes TextEdit in plain text mode, as Reading Markdown explains.
How to turn it into PDF or Word
Open the file in a viewer or converter and export it. See Convert Markdown to PDF.
Questions about .md files
Is a .md file the same as a Markdown file?
Yes. A Markdown file is a text file that follows Markdown rules, and .md is the usual file ending.
Is .md a text file?
Yes. It is plain text, so any text editor opens it. The ending only tells apps that the text is Markdown.
Can I open a .md file in Word?
Word does not draw Markdown formatting, so you would see the # and ** symbols at best. Use a text editor to read it, or convert the file to PDF or another format first.
Why do AI tools produce .md files?
Markdown is plain text with simple structure: headings, lists, tables and code. An AI tool can write it directly, and people and other tools can read it without special software.