Web Tools
Markdown Preview
Write Markdown and see it rendered to safe, sanitized HTML live in your browser. Headings, lists, links, images, code, blockquotes, and tables — every output is XSS-sanitized with DOMPurify before it touches the page. Your text never leaves your machine.
markdown preview html sanitize developer-tools
Published May 25, 2026
All interactive tools run entirely in your browser. Your data never leaves your device.
How It Works
Type or paste Markdown in the left pane and the rendered result appears live (debounced)
in the right pane. Parsing is handled by marked and every
byte of output is run through DOMPurify before
it is inserted into the page — there is no path for unsanitized HTML to reach the DOM.
Features
- Live preview: rendered HTML updates as you type
- Full Markdown: headings, bold/italic, ordered & unordered lists, links, images, fenced code blocks, blockquotes, and GFM tables
- XSS-safe: script tags,
javascript:URLs, and event-handler attributes (onerror,onclick, …) are stripped — verified against a known payload set - Copy HTML: grab the sanitized HTML output with one click
- Size guard: oversized input shows a clear warning instead of freezing the tab
- Private: runs entirely client-side — your text never leaves your browser
Use Cases
- Drafting README or documentation snippets and checking the rendered result
- Sanity-checking how third-party Markdown will render before publishing
- Confirming that user-supplied Markdown is safe to display
Note: Links in the preview open in a new tab with
rel="noopener noreferrer". Only a strict allowlist of tags and attributes survives sanitization.