Skip to main content

How to preview Markdown and copy clean HTML

Markdown Preview renders what you type as you type it and hands you the HTML behind the preview. Rendering follows CommonMark with tables, raw HTML in the source is not passed through, and the output is filtered against an allowlist before it is shown — so the HTML you copy is the same safe markup you looked at. Nothing is uploaded; the document lives in your browser tab only.

Preview Markdown and take the HTML in four steps

  1. Write or paste MarkdownType into the editor pane, or press Load example to see a short document that exercises headings, emphasis, lists, inline code, links, and quotes.
  2. Watch the preview updateThe rendered document appears beside the editor and refreshes as you type. On a narrow screen, the Edit and Preview tabs switch between the two panes instead of squeezing both in.
  3. Check how your links and tables came outPipe tables are supported. Links survive only for http, https, and mailto addresses, and they open in a new tab with the referrer withheld, so a pasted javascript: URL is dropped rather than rendered.
  4. Copy the sanitized HTMLCopy sanitized HTML puts the markup for the preview body on your clipboard, byte for byte what the preview shows, ready to paste into a CMS field, an email template, or a static page.

What people use Markdown Preview for

  • Check a README before you commit itConfirm that headings, nested lists, and tables render the way you expect instead of discovering a broken list after pushing.
  • Turn notes into HTML for a CMSWrite the body in Markdown and copy the sanitized HTML into a content field that does not accept Markdown.
  • Read Markdown someone sent youPaste a raw Markdown file into the editor to read it as a formatted document, without installing a viewer or trusting an online converter with the text.

Markdown Preview questions

Is my document uploaded to render the preview?
No. Parsing, sanitizing, and rendering all happen in your browser tab, so the text stays on the device and nothing is stored after you close the page.
Which Markdown flavour does it follow?
CommonMark, with pipe tables enabled. Headings, emphasis, lists, block quotes, code blocks, inline code, links, and tables all render.
Why was my inline HTML ignored?
Raw HTML in the source is deliberately not rendered, and the output is filtered against an allowlist of tags and attributes. That is what makes the copied HTML safe to paste into another system.
Is the copied HTML the same as the preview?
Yes. Copy returns the sanitized markup of the preview body itself, so what you paste elsewhere matches what you just read.
Why did my bare URL not become a link?
Automatic link detection is off, so write links in Markdown syntax with angle brackets or square brackets. Only http, https, and mailto addresses are kept.
Can it export a PDF or an HTML file?
No. The output is the sanitized HTML on your clipboard. Save it yourself, or print the page from your browser if you need paper.