A Markdown to HTML converter with output options you can see
Most converters give you one output and call it a day. Documentation work needs more: readable markup when a person will edit it, compact markup when it ships, sanitized markup when it comes from somewhere you do not control, and utility classes when the target project styles with them.
Each switch changes the same parse, so you can compare two outputs without re-pasting the source. The mode indicator in the toolbar names what you are looking at β Formatted HTML or Compact HTML β and the byte counter shows what the change costs.
ToolGuest Markdown to HTML Converter parses Markdown in the browser and gives you four output controls: formatted or compact HTML, a sanitize switch that removes scripts and unsafe URIs, and optional Tailwind utility classes, all with a live preview and .html export in under 50ms.
What this page converts, and what to check
The table below is the short version of the parser's behaviour for the constructs this page is about, with the detail that usually decides whether the output survives.
| Converter option | What it changes in the output | When to use it |
|---|---|---|
| Formatted HTML (default) | Keeps newlines and indentation between elements | When a person will read, review or hand-edit the markup |
| Compact HTML | Collapses whitespace between tags and trims the result | When the markup ships in a page, template or email |
| Sanitize output (on by default) | Drops script and iframe blocks, event handlers and unsafe URIs | Whenever the Markdown came from someone else |
| Tailwind classes | Adds utility classes to headings, paragraphs, lists and code | When the destination project styles with Tailwind |
| Copy HTML / .html download | Clipboard markup, or a full document with doctype and charset | For CMS blocks and standalone files respectively |
Formatted versus compact HTML, and why the difference matters
Formatted HTML keeps a newline between block elements, which is what a reviewer wants when they open the markup in an editor. Compact HTML removes those newlines and the indentation between tags, which matters when the output is embedded in a template, sent in an email or compared in a diff: whitespace changes stop appearing as changes.
Both modes emit identical elements and attributes, so switching is safe. The only thing that changes is the whitespace between tags, plus a trim at the ends. Text inside <pre> is never touched, because collapsing it would corrupt code samples.
What the sanitize switch removes before you copy
Markdown accepts raw HTML, so a pasted snippet can carry a script block, an inline event handler such as onerror, or a javascript: link. The sanitize switch deletes script and iframe blocks, strips attributes that start with on, and rewrites javascript:, vbscript: and non-image data: URIs to #.
Image data URIs for PNG, JPEG, GIF and WebP survive, because those formats cannot execute script. Everything else is neutralised, and the preview re-renders immediately so you can see exactly what will reach your CMS.
All Markdown to HTML, Markup & Developer Tools
Every page below runs the same client-side parser, so a conversion behaves identically wherever you land. Pick the page that matches the job in front of you.
Start here
Convert & preview
Markdown to HTML Converter questions, answered
What options does the converter offer?
Four: formatted or compact HTML output, a sanitize switch that strips scripts, event handlers and unsafe URIs, an optional Tailwind class pass, and the export actions themselves β copy the markup, copy the rendered preview, or download a standalone .html document.
What is the difference between formatted and compact HTML?
Formatted HTML keeps newlines and indentation between block elements, which is easier to read and review. Compact HTML collapses that whitespace so the markup ships without gaps between tags. Both produce the same elements and attributes, and code blocks are never reflowed.
Does the converter sanitize the HTML it produces?
Yes, sanitize is on by default. It removes script and iframe blocks, strips inline event handlers, and rewrites javascript:, vbscript: and non-image data: URIs to #. Raster image data URIs are kept. You can turn it off when you are converting markup you wrote yourself.
Which Markdown dialects does the converter accept?
It parses CommonMark-style Markdown with the GitHub Flavored Markdown extensions most documentation uses: pipe tables, task lists, strikethrough, fenced code with language hints, autolinked URLs and raw HTML passthrough. Footnotes and GitHub alert blocks appear as plain text.
Can I convert a large document without a size limit?
There is no imposed limit, because nothing is sent anywhere and no request body exists to cap. A few hundred kilobytes parse in a few milliseconds on a laptop. Extremely long documents are bounded only by the browser's memory and the textarea's own rendering speed.