A Markdown file is a plain text file. That's the part most explanations skip past. The real difference between a .txt file and a .md file isn't the data inside them, it's what you're telling other software to do with that data. A .txt file says "just show me the characters." A .md file says "these characters include some symbols that mean something, please render them." Once that clicks, most of the confusion around this topic goes away, and either one is something you can write and download in seconds with a text file generator.
What a text file actually is
A plain text file stores characters and nothing else. No fonts, no colors, no hidden formatting codes sitting behind the scenes. Open one in Notepad, TextEdit, vim, or any code editor and you see exactly what was typed, nothing more. That's why .txt files from decades ago still open fine today. There's no proprietary structure to decode, just letters, numbers, punctuation, and line breaks.
This simplicity is the whole point. A .txt file works the same on Windows, macOS, Linux, a phone, or a server with no graphical interface at all. It's the closest thing computing has to a universal format.
What a Markdown file actually is
A .md file is still plain text. Open one in Notepad and you'll see readable words with some extra punctuation scattered around them: pound signs before headings, asterisks around bold or italic words, dashes for list items. Nothing in a .md file requires special software to open, because at its core it's the same character data a .txt file holds.
What changes is intent. The symbols in a Markdown file are instructions, and any application that understands Markdown syntax reads those instructions and turns them into formatted output. A line that starts with ## becomes a heading. Text wrapped in double asterisks becomes bold. A tool like GitHub, Obsidian, or a static site generator sees that syntax and renders it. A plain text viewer just shows you the punctuation as is, because it has no idea the symbols mean anything.
So the file itself isn't a different kind of object. The .md extension is really a signal, telling whatever opens it "check for Markdown syntax and format accordingly."
Can you rename a .txt file to .md, or the other way around
Yes, and this is the fastest way to prove they're the same underlying format. Take any .txt file, rename the extension to .md, and open it in a Markdown aware editor. If the content happens to contain characters like # or *, they'll suddenly render as formatting. Nothing about the actual data changed. Only the interpretation did.
The reverse works too. Rename a .md file to .txt and every symbol stays exactly where it was, just displayed as plain punctuation instead of formatting. A file full of ## Heading and **bold text** will just show you those literal characters. Nothing breaks, because nothing was ever encoded differently in the first place.
This is different from something like converting a Word document to plain text, where actual formatting data (fonts, styles, embedded objects) gets stripped out or lost. With .txt and .md, there's no conversion happening at all, just a change in how the same characters get read.
Encoding and line endings
Both file types typically use the same character encoding, usually UTF-8 today, occasionally ASCII or older encodings on legacy systems. Neither format has special encoding requirements tied to its extension. A .md file isn't stored any differently at the byte level than a .txt file with the same content.
Line endings can matter more in practice than encoding does. Windows uses a carriage return and line feed pair, while macOS and Linux use just a line feed. This affects .txt and .md files equally, since it's a property of how the operating system writes line breaks, not something specific to Markdown. If you've ever opened a text file created on one system and seen everything squished onto one line on another, that's a line ending mismatch, not a text versus Markdown issue.
Where each one actually makes sense
Use a plain .txt file when
Configuration files, logs, and data exports usually call for .txt or a specific structured format like CSV or JSON, since you don't want any tool trying to interpret a stray asterisk as formatting. Quick notes with no need for structure work fine as .txt too. If you're generating a large sample file for testing how an application handles file size, memory, or line count, a plain .txt file is usually the right choice, since you're testing raw text handling, not rendering behavior.
Use a .md file when
Documentation that needs headings, lists, code blocks, or links benefits from Markdown, which is why README files on GitHub are almost always .md rather than .txt. Notes apps like Obsidian or Notion use Markdown under the hood because it gives structure without locking you into a proprietary format. Anything that will eventually get converted to HTML, like a blog post or a wiki page, is often easier to write in Markdown first, since the syntax maps cleanly to HTML tags.
When it genuinely doesn't matter
If you're just jotting something down and no other tool will ever read the file, .txt and .md behave identically as far as your own eyes are concerned, since a Markdown aware editor treats a .txt file without symbols exactly the same as a Markdown file without symbols. The only reason to pick .md over .txt here is if you might later want the formatting to render somewhere.
A quick decision guide
| What you're writing | Save it as |
|---|---|
| README, documentation, wiki page | .md |
| Notes in Obsidian, Notion, or a similar app | .md |
| Config file, log, data export | .txt |
| Sample or test data with a set size | .txt |
| A quick note only you will ever open | Either one |
Ask two questions. First, will any part of this content ever need headings, bold text, links, or lists to render visually? Second, will this file be opened by something other than a basic text viewer, like GitHub, a note taking app, or a documentation generator? If the answer to either is yes, save it as .md. If both answers are no, plain .txt is simpler and there's no downside to using it.
For anyone generating placeholder text, sample data, or large test files rather than writing documentation, plain text is almost always the better default. A tool that lets you control the filename and the content gives you exactly the raw data you need, without any formatting getting in the way of testing how your application actually handles it.
The short version
A Markdown file is a text file with a syntax convention layered on top, not a separate kind of file. The extension tells software what to expect, not what the data physically is. If you need structure that renders, reach for Markdown. If you need raw, unambiguous text with nothing else attached, a plain .txt file is still the most dependable option available, and it has been for a very long time.
Quick questions people ask
Yes. A .md file stores plain characters exactly like a .txt file does. The difference is that some of those characters, like pound signs and asterisks, are treated as formatting instructions by software that understands Markdown. A plain text viewer shows them as ordinary punctuation.
You can, and nothing inside the file changes. If the content happens to contain Markdown symbols, a Markdown aware editor will start rendering them as headings, bold text, or lists. Rename it back to .txt and those symbols simply show up as literal characters again.
Markdown. README files on GitHub and most other code hosts are .md because they need headings, lists, code blocks, and links to render. A README.txt still works, but it will display as raw text with no structure.
No. Both are normally UTF-8 today, and neither extension changes how the file is stored at the byte level. Line endings can differ between Windows and Mac or Linux, but that affects both formats the same way since it comes from the operating system, not from Markdown.
Write it now, download it as .txt or .md
Type your text, name the file whatever you want, and download it in a couple of seconds. Nothing to install.
Open the tool