[{"data":1,"prerenderedAt":100},["ShallowReactive",2],{"content-/what-is-an-md-file":3},{"id":4,"title":5,"body":6,"description":13,"extension":14,"meta":15,"navigation":94,"path":95,"seo":96,"sitemap":97,"stem":98,"__hash__":99},"content/what-is-an-md-file.md","What Is an MD File? How to Open and View .md Files",{"type":7,"value":8,"toc":9},"minimark",[],{"title":10,"searchDepth":11,"depth":11,"links":12},"",2,[],"An .md file is a plain text file written in Markdown. Learn what's inside one, how to open it on Windows, Mac, Linux, iPhone and Android, and view it formatted here.","md",{"layout":16,"category":17,"publishDate":18,"sections":19},"article","guides","2026-10-01",[20,26,29,57,88],{"type":21,"mode":22,"badge":23,"headline":24,"subheadline":25},"markdownTool","view","Guide • Free .md viewer below","What Is an MD File?","An .md file is a plain text file written in Markdown, a simple way to mark up text where # starts a heading and ** around a word makes it bold. Any text editor can open it. To read it formatted, drop it in the viewer below.",{"type":27,"markdown":28},"articleContent","The viewer above is a working Markdown viewer. Drop your .md file anywhere on the page, click **Open file**, or paste the text into the left panel, and the formatted document shows on the right. It runs in your browser, and the file is never uploaded. The rest of this guide explains what an MD file is and how to open one on every common device.\n\n## What Markdown is\n\nMarkdown is a way of writing formatted text using ordinary characters. John Gruber created it in 2004, with help from Aaron Swartz, so people could write for the web without typing HTML tags. The idea is that the raw file should still be easy to read, even before anything formats it.\n\nA file saved with the `.md` extension holds Markdown text. There is nothing binary or hidden inside it. Open it in any text editor and you see exactly what was typed.\n\n### A tiny example\n\nHere is what the inside of an .md file looks like:\n\n```markdown\n# Trip checklist\n\nPack the **passports** first.\n\n- Chargers\n- Rain jacket\n- [Hotel booking](https://example.com)\n```\n\nA Markdown viewer turns that into a formatted page: \"Trip checklist\" as a large heading, \"passports\" in bold, a bulleted list of three items, and \"Hotel booking\" as a clickable link. The symbols do the work: `#` for headings, `**` for bold, `-` for list items, and `[text](url)` for links. The [Markdown cheat sheet](/markdown-cheat-sheet) lists every element.\n\n## Where .md files come from\n\nYou are most likely to run into an .md file in one of these places:\n\n- **GitHub and other code hosts.** Almost every software project has a `README.md` at the top of its folder. GitHub shows it formatted on the project's main page, but if you download the project, you get the raw file.\n- **Documentation.** Many software manuals, wikis and help sites are written as folders of .md files and published by a static site generator such as Jekyll, Hugo, Docusaurus or MkDocs.\n- **Notes apps.** Obsidian stores every note as an .md file in a normal folder on your computer. Other note apps can export notes as Markdown.\n- **AI chat tools.** ChatGPT, Claude and Gemini write their answers in Markdown, and exports or downloaded answers often arrive as .md files.\n- **Converted documents.** People convert PDFs and Word files to Markdown to feed them to AI tools or to keep notes in plain text. You can do that with the [Markdown converter](/markdown-converter).\n\n## .md vs .markdown vs .mdx vs .txt\n\n| Extension | What it is |\n|---|---|\n| `.md` | Markdown. The most common extension by far. |\n| `.markdown` | Also Markdown, with the same content. Just a longer name. |\n| `.mdx` | Markdown that can also contain JSX components, used by React-based sites. It needs a build tool to render fully. |\n| `.txt` | Plain text with no implied format. A .txt file can contain Markdown, but apps won't assume it does. |\n\nRenaming a `.markdown` file to `.md`, or the reverse, changes nothing about the content. Our viewer opens `.md`, `.markdown` and `.txt` files.\n\n## How to open an .md file\n\nBecause an .md file is plain text, opening it is never the problem. The question is whether you want to see the raw symbols or the formatted result.\n\n### On Windows\n\n1. **Notepad.** Right-click the file, choose **Open with**, then **Notepad**. Notepad on Windows 11 has been gaining Markdown support since 2025: current versions show headings, bold, lists and links formatted, with a toggle in the status bar at the bottom (or in the View menu) to switch between the formatted view and the raw syntax. Formatting can be turned off in Notepad's settings. Older versions, including Notepad on Windows 10, show only the raw text.\n2. **VS Code.** Open the file in Visual Studio Code, which is free, and press **Ctrl+Shift+V** to open a formatted preview. Press **Ctrl+K**, then **V**, to show the preview side by side with the text while you edit.\n3. **Your browser.** Drop the file onto the [Markdown viewer](/markdown-viewer) (or the one at the top of this page). Nothing to install.\n\n### On Mac\n\n1. **TextEdit.** Right-click the file, choose **Open With**, then **TextEdit**. You will see the raw Markdown as plain text.\n2. **Quick Look.** Select the file in Finder and press the Space bar. macOS has no built-in Markdown renderer for Quick Look, so the preview shows raw text. Third-party Quick Look extensions such as the free, open-source QLMarkdown add formatted previews.\n3. **VS Code.** Open the file and press **Cmd+Shift+V** for the formatted preview.\n4. **Your browser.** Drop the file onto the viewer on this page.\n\n### On Linux\n\n1. **Any text editor.** gedit, Kate, nano or vim all open .md files as text. In a terminal, `cat README.md` prints it.\n2. **glow.** For a formatted view in the terminal, install `glow` from your package manager and run `glow README.md`. It renders headings, lists, tables and code with colors.\n3. **VS Code or your browser,** the same way as on Windows.\n\n### On iPhone, iPad and Android\n\nPhones have no built-in Markdown viewer. On iPhone and iPad, the Files app shows an .md file as plain text, with the symbols visible. Most Android file managers do the same or ask which app to use. You have three options:\n\n- **Use the viewer on this page.** Open this page in Safari or Chrome, tap **Open file**, and pick the .md file from your phone's files. It works the same as on a computer.\n- **Import it into Apple Notes.** Since iOS 26, Apple Notes can import Markdown files and keep headings, links and lists.\n- **Install a Markdown app.** Obsidian runs on both iOS and Android, and the app stores have many smaller Markdown readers.\n\n## How to edit an .md file\n\nAny text editor can edit an .md file. Change the text, keep the symbols, and save. For a nicer experience, use an editor with a live preview: VS Code with the side-by-side preview, Obsidian, or Typora. Save with the `.md` extension and UTF-8 encoding, which is the default in almost every modern editor.\n\nIf you only need to copy text out of the file, open it in the viewer above and click **Copy as text**. You get the words without the Markdown symbols.\n\n## How to convert an .md file to PDF, HTML or Word\n\n- **To PDF.** Open the file in the [Markdown to PDF converter](/markdown-to-pdf) and click **Download PDF**. The PDF keeps real, selectable text and clickable links, and it is built in your browser.\n- **To HTML.** Open the file in [Markdown to HTML](/markdown-to-html) and copy or download clean HTML, either as a fragment or as a full web page.\n- **To plain text.** [Markdown to plain text](/markdown-to-text) strips the symbols and keeps readable text.\n- **To Word.** Open the file in [Markdown to Word](/markdown-to-word) and download a real .docx with headings, lists and tables. To paste the formatted text straight into a Google Doc instead, use [Markdown to Google Docs](/markdown-to-google-docs).\n\n## How to create an .md file\n\nOpen any text editor, write your text using Markdown symbols, and save the file with a name ending in `.md`, such as `notes.md`. In Notepad, set **Save as type** to **All files** so Windows doesn't add `.txt` to the end.\n\nIf you already have the content in another format, convert it instead of retyping it. The [Markdown converter](/markdown-converter) turns PDF, Word, HTML, CSV, Excel and other files into a clean .md file in your browser. For a Word document, use [Word to Markdown](/word-to-markdown), and for a PDF, use [PDF to Markdown](/pdf-to-markdown).\n\n## Is an .md file safe to open?\n\nAn .md file is plain text and cannot run anything by itself. Opening one in a text editor is as safe as opening a .txt file.\n\nTwo things are worth knowing. First, Markdown files can contain links, and a link can point anywhere, so treat links in a file from a stranger the way you would treat links in an email. Second, Markdown allows raw HTML inside the text. A careless viewer could display that HTML as-is. The viewer on this page cleans the output before showing it: scripts, event handlers, `javascript:` links, forms and style tags are removed, so a hostile file cannot run code in the page.\n\nThe usual warning still applies: a file named `something.md.exe` is a program, not a Markdown file. Check the full file name if your computer hides extensions.\n",{"type":30,"title":31,"items":32},"faqs","MD File FAQ",[33,36,39,42,45,48,51,54],{"question":34,"answer":35},"What is an MD file?","An MD file is a plain text file written in Markdown, a lightweight formatting syntax. Symbols like # for headings and ** for bold mark up the text, and a Markdown viewer or editor shows the formatted result.",{"question":37,"answer":38},"How do I open an MD file?","Any text editor opens it as raw text: Notepad on Windows, TextEdit on Mac, or any editor on Linux. To see it formatted, open it in VS Code and press Ctrl+Shift+V (Cmd+Shift+V on Mac), or drop it into the free online Markdown viewer on this page.",{"question":40,"answer":41},"What program opens MD files by default?","No program is required. Windows usually offers Notepad, and Mac offers TextEdit. If double-clicking does nothing useful, right-click the file, choose Open with, and pick a text editor or VS Code.",{"question":43,"answer":44},"Can I open an MD file on my phone?","Yes. The Files app on iPhone and most Android file managers show it as plain text. To read it formatted, open the viewer on this page in your phone's browser and tap Open file, or use a Markdown app such as Obsidian.",{"question":46,"answer":47},"Is an MD file the same as a TXT file?","Both are plain text. The .md extension tells apps the text uses Markdown syntax, so editors and viewers know to format it. You can rename one to the other without changing the content.",{"question":49,"answer":50},"How do I convert an MD file to PDF?","Open the file in the [Markdown to PDF converter](/markdown-to-pdf) and click Download PDF. The PDF is built in your browser and has selectable text. You can also click Print in the viewer and choose Save as PDF in your browser's print dialog.",{"question":52,"answer":53},"Is my file uploaded when I use the viewer?","No. The viewer reads the file with your browser and renders it on your device. Nothing is sent to a server, and files up to 10 MB are accepted.",{"question":55,"answer":56},"What does MD stand for?","MD is short for Markdown, the name of the formatting syntax the file is written in.",{"type":58,"title":59,"items":60},"relatedArticles","Markdown Tools and Guides",[61,66,70,74,79,83],{"name":62,"badge":63,"description":64,"link":65},"Markdown Viewer","Tool","Open an .md file or paste Markdown and read it rendered on its own page.","/markdown-viewer",{"name":67,"badge":63,"description":68,"link":69},"Markdown to PDF","Turn an .md file into a PDF with selectable text and clickable links.","/markdown-to-pdf",{"name":71,"badge":63,"description":72,"link":73},"Markdown to Word","Download a .docx with Word heading styles, lists and tables from an .md file.","/markdown-to-word",{"name":75,"badge":76,"description":77,"link":78},"Markdown Cheat Sheet","Reference","Every Markdown syntax element with copy-paste examples.","/markdown-cheat-sheet",{"name":80,"badge":63,"description":81,"link":82},"Markdown Converter","Turn PDF, Word, HTML, CSV and Excel files into .md files in your browser.","/markdown-converter",{"name":84,"badge":85,"description":86,"link":87},"Why LLMs Love Markdown","Guide","Why AI assistants read and write Markdown, and why it works well for RAG.","/why-llms-love-markdown",{"type":89,"title":90,"subtitle":91,"cta":92},"ctaBanner","Need an .md file from a PDF or Word document?","Convert PDF, Word, HTML, CSV and Excel files to Markdown in your browser.",{"text":93,"link":82},"Open the Converter",true,"/what-is-an-md-file",{"title":5,"description":13},{"loc":95},"what-is-an-md-file","mbttc8TNjmVky_ESCVSE_0y2VTpyZUdO_lRecSpYwok",1791690569910]