Markdown to HTML converter
Paste Markdown or plain text. You get the HTML code and a preview, with scripts and other unsafe parts removed. Nothing is uploaded.
Free, no account needed. Updated .
Short answer
To convert Markdown to HTML, a parser turns each Markdown mark into an HTML tag: # becomes h1, **bold** becomes strong, and a list becomes ul and li. This converter does that in your browser with marked and GitHub-flavored Markdown (tables, task lists, strikethrough), then removes scripts and event handlers with DOMPurify, so the HTML is safe to preview and paste.
How to convert Markdown to HTML
- Select the input format. Use Markdown for text with
#headings,**bold**and lists. Use Plain text for an email, a note or anything without Markdown marks. - Paste the text and select Convert to HTML. The converter loads on the first conversion and runs in your browser. Up to 500,000 characters at a time.
- Check the preview, then copy or download. The preview shows the HTML as a browser renders it. The HTML box under it holds the code. Download gives you a
.htmlfile.
What each Markdown mark becomes
Markdown is a set of plain text marks that stand for HTML tags. The converter follows CommonMark, the common specification, plus GitHub-flavored Markdown (GFM), which adds tables, task lists and strikethrough.
| Markdown | HTML |
|---|---|
| # Title | <h1>Title</h1> (## for h2, down to ###### for h6) |
| **bold** and *italic* | <strong>bold</strong> and <em>italic</em> |
| - item | <ul><li>item</li></ul> (1. item gives <ol>) |
| [text](https://example.com) | <a href="https://example.com">text</a> |
|  | <img src="logo.png" alt="alt"> |
| `code` | <code>code</code> |
| A pipe table | <table> with <thead> and <tbody> |
| - [x] done | A disabled, checked checkbox in the list item |
| ~~old~~ | <del>old</del> |
A blank line separates paragraphs. A single line break inside a paragraph stays a space when the browser shows it, which is the Markdown rule. If your text uses single line breaks on purpose, for example in an address or a poem, select Single line breaks become <br>.
Example
This Markdown from a help article:
## Returns
You can return an item within **30 days**.
- Keep the receipt
- [Read the terms](https://example.com/terms)becomes this HTML:
<h2>Returns</h2>
<p>You can return an item within <strong>30 days</strong>.</p>
<ul>
<li>Keep the receipt</li>
<li><a href="https://example.com/terms">Read the terms</a></li>
</ul>Why the converter removes some HTML
Markdown lets you write raw HTML between the marks, and a converter passes it through. That is useful for a <details> block or a table with merged cells. It is also how a copied file can carry code that runs when the HTML is shown: a <script> tag, an onerror handler on an image, or a link to javascript:.
So every result goes through DOMPurify, a widely used HTML sanitizer, before it reaches the preview or the HTML box. It removes scripts, event handlers and script links. The converter also removes style tags and attributes, forms, buttons and iframes, because they can change or cover the page that shows the HTML. When it removes something, the result says how many parts it removed, so you know the output is not the same as your input. SVG and MathML are removed too.
If you need inline styles or an embed in the final page, add them in your CMS or template after you paste. Do not turn off sanitizing for Markdown that other people wrote.
Plain text to HTML
Plain text mode does not read any Markdown. It makes three changes and no others:
- Escapes special characters.
<,>,&and quotes become entities, so text such as "5 < 10" shows as written and cannot become a tag. - Makes paragraphs. Each block of text between blank lines becomes a
<p>. - Keeps line breaks. A single line break becomes
<br>.
Use it for a support reply, a notice or a product description that you want to paste into an HTML field without surprises. Asterisks and number signs stay as they are.
What it does not do
- No full page. The output is the content only, without
<html>,<head>or a style sheet. Paste it into a page that already has them. - No extensions. Footnotes, math, Mermaid diagrams, emoji shortcodes and heading IDs are not part of CommonMark or GFM, so they stay as text.
- No syntax colors. Code blocks get a
language-class (for examplelanguage-js) that a highlighter on your site can use, but no colors. - Relative links stay relative. A link to
/pricingworks only on the site where you paste the HTML.
Markdown, HTML and your help content
Many teams write help articles in Markdown, in a docs repository or a note app, and publish them as HTML. Clean HTML with real headings and lists is also what crawlers and AI assistants read most reliably: a heading tag tells them where a topic starts. Bold text that only looks like a heading does not.
To go the other way, use the HTML to Markdown converter. For Word files, use Word to Markdown, and for PDFs, PDF to Markdown. If you want a customer support chatbot that answers from your published help pages, Paperlink AI imports them from your website and says when the pages do not hold the answer.
Frequently asked questions
Is the HTML safe to paste into my website?
The converter removes script tags, event handlers such as onclick, javascript: links, styles, forms and iframes before it shows the preview, and it tells you how many parts it removed. Also check the result against the rules of your own site, for example which embeds you allow.
Which Markdown syntax does it support?
CommonMark plus GitHub-flavored Markdown: tables, task lists, strikethrough and web addresses that become links. Footnotes, math and Mermaid diagrams are not converted and stay as text.
How do I convert plain text to HTML?
Select Plain text. Characters such as < and & are escaped so they show as written, a blank line starts a new paragraph, and a single line break becomes <br>. No other formatting is added.
Does the output include html and body tags?
No. You get the HTML for the content only, ready to paste into a page, a CMS or an email template. The downloaded .html file still opens in any browser.
Can I keep raw HTML inside my Markdown?
Yes. Markdown allows HTML blocks such as details or table, and the converter keeps them. Scripts, styles, forms and iframes are removed, because they can change or take over the page that shows the HTML.
Is my Markdown sent to a server?
No. marked and DOMPurify run in your browser. The text is not sent to our servers, and we record only that a conversion ran, never its content.
Newsletter
Support notes, once a month.
One email with what we learn about help centers, honest AI answers and support teams. Unsubscribe at any time.
Related
- Free toolHTML to MarkdownPaste HTML or open an .html file. You get Markdown with the headings, links, lists, tables and code, ready to copy or download.
- Free toolWord to MarkdownDrop a .docx file. You get Markdown with the headings, lists, tables and links from Word, ready to copy or download. The file is not uploaded.
- Free toolPDF to MarkdownDrop a PDF. You get clean Markdown with headings, lists and paragraphs, ready to copy or download. The file is not uploaded.