Live preview GitHub-flavoured XSS-safe output

Markdown to HTML Converter

Write on the left, watch the HTML build itself on the right. Copy the markup into your CMS, or download a complete, self-contained HTML page with sensible typography already baked in.

Markdown editor
Words 0 Chars 0 Headings 0 Links 0 Read 0 min
0 KB output
Sanitised with DOMPurify — scripts are always stripped.

Markdown in, clean HTML out

Markdown is wonderful to write in and still needs to become HTML before a browser can show it. This converter uses the marked parser with GitHub-flavoured extensions, then runs every result through DOMPurify so nothing executable sneaks into the output. The typical use cases: drafting a blog post, writing README content for a site builder that only accepts HTML, or turning meeting notes into a shareable page.

What is supported

  • Headings, paragraphs, bold, italic, strikethrough and inline code
  • Ordered, unordered and nested lists, including GFM task lists
  • Fenced code blocks with language hints, blockquotes and horizontal rules
  • Links, autolinks, images and reference-style links
  • GFM tables with alignment, footnotes-free but predictable

Copy the snippet or export a whole page

Copy HTML gives you the converted fragment for pasting into a CMS, an email template or a component. Download .html wraps that fragment in a complete document with a small, readable stylesheet — headings, tables, code blocks and a dark-mode colour scheme are all handled, so the downloaded file looks presentable the moment you open it.

About the sanitising step

Raw HTML inside Markdown is a classic XSS vector: paste a snippet from an untrusted source and it can carry a <script> tag. Output here is stripped of scripts, event-handler attributes and inline styles by default. If you genuinely need embedded HTML (a video iframe, for example), enable “Keep embedded HTML” — scripts and on* handlers are still removed.

Compatibility notes

The generated HTML is plain, standards-compliant markup with no framework classes. That means it drops cleanly into WordPress (use a Custom HTML block), Ghost, Hugo, Jekyll, Astro, Next.js or a plain .html file. Code blocks come out as <pre><code class="language-js">, which is exactly the shape Prism, highlight.js and Shiki expect if you want syntax colouring later.

Privacy

Your draft never touches a server. Parsing, sanitising and export all run locally, so unpublished articles, internal documentation and confidential notes stay on your machine. If you also format code, the Code Prettifier works the same way.

Frequently asked questions

Is the HTML output safe to paste into my website?
Yes. The output is sanitised with DOMPurify, which removes script tags, javascript: URLs and event-handler attributes. Raw HTML is off by default — turn it on only if you trust the source.
Do code blocks get syntax highlighting in the export?
The exported HTML keeps the language-* class on each code block but does not bundle a highlighter. Add Prism or highlight.js to your page and highlighting appears automatically.
Can I convert HTML back to Markdown?
Not on this page — this tool goes one direction. For the reverse, browser extensions such as “MarkDownload” or the turndown library are the usual picks.
Why does my Markdown table not render?
Tables need GitHub-flavoured Markdown enabled (it is by default) and a separator row of dashes under the header — | --- | --- |. Blank lines before and after the table also help.
Is there a size limit?
No explicit limit. Documents of a few hundred kilobytes convert instantly; extremely large files (several MB) may make the live preview feel sluggish because it re-renders as you type.