How to Open an MD File

An MD file is plain text, so any text editor opens it, but you see the formatting only in a program that reads Markdown. To read one formatted with nothing to install, use the Markdown viewer on this site: it runs in your browser and does not upload the file.

Updated

Open the Markdown viewer

What is an MD file

An MD file, with a name ending in .md or .markdown, is a text file written in Markdown. The CommonMark specification describes Markdown as "a plain text format for writing structured documents", developed by John Gruber with help from Aaron Swartz and released in 2004. A line that starts with # is a heading, words between ** are bold, and lines that start with - are a list.

Gruber's aim was that a Markdown document "should be publishable as-is, as plain text", so an MD file is readable even in a text editor. A software project's README.md is an MD file, and Google's help page for Docs notes that Markdown files are "widely used by Large Language Models (LLMs) to preserve structured data."

The ways to open an MD file

MethodShowsNeedsWhere the file goes
In your browser, on this siteFormatted, with an outline of the headingsA web browserStays on your device
Notepad on WindowsThe Markdown as written; formatted in newer versions on Windows 11WindowsStays on your PC
TextEdit on a MacThe Markdown as writtenmacOSStays on your Mac
VS CodeA formatted preview beside the textVS Code installedStays on your computer
Google Docs, on a computer or phoneFormattedA Google account and an internet connectionUploaded to your Google Drive

1. In your browser, formatted

  1. Open the Markdown viewer.
  2. Choose Open .md file, or drop the file on the page. If the file shows images that are in a folder next to it, drop the folder or choose Open folder.
  3. Read the file formatted. The outline beside it lists the headings.
  4. To keep a copy that anyone can open, choose Download PDF.

The file is not sent to any server, nothing in it can run, and images from other websites stay off until you load them. How it works has the details. The page also opens in a phone's browser, but it has not been tested on real phones yet.

2. On Windows, with Notepad

  1. In File Explorer, right-click the .md file and select Open with > Choose another app.
  2. Select Notepad. If it is not in the list, select Choose an app on your PC to find it.

To open every .md file in Notepad, Microsoft's steps are: open Settings, select Apps > Default apps, type .md in the search bar, select the result and choose the app.

Microsoft's Windows Insider notes describe a newer Notepad on Windows 11 that shows Markdown formatted, with a switch between "formatted Markdown and Markdown syntax views" in the View menu; older versions show the text as written. Microsoft's PowerToys also adds a Markdown preview to File Explorer's preview pane.

3. On a Mac, with TextEdit

  1. In the Finder, Control-click the .md file, choose Open With, then choose TextEdit.
  2. To open every .md file that way, select the file, choose File > Get Info, open the "Open with" section, choose TextEdit in the pop-up menu, then click Change All.

TextEdit opens plain text files, so it shows the Markdown as written, with its # and * marks. To read the file formatted on a Mac, open it in the Markdown viewer in Safari or Chrome.

4. In VS Code or on GitHub

VS Code opens Markdown files with no extension installed. Its documentation gives two shortcuts:

  1. Open the .md file in VS Code.
  2. Press Ctrl+Shift+V (⇧⌘V on a Mac) to switch between the text and the preview.
  3. Or press Ctrl+K V (⌘K V on a Mac) to show the preview beside the text, updated as you edit.

On GitHub, a Markdown file in a repository is shown formatted. GitHub's documentation says it builds a table of contents from the headings, shown by the "Outline" menu icon at the top of the file.

5. In Google Docs, on a computer or a phone

Google's help pages describe opening a .md file in Google Docs without converting it: it stays an .md file in your Drive.

  1. Upload the .md file to Google Drive.
  2. On a computer, click the file twice to open it in Google Docs. On an iPhone or Android phone, open the Google Drive app and tap the file.

Google notes that working on .md files on a phone needs an internet connection, and that font colors, highlights and text alignment are removed when you edit one. This route uploads the file to Google, so use the browser viewer for a file that should stay on your device.

Open an MD file as a PDF, or in Word

A PDF can be read by anyone with a PDF viewer, so it is the format to send when the reader does not use Markdown. Open the file in Markdown to PDF and choose Download PDF. The PDF has real, selectable text, and its headings become bookmarks.

We found no Microsoft support page that describes opening a .md file in Word with its formatting (checked November 22, 2026). To move the text into Word, open the file in the viewer, choose Copy as rich text and paste: Microsoft's support page says Word keeps the formatting of pasted text by default.

Frequently asked questions

What is the difference between a PDF and an MD file?

An MD file is plain text with Markdown marks for the formatting, which anyone can edit in a text editor. A PDF is a finished page layout that anyone with a PDF viewer can read. Markdown to PDF on this site turns the first into the second.