Markdown Editor & Live Preview

Preview Markdown in real-time. XSS-safe with DOMPurify.

Last updated: April 2026
Markdown
Preview

What is Markdown?

Markdown is a lightweight markup language created by John Gruber in 2004. It uses simple text symbols to format content: # for headings, ** for bold, * for italic, - for lists, and > for blockquotes. GitHub, Reddit, Stack Overflow, and many documentation systems use Markdown natively.

XSS Protection

This preview uses DOMPurify to sanitize rendered HTML, preventing cross-site scripting attacks. Raw HTML and JavaScript embedded in Markdown is stripped before rendering, making it safe to preview untrusted Markdown content without security risks.

GitHub Flavored Markdown

This tool supports GitHub Flavored Markdown (GFM) features including fenced code blocks with syntax highlighting, tables with alignment, task lists with checkboxes, strikethrough text, and autolinked URLs. The preview renders in real-time as you type.

Frequently Asked Questions

What Markdown syntax does this tool support?

This tool supports standard Markdown and GitHub Flavored Markdown (GFM) including headings (#), bold (**), italic (*), links, images, code blocks with syntax highlighting, tables, task lists, blockquotes, ordered and unordered lists, horizontal rules, and strikethrough text. The preview renders in real-time as you type.

Is the preview safe from XSS attacks?

Yes. This tool uses DOMPurify, the industry-standard HTML sanitization library, to strip any malicious JavaScript from the rendered output. Even if someone pastes Markdown containing script tags or event handlers, DOMPurify removes them before rendering. This makes it safe to preview untrusted Markdown from external sources.

How do I create tables in Markdown?

Use pipes (|) and hyphens (-) to create tables. The first row is the header, the second row defines alignment (left, center, right), and subsequent rows are data. Example: | Name | Score | followed by |------|-------| followed by data rows. This tool renders tables with proper borders and styling.

Can I use HTML inside Markdown?

Standard Markdown allows inline HTML, but this tool sanitizes HTML through DOMPurify for security. Basic HTML like <br>, <sup>, and <sub> will render, but script tags and event handlers are stripped. For most formatting needs, Markdown syntax is cleaner and more portable than inline HTML.