Convert Markdown to clean HTML instantly. Paste Markdown, preview the rendered content, and copy or download the generated HTML directly in your browser.
MARKDOWN
HTML
281 chars · 38 words
Generated HTML
15 lines
<h1>Hello World</h1><p>This is <strong>bold</strong> and this is <em>italic</em>.</p><h2>Features</h2><ul> <li>Fast conversion</li> <li>Clean HTML</li> <li>Live preview</li></ul><blockquote> <p>Markdown makes writing formatted content simple.</p></blockquote><p><a href="https://example.com" rel="noopener noreferrer">Visit Example</a></p><pre><code class="language-javascript">const message = "Hello, Markdown!";console.log(message);</code></pre>
MD characters
281
MD words
38
HTML characters
475
HTML lines
15
Example documents
Everything runs locally in your browser. Your Markdown is not uploaded to our server, and the preview renders only sanitized HTML — raw HTML in your Markdown is escaped rather than executed.
What is Markdown to HTML conversion?
Markdown is a plain-text syntax for structured writing. It was designed so the source stays readable even before anything renders it — a heading looks like a heading, a list looks like a list. HTML is what browsers actually render. Converting between them means reading the Markdown, working out the structure it describes, and emitting the equivalent elements.
The same document, twice
1Markdown HTML23# Hello World → <h1>Hello World</h1>4This is **bold**. → <p>This is <strong>bold</strong>.</p>5- One → <ul>6- Two → <li>One</li>7 <li>Two</li>8 </ul>
The conversion is mechanical and one-directional in practice. Every Markdown document has a single HTML rendering; the reverse is not true, because HTML can express a great deal that Markdown has no syntax for.
How to convert Markdown to HTML
Enter your Markdown. Paste it, type it, or pick one of the example documents. Large files are fine.
The Markdown is parsed. This happens as you type, in your browser. There is no Convert button because there is nothing to wait for.
The HTML is sanitized. Raw HTML is escaped and link URLs are checked — see below for what that means in practice.
Preview the result. The HTML tab shows the source; the Preview tab shows it rendered.
Copy or download. The HTML or your original Markdown, as a fragment or as a complete document.
Markdown vs HTML
They are not competitors; they sit at different points in the same pipeline. Markdown is a source format optimised for a person writing it. HTML is a target format optimised for a browser rendering it.
Authoring cost, for the same output
1Markdown HTML23## Features <h2>Features</h2>4 <ul>5- Fast <li>Fast</li>6- Clean <li>Clean</li>7- Simple <li>Simple</li>8 </ul>91038 characters 104 characters, and every tag11 has to be closed correctly
Markdown’s limitation is the point. It covers headings, emphasis, lists, links, images, quotes, code and tables — the structures most writing needs — and refuses everything else. You cannot set a class, add an attribute, or build a layout. That constraint is why Markdown documents from different authors look consistent and why they survive being moved between systems.
HTML’s verbosity is also the point. It can express anything the web platform can, which is why it is what the browser reads and why Markdown has to become it eventually.
In practice you write Markdown and let something convert it. That is what a static site generator, a README renderer and this page all do.
Markdown syntax supported
The full vocabulary this converter handles, and the HTML each piece produces. GitHub-Flavored extensions — tables, strikethrough, task lists — are on by default.
Each supported Markdown construct and the HTML it produces.
Markdown
HTML
Note
# Heading
<h1>Heading</h1>
Six levels, # through ######.
**bold**
<strong>bold</strong>
Two asterisks or two underscores.
*italic*
<em>italic</em>
One asterisk or one underscore.
~~strike~~
<del>strike</del>
GitHub-flavoured.
`code`
<code>code</code>
Contents escaped, so markup shows as text.
- item
<ul><li>item</li></ul>
Indent two spaces to nest.
1. item
<ol><li>item</li></ol>
Starting at another number sets start.
> quote
<blockquote><p>quote</p></blockquote>
Nests with more >.
[text](url)
<a href="url">text</a>
URL scheme checked before use.

<img src="url" alt="alt">
Alt text preserved.
---
<hr>
Three or more hyphens, asterisks or underscores.
| a | b |
<table>…</table>
GitHub-flavoured, with column alignment.
- [x] done
<input type="checkbox" checked disabled>
Disabled on purpose.
Fenced code blocks take a language after the opening fence, which becomes a class on the code element:
That language-* class is the convention every syntax highlighter reads, so the output drops straight into a page using one. This converter adds no highlighting itself — that is a runtime decision for the page the HTML lands in, and bundling a highlighter here would ship a dependency most people would strip.
Is Markdown to HTML conversion safe?
Not automatically, and this is the part worth reading if you are building something rather than converting one document.
A Markdown parser is not a security boundary. Its job is to produce HTML from Markdown, and Markdown permits raw HTML — so a parser doing its job correctly will emit whatever HTML your source contained. The library this tool uses removed its own sanitize option in version 8 and points at a dedicated sanitizer instead. Fed a hostile document, it produces hostile output:
What an unguarded parser does — real output, not a hypothetical
Render any of that into a page and you have cross-site scripting. It matters wherever Markdown comes from someone else — comments, profiles, wiki pages, issue trackers, anything user-submitted.
This converter closes it in two independent ways:
It cannot generate dangerous HTML. Raw HTML is escaped instead of passed through, and every link and image URL is checked against a four-scheme allowlist — http, https, mailto, tel. Everything else the parser emits is a fixed tag with text it has already escaped, so the output vocabulary is closed.
The preview checks anyway.Before rendering, the HTML is parsed with the browser’s own parser and anything outside an element and attribute allowlist is removed. It should never find anything — and “I enumerated the attack surface correctly” is exactly the assumption worth having a second defence for.
Obfuscation is handled too. A tab or newline inside a scheme — java	script: — is not a clever trick that gets through; the URL standard has browsers strip those characters before resolving, so the check strips them first as well. Mixed case, leading whitespace and spaces before the colon are all caught for the same reason. data: is refused even for images, because data:image/svg+xml can carry script.
Raw HTML in Markdown
Markdown allows raw HTML inline, and most converters pass it straight through. This one does not. Raw HTML in your source is escaped and appears as visible text:
What happens to a raw tag
1Input: <div class="note">Hello</div>23Output: <div class="note">Hello</div>45Rendered: <div class="note">Hello</div> ← as literal text on the page
That is a real limitation and worth stating clearly rather than burying: if your Markdown relies on embedded HTML, this converter changes its meaning.
The reason is that there is no safe middle ground. Passing raw HTML through requires a full HTML sanitizer — one that can take arbitrary markup and decide, correctly, which elements and attributes survive. That is a genuinely hard problem and a well-known source of vulnerabilities when attempted casually. Escaping everything is a rule with no gaps: each character of your source either becomes markup this converter generated, or becomes text.
The tool tells you when it happens, with a count of the blocks it escaped, rather than letting you discover it in the output.
The conversion pipeline
Five steps, in a fixed order, entirely in your browser:
Both panels come from the same conversion. The HTML tab shows it as text — escaped by the same mechanism that keeps any other string safe in a React component — and the Preview tab renders it after the allowlist check. Copying gives you exactly what the HTML tab shows. If it has to match the indentation of the template it is going into, the HTML formatter will re-indent or minify the fragment afterwards.
The whole pipeline is deterministic: the same Markdown always produces the same HTML, byte for byte. That is what makes it safe to derive both panels from one call rather than storing the HTML separately and hoping the two stay in step.
Markdown to HTML for developers
Where this conversion normally shows up:
Documentation and READMEs — written in Markdown, rendered as HTML by the host. Converting locally is how you check what a renderer will do before pushing.
Static site generators — the build step is essentially this conversion, applied to a directory of files.
CMS content — authors write Markdown, the CMS stores it, a template renders the HTML. Useful when you want a fragment to paste into a field.
Blog posts and changelogs — Markdown in version control, HTML on the site. The word counter reads the draft itself if you are writing to a length.
Developer portals and knowledge bases — where contributors should not be writing raw HTML.
User-generated content — comments and profiles, and the case where the sanitization section above stops being theoretical.
One caution on destinations. This converter produces clean, standard HTML with no classes and no inline styles, which is the right output for a template you control. It is not tuned for any particular CMS or for email — email clients in particular strip and rewrite aggressively, and reliable HTML email is a different discipline built on table layouts and inline styles. Test the output where it is going rather than assuming it survives unchanged.
Frequently asked questions
What is Markdown to HTML conversion?
Turning Markdown source — the plain-text syntax with # for headings and ** for bold — into the HTML a browser actually renders. A parser reads the Markdown, works out the structure, and emits the equivalent elements: # Hello becomes <h1>Hello</h1>.
How do I convert Markdown to HTML?
Paste or type your Markdown on the left. The HTML appears immediately on the right — there is no Convert button because there is nothing to wait for. Switch to the Preview tab to see it rendered, then copy or download either the HTML or your original Markdown.
Is Markdown the same as HTML?
No. Markdown is a source syntax designed to be readable as plain text; HTML is the markup browsers render. Markdown is deliberately limited — it covers the structures most writing needs and nothing else. HTML can express anything, at the cost of being far more verbose to write by hand.
Does Markdown support headings?
Yes, six levels, using one to six # characters. # Hello becomes <h1>Hello</h1> and ###### becomes <h6>. The underline styles — text followed by === or --- — also work for the first two levels.
Does Markdown support tables?
Not in the original spec, but yes in GitHub-Flavored Markdown, which this converter enables by default. Pipe-delimited rows with a --- separator become a semantic <table> with <thead> and <tbody>. Column alignment set with :--- and ---: is preserved as an align attribute.
Does Markdown support code blocks?
Yes. Fence a block with triple backticks and it becomes <pre><code>. A language after the opening fence becomes a class — ```javascript produces <code class="language-javascript">, which is the convention every syntax highlighter reads. Indented four-space blocks work too. Content inside a code block is escaped, so markup in your example code stays visible as text.
Does Markdown support images?
Yes:  becomes an <img> with the alt text preserved as the alt attribute — which matters, because that is what a screen reader announces. This converter does not upload, proxy or fetch images; the URL is passed through as you wrote it.
Does Markdown support links?
Yes: [text](https://example.com), plus autolinks like <https://example.com>. External links get rel="noopener noreferrer" added. No target attribute is set — whether a link opens in a new tab is a decision for the page the HTML ends up in, not for a converter.
What HTML does Markdown generate?
A small, predictable set: h1–h6, p, strong, em, del, code, pre, blockquote, ul, ol, li, a, img, hr, br, the table elements, and a disabled input for task list checkboxes. That is the whole vocabulary — which is what makes it practical to guarantee the output is safe.
Can Markdown contain raw HTML?
Markdown permits it, and most parsers pass it straight through. This converter does not: raw HTML in your source is escaped and appears as visible text, so <div> comes out as <div>. That is a real limitation and it is deliberate — see the next answer.
Why is raw HTML escaped instead of passed through?
Because passing it through safely requires a full HTML sanitizer, and half-doing it is worse than not offering it. If raw HTML flowed through, so would <script>, event handler attributes and everything else in an untrusted document. Escaping it is a clear rule with no gaps: every character of your Markdown either becomes markup this converter generated, or becomes text. If you need raw HTML preserved, this is not the right tool for that document.
Is the generated HTML safe?
The HTML this converter produces is, because of how it is produced rather than because of what is filtered afterwards. Raw HTML is escaped, and link and image URLs are checked against a four-scheme allowlist — http, https, mailto and tel. Nothing else can appear. The preview additionally re-checks the output against an element and attribute allowlist before rendering it, using the browser's own parser.
Why should generated HTML be sanitized?
Because a Markdown parser is not a security boundary and does not claim to be. The parser used here removed its sanitize option in version 8 and points users at a dedicated sanitizer instead. Feed it <script>alert(1)</script> and it emits exactly that. Any application rendering parser output from untrusted Markdown — comments, user profiles, wiki pages — without sanitizing has an XSS.
What is the difference between Markdown parsing and HTML sanitization?
Parsing decides what the Markdown means and produces markup. Sanitization decides what markup is allowed to survive. They are separate jobs and a parser doing the first well tells you nothing about the second. This tool solves it by never generating dangerous markup in the first place, then checking the result anyway before it renders.
Can Markdown contain JavaScript?
Only via HTML — a <script> tag, an event handler attribute like onerror, or a javascript: URL in a link. Markdown itself has no syntax for code execution. This converter neutralises all three: script tags are escaped as text, event handlers go with them, and javascript: URLs are refused while the link text is kept.
Are javascript: and data: links blocked?
Yes, along with vbscript:, file: and anything else outside the allowlist. Obfuscated forms are caught too — a tab or newline inside the scheme, mixed case, or spaces before the colon — because browsers strip those characters before deciding what scheme a URL has, and a naive check that does not is exactly how these get through. data: is blocked even for images, because data:image/svg+xml can carry script.
Can I copy the generated HTML?
Yes, with Copy HTML. Copy Markdown copies your original source instead. Both use the browser's clipboard API; nothing is sent anywhere.
Can I download the HTML?
Yes — Download HTML saves document.html and Download Markdown saves document.md. Both are generated in your browser with a Blob and never uploaded. With the full-document toggle on, the HTML download is a complete page you can open directly; with it off, it is the fragment.
What does the full HTML document option do?
It wraps the converted fragment in a minimal valid page — doctype, html with a lang attribute, a UTF-8 charset declaration, a viewport tag and a title. The default is off, because what people usually want is the fragment to paste into a template or a CMS field. No CSS is included: a converter picking your typography would be the first thing you deleted.
Can I convert a Markdown file to HTML?
Open the file, select all, paste it in. There is no file picker because the paste path covers it and adding one would mean handling encodings and file sizes for no real gain. Large documents are fine — a 60 KB file converts in a few milliseconds.
Does this tool upload my Markdown?
No. Parsing happens entirely in your browser using a library bundled with the page — there is no backend, no request, and nothing stored. Unlike some tools here, this one also deliberately does not put your content in a shareable URL: Markdown documents are long and often private, and a link would put them in browser history.
Is this Markdown to HTML converter free?
Yes. Conversion, preview, copy and download are all free, with no account and no limit.
Can I use the output in a website?
Yes — that is what the fragment is for. Paste it into a template, a component, or a static site's HTML. It carries no classes beyond the code block language and no inline styles, so your own CSS decides how it looks.
Can I use the output in a CMS?
Usually. Most CMS rich-text and raw-HTML fields accept it. Some strip elements they do not expect, some rewrite attributes, and email clients are stricter still — so test it in the destination rather than assuming. No converter can promise output that survives every CMS and email client unchanged.
Why does rendered HTML look different on different websites?
Because HTML describes structure and CSS decides appearance. The same <h1> is 32 pixels on one site and 20 on another; a <blockquote> may have a coloured bar or nothing at all. The preview here uses this site's typography so the structure is legible — it is not a prediction of how it will look anywhere else.
What is GitHub-Flavored Markdown?
GitHub's superset of the original spec, and the dialect most people mean by "Markdown" now. It adds tables, strikethrough with ~~text~~, task lists, autolinking of bare URLs, and fenced code blocks with language identifiers. This converter enables it by default.
Does the converter support task lists?
Yes — - [x] done and - [ ] todo become checkboxes. They are rendered with the disabled attribute on purpose: a preview is for reading, and a checkbox you can toggle implies a state the document does not have.
Is the generated HTML formatted or minified?
Formatted, with block-level elements indented by nesting depth. The indentation is added only to lines that already begin with a block-level tag, and code block contents are left untouched — reindenting a code block would change the code inside it. What you copy is exactly what you see.
Keep going
Other converters that run the same way
Same engine-first approach, same privacy model — everything below does its work in your browser.