devtools

Markdown Preview

Type Markdown, get safe HTML, instantly.

client-sidefreeno-signup
rendered + sanitized locally in your browser · nothing is uploaded
// how to use

How to use the Markdown Preview

Markdown is the lingua franca of READMEs, docs and comment systems. This tool renders it live to HTML as you type, using GitHub-Flavored Markdown (tables, task lists, fenced code) and sanitizing the result with DOMPurify so the output is safe to paste into a website.

  1. 01Type or paste Markdown into the markdown panel on the left.
  2. 02Read the sanitized HTML on the right — it updates on every keystroke.
  3. 03Inspect the rendered HTML in your devtools if you need to copy the exact output for a static site.

tips

  • DOMPurify strips <script>, inline event handlers (onclick, onerror) and javascript: URLs, so the preview pane is safe even with hostile input. Still review user-submitted HTML before publishing.
  • GitHub-Flavored Markdown adds tables, task lists (- [x]), strikethrough (~~text~~) and autolinks. Standard CommonMark covers the rest.
  • For code blocks, use triple backticks with a language tag (```js) to get syntax-aware highlighting downstream. This preview keeps the code as monospace text — pair it with Prism or Shiki on your site for colors.

frequently asked

Is the rendered HTML safe to paste into my site?+

The output is run through DOMPurify with the default profile, which strips <script>, inline event handlers (onclick, onerror, ...) and javascript: URLs. It is safe against the common XSS vectors, but you should still review any user-submitted HTML before publishing it.

Which Markdown flavor is supported?+

We use marked with GitHub-Flavored Markdown: tables, fenced code blocks, strikethrough, task lists and autolinks all work. Nested blockquotes and footnotes are not enabled.

Why is the preview empty when the page first loads?+

Rendering happens in your browser after hydration. The server ships an empty preview pane on purpose so the initial HTML is identical for every visitor and no user input is ever sent over the network.