Text & Writing

Markdown Preview

Markdown preview that renders headings, lists, tables, code blocks and links as you type, with the HTML ready to copy.

✎ Markdown
Preview

This Markdown preview turns Markdown into formatted HTML in your browser as you type, with the editor on the left and the preview on the right, or stacked on a phone. It works as a quick Markdown editor online for READMEs, notes and blog drafts: nothing is installed, nothing is uploaded, and Copy HTML puts the generated HTML on your clipboard. A counter above the panes shows words and characters.

How to use the Markdown preview

  1. Type or paste your Markdown into the editor on the left, or press Load Sample to see every supported element.
  2. Watch the preview on the right, which redraws about a fifth of a second after you stop typing.
  3. Check anything that uses syntax this parser does not handle (listed below) before you rely on the preview.
  4. Press Copy HTML to copy the rendered HTML, or copy your Markdown from the editor. Press Clear to empty both panes.

Supported Markdown syntax

You typePreview shows
# Title to ###### TitleHeadings from h1 to h6
**bold**, *italic*, ~~strike~~Bold, italic and struck-through text
`code` and fenced blocks with three backticksInline code and code blocks, with the language name as a label
[text](https://example.com)A link that opens in a new tab
![alt](image.png)An image
> quoteA blockquote
- item or 1. itemSingle-level bulleted or numbered lists
---A horizontal rule
Rows with | and a separator row of dashesA table with a header row

A single line break inside a paragraph becomes a visible line break, and a blank line starts a new paragraph.

Worked example

This Markdown:

## Install

Run `npm install` first.

- **Fast** setup
- Works with [Node](https://nodejs.org)

| Flag | Use |
| --- | --- |
| -v | version |

produces this HTML when you press Copy HTML:

<h2>Install</h2>
<p>Run <code>npm install</code> first.</p>
<ul><li><strong>Fast</strong> setup</li><li>Works with <a href="https://nodejs.org" target="_blank" rel="noopener noreferrer">Node</a></li></ul>
<table><thead><tr><th>Flag</th><th>Use</th></tr></thead><tbody><tr><td>-v</td><td>version</td></tr></tbody></table>

Lists and tables come out on one line each. To indent the HTML before pasting it into a template, run it through the HTML formatter.

Copy HTML gives you the markup only, with no styles attached, so headings and tables take on the look of whatever page you paste them into. The word and character counter above the panes counts the Markdown source, so symbols such as ## and a list dash each count as a word.

Using it as a Markdown viewer or md file viewer

There is no file upload, so to read a .md file, open it in any text editor, copy everything and paste it into the editor pane. The preview then works as a Markdown viewer for that file, and nothing leaves your browser. The same goes for a README copied from a repository or Markdown exported from a notes app.

For two versions of the same file, compare the source in the diff checker first, then paste the final version here to see how it renders. If you draft blog posts in Markdown, the guide on using AI to write blog posts covers the drafting and editing steps around it. The other free writing tools on the site work on the same pasted text.

Markdown online limits

  • The parser is small and built in. It does not follow CommonMark or GitHub Flavored Markdown exactly.
  • Underscores (_word_, __word__) are not read as emphasis. Use asterisks instead.
  • Indented sub-items do not make nested lists; they show as a separate paragraph. Task-list boxes, footnotes and reference-style links stay plain text, and bare URLs are not turned into links.
  • HTML tags typed into the editor are shown as text, which keeps the preview safe from scripts.
  • Asterisks inside inline code are still read as emphasis, so `a*b*c` shows b in italics.
  • Links and images only keep web addresses and relative paths. Any other scheme, such as javascript:, is removed.

Frequently Asked Questions

What Markdown flavors does the Markdown preview support?
It does not follow CommonMark or GitHub Flavored Markdown exactly. Its own parser covers headings, bold, italic, strikethrough, inline and fenced code, links, images, blockquotes, single-level lists, horizontal rules and tables. Fenced code blocks show the language name as a label but are not syntax highlighted. Check a file that uses anything else on the site where it will be published.
Can I preview Markdown with tables?
Yes. Write a header row, a separator row of dashes and pipes, then the data rows, and the preview shows an HTML table. Colons for column alignment in the separator row are accepted but ignored, so every column is left-aligned.
Does the preview support Mermaid diagrams?
No. A code block fenced with mermaid is shown as an ordinary code block with mermaid as its label, and the diagram source appears as plain text. To see the diagram drawn, preview the file somewhere that renders Mermaid, such as GitHub.
Can I use this to write README files for GitHub?
Yes, for drafting the text and checking headings, code blocks, links and tables. GitHub also renders nested lists, task lists, footnotes and italics written with underscores, which this preview shows as plain text, so give the README a last look on GitHub after you commit it.
How is this different from the Markdown preview in VS Code?
VS Code has a built-in Markdown preview that you open with Ctrl+Shift+V, or Cmd+Shift+V on a Mac, and it follows CommonMark more closely. This page needs no editor or install, which helps on a shared or locked-down computer, and it gives you the HTML to copy.