NewRedact ImageTry it →
Tools / Text & Data / Markdown Preview
Client-side

Markdown Preview

Write Markdown and see the rendered HTML side by side in the browser, catching heading, list, and code block surprises before you publish.

What it does

  • Live preview as you type
  • GitHub-style tables, task lists and strikethrough
  • Copy the HTML or download it as a .html file
  • Output sanitized: no scripts, no inline event handlers
  • Runs locally, no content uploaded

Type or paste Markdown in the left panel and the rendered result appears in the right panel as you write. When it looks right, click Copy HTML to put the generated HTML on your clipboard, or Download HTML to save it as markdown-output.html. Rendering is done by pulldown-cmark, a CommonMark parser written in Rust, and the HTML is cleaned by the ammonia sanitizer, both compiled to WebAssembly. Your drafts are rendered in the browser tab and never sent to a server.

Supported Markdown syntax

The renderer follows CommonMark, the standardized Markdown specification, with three GitHub Flavored Markdown extensions turned on:

  • Headings: # to ######, or underlined with === and ---.
  • Emphasis: *italic*, **bold**, and ~~strikethrough~~ (extension).
  • Lists: bullets with -, * or +, numbered lists, nested lists, and task lists written - [ ] and - [x] (extension).
  • Tables: pipe tables with a header separator line such as |---|---| (extension).
  • Code: inline backticks, fenced blocks with three backticks or tildes, and indented code blocks.
  • Links and images: inline [text](https://...), reference links, and autolinks in angle brackets.
  • Blockquotes with > and horizontal rules with ---.
  • Raw HTML inside the Markdown is allowed, then sanitized (see below).

Footnotes, math formulas, Mermaid diagrams and heading anchors are not part of this renderer.

How to preview and export

  1. Write or paste Markdown in the editor. The preview refreshes a fraction of a second after you stop typing, so long documents stay responsive.
  2. Check headings, nested lists, tables and code blocks in the preview. This is where indentation mistakes show up.
  3. Click Copy HTML to paste the HTML into a CMS, a newsletter tool or an HTML template.
  4. Or click Download HTML to save it. The file contains the HTML fragment only (no <head> or styles), ready to insert into a page.

What the sanitizer removes, and why

Markdown allows raw HTML, which means a pasted document could contain a script. Before anything is displayed or exported, the HTML goes through a sanitizer:

  • Removed: <script> and <style> elements, style and class attributes, event handlers such as onclick or onerror, and HTML comments.
  • Allowed link schemes: http, https and mailto. A javascript: link is neutralized.
  • Relative URLs are removed. A link to /docs/setup or an image at images/logo.png keeps its text but loses its target. Use absolute URLs if the exported HTML must keep its links and images.
  • Code language classes such as language-js are stripped, so add syntax highlighting classes in your destination if you need them.
  • Task list checkboxes are removed from the output; the item text remains.
  • Every link receives rel="noopener noreferrer".

The result is HTML you can paste into a page without opening a cross-site scripting hole, even if the Markdown came from someone else.

Typical uses

  • Checking a README, a changelog or a pull request description before pushing it.
  • Writing a blog post or a newsletter in Markdown and pasting the HTML into a CMS or email tool that only accepts HTML.
  • Converting documentation written in Markdown into HTML fragments for a help center.
  • Debugging why a list or a table renders wrongly elsewhere, by comparing with a CommonMark reference rendering.

Compared with editors and static site tools

VS Code, Obsidian and Typora preview Markdown well, and GitHub previews it in its web editor. Pandoc or a static site generator turns Markdown into full HTML pages. This tool is for the in-between case: no installation, a preview that follows the CommonMark standard, and HTML you can copy immediately. Note that renderers differ on extensions, so a document that relies on footnotes or diagrams will look different here than on a platform that supports them.

Privacy for drafts

Markdown drafts are often unpublished work: internal documentation, product announcements under embargo, meeting notes, personal journals. Online editors that render server-side receive all of it. Here the rendering and sanitizing happen in WebAssembly inside the page, and the text you type never leaves your device.

Frequently asked questions

Is my Markdown sent to a server?
No. Rendering runs in your browser through WebAssembly. Nothing is uploaded or saved.
Does it support GitHub Flavored Markdown?
It supports the GFM tables, strikethrough and task lists on top of CommonMark. Other GitHub features such as footnotes, mentions or emoji shortcodes are not rendered.
Why did my relative link disappear in the HTML?
The sanitizer only keeps absolute URLs using http, https or mailto. Relative paths are removed for safety. Write full URLs if the links must work in the export.
Can I use HTML inside my Markdown?
Yes. Raw HTML is rendered, but scripts, styles, inline event handlers and unsafe attributes are stripped first.
Is my text saved between visits?
No. The editor content is not stored. Copy or download your work before closing the tab.
Can I convert HTML back to Markdown?
Yes, with the HTML to Markdown converter. For a page dedicated to the Markdown to HTML direction, see the Markdown to HTML converter.

Related tools: count words and reading time of your draft with the word counter.