Markdown → HTML

Markdown to HTML

Paste Markdown and get a clean, self-contained HTML document — sanitised, styled and ready to download. Live preview as you type.

Conversion happens in this tab. The Markdown never leaves your device, and the exported HTML has no scripts, no remote styles and no trackers.

Short answer: paste Markdown above and the preview plus the HTML output update as you type. Copy the markup or download a single .html file; the conversion runs in this tab and the output carries no scripts.

What you get

Sanitised, not just converted

A Markdown file can contain raw HTML, including <script> tags. Everything is passed through an allowlist before it reaches the preview or the download, so a converted document cannot run code when someone opens it later. That also means unsupported tags are removed instead of smuggled through.

Markdown to HTML or PDF?

Use this converter when the styling matters, or when the text is not Latin script — the HTML keeps full Unicode. Use Markdown to PDF when you need a paginated document with selectable text and a page footer.

Markdown to HTML questions

What does the downloaded HTML file contain?

One complete document: a doctype, a title taken from your first heading, your converted content, and a small stylesheet so it reads well in any browser. There is no JavaScript, no remote font and no tracking pixel, so the file works offline and cannot phone home.

Which Markdown dialect is used?

GitHub-flavoured Markdown through marked: tables, strikethrough, task lists, fenced code with language classes, and autolinks. CommonMark paragraph and list rules apply, and inline HTML is kept only after it has been sanitised.

Is raw HTML inside my Markdown safe?

Yes. The output is passed through DOMPurify with an explicit allowlist: script, style, iframe, object, form controls and every on* event handler are removed, links get rel="noopener noreferrer nofollow", and javascript: URLs are dropped. The preview you see is the same sanitised markup that gets downloaded.

Can I paste the result into a website builder?

The output textarea holds the full document, which is right for saving as a .html file. If you only need the body markup, copy the section between <main class="doc"> and </main> — the preview shows exactly that structure.

Does it handle large documents?

Up to 200,000 characters, converted as you type with a short debounce. Longer input is rejected with the limit named rather than truncated.

Related tools