Articles
Published · September 24, 2026

.md vs .markdown vs .txt: Picking the Right File Extension for Your Notes

Should your notes end in .md, .markdown, or .txt? Here's what each extension signals to your apps, and why the choice matters more than you think.

Quick answer

Use .md for anything written in Markdown. It's the extension most editors, previews, and platforms expect. Prefer .markdown if you'd rather spell it out — it's registered right alongside .md and behaves identically. Save .txt for notes that are genuinely plain, with no headings, lists, or formatting syntax you want an app to understand.

This isn't just a naming preference. The extension you pick tells your operating system and your apps what kind of file they're looking at. That decides whether Markdown syntax gets rendered and highlighted, or just sits there as literal asterisks and hash marks.

How it actually works

The text/markdown media type (RFC 7763)

There's an actual standard behind this. RFC 7763 registers the text/markdown media type, and it names exactly two file extensions as valid: .md and .markdown. Nothing else is officially part of the spec.

The RFC goes a step further for Apple platforms, too. It recommends a Uniform Type Identifier (UTI) of net.daringfireball.markdown, which conforms to the broader public.plain-text category. That UTI is the actual mechanism macOS and iOS use to recognize a .md file as Markdown-flavored plain text. It's what lets Quick Look, Spotlight, and the Files app treat the file differently from a generic .txt — and it's a big part of why picking the right extension matters for more than aesthetics.

Why .md won even though its creator preferred .markdown

Markdown's creator, John Gruber, has said that if he had to endorse one official extension, it would be .markdown. His reasoning: modern filesystems support long names, so there's no reason to keep truncating. Interestingly, he's also said he personally used .text for years on his own files — part of why he never pushed for an official standard when Markdown first shipped.

The ecosystem didn't follow his preference, though. `.md` became the de facto standard across GitHub, GitLab, Reddit, Discourse, and Bitbucket, along with nearly every tool that speaks CommonMark or GitHub Flavored Markdown. Shorter won, even though .markdown is arguably clearer about what's inside. If you're weighing the format itself rather than just the extension, see how Markdown stacks up against other plain-text formats like AsciiDoc and reStructuredText.

When to use it (and when to skip it)

When .md or .markdown is the right call

Reach for .md whenever a file actually contains Markdown syntax you want treated as Markdown: headings, lists, fenced code blocks, tables, task lists. The extension is what tells an app to apply that treatment instead of showing raw symbols.

The difference isn't theoretical. Apple has documented this exact behavior for one of its own bundled apps on macOS: import a .md file, and it converts headings, bold text, and lists into properly formatted rich text on the way in. Import a .txt file with the identical Markdown syntax inside it, and it comes in as plain, unformatted text. The file's declared type never signaled that a formatting language was present, so nothing converts it.

When plain .txt is still correct

.txt isn't wrong. It's just a different, narrower promise. The underlying media type, text/plain, is the generic fallback for human-readable text with no formatting instructions. That's the right call for logs, scratch notes, or config snippets where you don't want anything interpreting hashes or asterisks as syntax.

One related trap is worth knowing about, even though it's a separate issue from extensions: file names themselves can quietly break between a Mac and everything else when they contain accented characters, because of how different filesystems normalize Unicode. Extension choice and file naming are two different decisions — but both affect whether a file behaves the way you expect once it leaves your Mac.

How Carets fits in

Carets treats Markdown, plain text, and code as first-class from the start, so the extension you choose is respected rather than guessed at. Write a .md file and you get real syntax highlighting for headings, lists, and code fences as you type — not a wall of literal symbols. Everything stays organized into files, projects, and tags, so a quick note and a project's worth of Markdown docs can live in the same fast, native app on iPhone, iPad, and Mac.

Setting up a new project? Writing a README people will actually read is a good next step — the same .md conventions covered here apply directly.

Carets is available on the App Store for iPhone, iPad, and Mac.

Frequently Asked Questions

Is .md or .markdown the correct file extension?

Both are correct. RFC 7763 registers the text/markdown media type with both .md and .markdown as valid extensions. .md is the de facto standard across GitHub, GitLab, and most editors and tools; .markdown is more descriptive and was Gruber's personal pick if he had to choose one, but it's rarely used in practice.

Does it matter if I use .txt instead of .md for a Markdown file?

Yes, functionally. A .txt file is typed as plain text with no formatting signal, so tools that key off file type — Quick Look previews, syntax highlighters, apps that convert Markdown to rich text on import — won't treat its contents as Markdown even if you wrote hashes and asterisks inside it. Save Markdown-formatted notes as .md to get Markdown-aware behavior.

Why does Apple use a UTI like net.daringfireball.markdown instead of just checking the extension?

macOS and iOS use Uniform Type Identifiers (UTIs) to classify files beyond their extension. RFC 7763 recommends net.daringfireball.markdown, which conforms to the public.plain-text UTI. That's what tells Quick Look, Spotlight, and the Files app that a .md file is Markdown-flavored plain text — which in turn determines which app opens it by default, and whether it gets any Markdown-aware preview treatment.

Will renaming a .txt file to .md change its content?

No. Renaming only changes the file's declared type, not its bytes. If the content already uses Markdown syntax, renaming a .txt to .md just lets Markdown-aware tools recognize and render it correctly — it doesn't add or alter any text.

What about .mkd, .mdown, or other Markdown extensions I've seen?

Those predate RFC 7763's 2016 standardization and still show up in older projects, but they aren't part of the registered text/markdown media type. Stick to .md (most compatible) or .markdown (most descriptive) for anything you're creating today.