Markdown Preview

Paste Markdown, press Run, and see the rendered document — or the HTML it produces.

Runs on your deviceDeveloperWorkingNo account needed

What this tool does

Markdown Preview parses what you paste with marked, a CommonMark parser served from this site rather than fetched from a CDN. Two switches change the parse. GitHub-flavoured Markdown turns on pipe tables, strikethrough, task-list checkboxes and bare-URL autolinks; the line-break switch turns a newline inside a paragraph into a <br>, the way a comment box on GitHub does, and leaving it off follows the CommonMark rule that folds those lines into one paragraph.

The Show setting decides what lands in the output pane. Rendered preview draws the document as headings, lists, tables and code blocks inside the page. The HTML source view prints the same markup as escaped text, so you can read the tags instead of the result. Copy output hands you the HTML in both modes — there is no rich-text clipboard and no file to download, so the way to keep a result is to paste the markup somewhere else.

Any HTML written inside the Markdown is filtered before it reaches the page. DOMPurify runs over the parser's output and removes script elements, inline event handlers such as onerror, and javascript: links — including the entity-encoded spellings a browser would otherwise decode and follow. The cost of that is real: an embedded frame or a third-party widget disappears rather than renders. If DOMPurify itself fails to load, a smaller filter built into the page takes the pass instead, and the summary line under the output names whichever one ran.

Parsing and sanitising both happen in this browser tab, so what you paste is never sent anywhere. The only thing that crosses the network is the parser and sanitiser themselves, fetched from this site the first time you press Run — after that the page renders with the connection off. It is not a GitHub renderer, though, and the gaps are specific. Footnotes, :emoji: shortcodes and maths come out as the characters you typed, and a > [!NOTE] callout renders as an ordinary quote with the marker still sitting in the text. Code fences keep their language as a class but are not colourised. Headings carry no id, so anchor links in the copied HTML resolve to nothing. And YAML front matter is read as Markdown: the opening --- becomes a horizontal rule and the keys below it become a heading.

How to use it

  1. Paste the Markdown. There is no file picker here — open your .md file and paste its contents, or press Load sample for a document that exercises a heading, a table, a quote and a code fence.
  2. Decide how strict the parse is. Leave GitHub-flavoured Markdown on for pipe tables, strikethrough and task lists. Turn on the line-break option when single newlines in your source are meant to be line breaks rather than one wrapped paragraph.
  3. Pick the preview or the markup. Rendered preview shows the document. The HTML source shows the sanitised markup as text, which is what you want when the HTML is the thing you are copying into a CMS or a template.
  4. Press Run. Nothing renders until you do. The pane does not refresh on every keystroke, so after changing a setting press Run again to see what it did.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Checking a README before you push it

Tables and nested lists are where a README usually breaks. Render markdown here first and you can see whether the pipe table actually became a table.

Turning release notes into HTML

Write the notes in Markdown, switch Show to the HTML source, and paste the markup straight into a newsletter template or a CMS field.

Reading a document someone else wrote

An issue export or a pull-request description can carry raw HTML. The sanitiser strips the active parts, so opening it here to read costs nothing.

Working out whether a document is portable

If a footnote comes out as plain text or a callout keeps its [!NOTE] marker, those are renderer extensions rather than Markdown, and they will not survive everywhere you publish.

Questions

Is my Markdown uploaded anywhere?
No. The parser and the sanitiser are two files served from this site, and the render itself happens inside the browser tab, so nothing you paste is transmitted. Those two files are fetched on your first Run, which is the only moment this md preview needs the network; later runs work with it disconnected.
Does the preview update as I type?
No. It re-renders when you press Run, including after a settings change. This is not a live editor, and the trade is that a long document is not re-parsed on every keystroke.
Why does my README look different from GitHub?
Two reasons. The preview inherits this site's typography rather than GitHub's stylesheet, so fonts and spacing differ. And some GitHub syntax is not Markdown at all — footnotes and emoji shortcodes are printed as written, and a [!NOTE] callout stays a plain quote.
What happens to HTML I have written in the Markdown?
It is filtered before it is displayed. Scripts, inline event handlers and javascript: URLs are removed, so an embedded frame or widget will not appear even though the text around it does.
Can I open a .md file directly?
Not on this page. The input is a text box, so paste the file's contents in. Nothing is written back to disk either: Copy output puts the HTML on the clipboard and there is no download button.
What do the counts under the output mean?
They are measured on your source, not on the rendered page. Words counts runs of Latin letters and digits, which means syntax and link text are counted while a document written in Cyrillic or Chinese script barely registers. Headings counts # lines only, so a heading underlined with === or --- is not included.

Related tools