How to convert Markdown to HTML
Paste your Markdown into the left field and press Convert. The conversion does not run on every keystroke, so a heavy operation on a large text never slows your typing. The result shows a safe preview on top and the copyable HTML source below. To keep single line breaks as <br>, tick the box; when it is off, single line breaks behave like spaces.
Copy puts the HTML fragment on the clipboard, and Download wraps the same fragment in a small HTML5 document. Both outputs are only HTML that passed sanitizing and the audit; the raw conversion result is never handed out.
Supported Markdown subset
The tool uses a CommonMark-style subset and keeps GitHub-specific extensions off. The following constructs are converted to HTML.
| Markdown | HTML output |
|---|---|
| One to six hash signs for headings | h1 - h6 |
| Text separated by blank lines | p |
| Asterisks or underscores for emphasis | em |
| Double asterisks for bold | strong |
| Hyphens or numbers for lists | ul, ol, li |
| Greater-than sign for quotes | blockquote |
| Backticks for code and fenced code blocks | code, pre |
| Square and round brackets for links | a (safe addresses only) |
| Three hyphens and line breaks | hr, br |
Tables, strikethrough, task lists, footnotes, bare URL detection and plugins are not part of this version. Unsupported syntax causes no error; it stays as text.
Why raw HTML and images are not converted
Tags such as <script> or <iframe> written inside Markdown are not executed and do not reach the output as HTML; they are escaped as visible text. The image syntax !alt does not become an img tag either and stays as typed. There are two reasons: an image or embedded content loaded from elsewhere connects the browser of whoever opens the page to an address, and unsafe HTML is blocked up front instead of relying on sanitizing alone. Add images after the conversion, in your own site template.
Safe preview and sanitizing
The output passes through two layers. The first is the Markdown parser: raw HTML becomes text, images stay as text, links can only be http, https or a root-relative path starting with /, and code blocks get no class attribute. The second is the DOMPurify sanitizer in your browser, which allows only the tags above and the href attribute on a. The link check runs after the browser has decoded HTML entities; javascript:, data:, blob:, file: and protocol-relative // addresses turn the link into plain text.
The sanitized result then goes through an independent audit: the HTML is parsed again, every tag and attribute is compared with the allowlist, and re-serialization must give the same text. If the audit fails, copy and download stay disabled. The preview runs in an iframe with an empty sandbox attribute (no scripts, forms, popups or same-origin access) under a content security policy that blocks images, styles, fonts, connections and frames. Preview links cannot be clicked; their addresses appear as plain text.
Example conversion
With this tool's converter, the Markdown below gives the HTML in the second box. The heading level, bold text, list and link are kept, and the link address is written in its normalized form. You can try the same input yourself with the Load example button.
# Hello Markdown
Text in **bold** and a [link](https://example.com/guide).
- First item
- Second item<h1>Hello Markdown</h1>
<p>Text in <strong>bold</strong> and a <a href="https://example.com/guide">link</a>.</p>
<ul>
<li>First item</li>
<li>Second item</li>
</ul>Download, limits and common mistakes
- If you open the downloaded HTML file in a browser and click a link, the browser may make a network request to that address; the local-processing promise covers only the conversion and the preview.
- Input can be at most 100 KiB (102,400 bytes) of UTF-8 and output is capped at 1 MiB; these are design limits of this tool.
- Very deeply nested quotes and lists are rejected; the maximum is 20 levels.
- Parsing runs in a separate worker thread with a 3-second time budget; if it is exceeded, the work is stopped and an error is shown.
- If the parser or sanitizer cannot be loaded locally, the tool shows an error, downloads stay disabled and no fallback parser is used.
Sources and verification
Parsing uses the MIT-licensed marked 18.1.1, and sanitizing uses DOMPurify 3.4.17 under its Apache-2.0 option. Versions, licences and security status were reviewed on 25 October 2026 and are kept on this site as local files; no script is loaded from an external server. That the preview makes zero external requests and runs no script was tested with malicious sample texts in a real browser.
Frequently asked questions
Why does raw HTML in Markdown not work?
Raw HTML can run scripts or load outside content in the browser of whoever opens the output, so the tool escapes tags as text. Use Markdown syntax for headings, lists, emphasis, quotes, code and safe links.
Can I add images or tables?
Not in this version. Image syntax and tables are not converted and stay as text. An image would connect the reader's browser to an address, so it is off on purpose.
Is my text sent to a server?
No. Parsing and sanitizing run in your browser. The share link carries only the line break setting; the text never enters the link, storage or any network request.
Are the links in the downloaded HTML safe?
Only http, https and root-relative addresses are kept; everything else becomes plain text. Clicking a link in the opened file still makes a network request to that address, as with any HTML link.
Why does the conversion not run on every keystroke?
Markdown parsing can take time on large or complex text. Convert starts the work in a separate thread with a time budget, so the page keeps responding.