iGotTools

Markdown to HTML Export

Turn Markdown into clean, sanitized HTML with a live preview. Toggle view modes and options, check stats, then copy or download the result locally.

Developer tools

Markdown is the fastest way to write structured content, but the web runs on HTML. The bridge between them should be instant and safe. Open the Markdown Preview to write Markdown, watch the HTML render live, and export clean, sanitized output — all in your browser.

TL;DR

Write Markdown, see the HTML instantly, copy or download it.

  • Live preview as you type — three view modes (Split, Editor, Preview) so you can edit, read, or do both at once.
  • Clean, safe HTML — output is sanitized with DOMPurify, so it’s safe to paste into a CMS or email.
  • Copy or download — grab the HTML to the clipboard or save a standalone .html file locally.

What Markdown is

Markdown is a lightweight markup language for formatting text with simple, readable symbols. A # makes a heading, dashes make a list, asterisks make emphasis, and a plain URL can become a link. The source stays close to plain text, which is why people reach for it the moment they write more than a paragraph of structured content.

It’s used everywhere technical writing happens — README files, documentation sites, blog posts, release notes, and internal wikis. The reason is simple: you can write and read Markdown without any tool, and it converts to rich HTML when you need it.

Under the hood, this tool renders Markdown with the markdown-it engine following the CommonMark specification — the standardized, well-defined interpretation of Markdown. That means predictable, consistent output instead of the dialect-by-dialect surprises older Markdown flavors were known for.

The preview and view modes

As you type, the HTML renders live in the preview. Three view modes let you control how much you see:

  • Split — editor on the left, rendered preview on the right. The default, and the best mode while writing, because you see the source and the result together.
  • Editor — just the Markdown input, full width. Useful when you’re focused on writing and don’t need the preview.
  • Preview — just the rendered HTML. Useful for reading the finished result or showing it to someone.

Switch modes anytime. The rendered output updates on every keystroke in Split and Preview modes.

Step-by-step: export HTML

The Markdown Preview runs entirely in your browser. Here is the workflow:

  1. Type or paste your Markdown into the input area. Use Sample to load an example if you want to start from a template, or Reset to clear everything.
  2. Pick a view mode. Choose Split, Editor, or Preview depending on whether you want to see source, result, or both.
  3. Toggle the four options. Each changes how Markdown renders:
    • Soft line breaks — single line breaks in your text become <br> in the output, instead of being collapsed.
    • Linkify URLs — bare URLs like https://example.com are turned into clickable links automatically.
    • Typographer — replaces straight quotes with smart typography (curly quotes, dashes).
    • Raw HTML — lets you embed inline HTML in the Markdown. Note: even with this on, the output is sanitized (see below), so dangerous tags and handlers are stripped before you see or copy them.
  4. Check the Stats panel. It shows characters, words, lines, headings, links, and code blocks — a quick way to confirm the structure came out as you intended.
  5. Export. Click Copy HTML to put the rendered HTML on the clipboard, or Download HTML to save a standalone .html document. You can also Copy Markdown or Download Markdown to export the .md source.

Sanitization and safety

This is the part that makes the output genuinely safe to paste into a CMS, an email, or a wiki. Every bit of rendered HTML — whether it came from Markdown syntax or from raw HTML you embedded — passes through DOMPurify before it reaches the preview or the clipboard.

DOMPurify (configured with USE_PROFILES: { html: true }) strips the dangerous parts: <script> tags, inline event handlers like onclick, and other vectors that could run code. It also forbids the style tag and style attribute, so styling tricks can’t sneak through. If DOMPurify itself ever fails, a regex-based fallback sanitizer catches the worst offenders so you never get raw, unsafe HTML.

When raw input differs from the sanitized output, the tool reports “Unsafe HTML was removed” — a count of removed content. That notice is your signal that something was stripped, which is exactly what you want before pasting anywhere sensitive.

Limits and honesty

A few honest constraints so you know what you’re getting:

  • CommonMark, not GitHub Flavored Markdown. This tool follows CommonMark via markdown-it. It does not render GitHub-specific extensions like tables or strikethrough (~~text~~) from Markdown syntax alone. If you need a table or struck-through text, enable Raw HTML and write the HTML directly — it will still be sanitized.
  • style is stripped. Because DOMPurify forbids the style tag and attribute, inline styling in your raw HTML will not survive into the output.
  • Raw HTML is opt-in and still sanitized. The Raw HTML option lets inline HTML through the Markdown parser, but the rendered result is sanitized afterward. It’s safe, but it’s not a way to run arbitrary markup.

FAQ

Is the HTML output safe?

Yes. All rendered HTML is passed through DOMPurify before it reaches the preview, the copy button, or the download. Scripts, event handlers, and the style tag/attribute are removed. If anything was stripped, you’ll see an “Unsafe HTML was removed” notice.

Does it support GitHub tables?

Not through Markdown syntax. The tool follows CommonMark, which has no native table syntax. To include a table, enable Raw HTML and write the <table> markup directly — it will render and be sanitized like any other HTML.

Can I download the HTML file?

Yes. Download HTML saves a standalone .html document with basic styling, ready to open in any browser. You can also Copy HTML to the clipboard if you want to paste it elsewhere.

What is CommonMark?

CommonMark is a standardized specification for Markdown that removes the ambiguity of older dialects. This tool uses the markdown-it engine to render CommonMark, so the same input reliably produces the same output. It’s not GitHub Flavored Markdown — features like tables and strikethrough aren’t part of the core spec.

iGotTools

Start with this tool

Get started