Markdown Preview

Preview Markdown as HTML.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Type or paste Markdown and watch it render next to the editor, with no button to press. Headings, lists, tables, task lists, quotes and fenced code blocks all show up as they will on GitHub-style pages. The preview is sanitized, so a pasted script tag or javascript: link cannot run. You can copy or download the HTML too.

How to use

1
Step 1
Type or paste Markdown into the left panel (a sample is loaded to start).
2
Step 2
Check the Live preview on the right; it updates a moment after you stop typing.
3
Step 3
Use Copy HTML or Download if you need the generated markup.

How it works

The Markdown is converted to HTML with the marked parser using GitHub-flavoured rules. Before anything is shown, the HTML goes through the DOMPurify sanitizer with a strict allow-list: only ordinary content tags such as headings, paragraphs, lists, tables, links, images and code survive. Script, style, iframe, form and SVG elements are removed with their contents, every on* event attribute and style attribute is dropped, and link and image addresses must be http, https, mailto or relative (images may also be small inline PNG, JPEG, GIF or WebP data). Links open in a new tab with rel=noopener noreferrer nofollow, and task-list checkboxes are read-only.

Worked example

Unsafe HTML inside Markdown

Input
# Hi **bold** and <script>alert(1)</script> [x](javascript:alert(1))
Output
<h1>Hi</h1> <p><strong>bold</strong> and <a>x</a></p>
Walkthrough
The heading and bold text render normally. The script element is removed entirely, and the link keeps its text but loses the javascript: address.

Limitations

  • Raw HTML you type is filtered, so styled or embedded content (iframes, videos, inline CSS) will not appear in the preview.
  • Remote images are fetched from their own servers when the preview shows them.
  • Math, diagrams and footnotes are not rendered; only standard and GitHub-flavoured Markdown is.
  • The copied HTML is the sanitized version, not a byte-for-byte copy of what a different Markdown renderer would produce.

Questions

Does the preview update while I type?
Yes. It re-renders about a tenth of a second after you stop typing, so there is nothing to click.
Is it safe to paste Markdown from someone else?
The preview removes scripts, iframes, forms, event handlers and javascript: links before showing anything, so pasted content cannot run code on this page.
Does it support tables and task lists?
Yes. Pipe tables, - [ ] task lists, strikethrough and fenced code blocks follow GitHub-flavoured Markdown.
Can I get the HTML out?
Use Copy HTML or Download. If you only want a conversion without the side-by-side editor, the Markdown to HTML tool gives the raw output.
Is my text uploaded?
No. Rendering and sanitizing happen in your browser.

Features

  • Live side-by-side preview
  • Tables and task lists
  • Sanitized output
  • Copy or download HTML
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn Regular Expressions - Crash Course

    freeCodeCamp.org

    Regex primer for tester and explainer pages.

    Watch on YouTube
  • What Is A RESTful API?

    Traversy Media

    API context for JWT, JSON, and encoding utilities.

    Watch on YouTube
  • Base64

    MDN

    When Base64 is appropriate versus raw binary transfer.

  • Regular expressions

    MDN

    JS regex guide aligned with browser-based testers.