Toolvore

Markdown to HTML

Convert Markdown source into raw HTML you can copy.

This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.

Converts Markdown source into the raw HTML a browser actually renders, passing it through DOMPurify first so the copied markup carries no scripts or event handlers.

How to use it

  1. 1Replace the sample text in the Markdown box with your own.
  2. 2The HTML Output box fills in as you type — use Copy to take it.
  3. 3Scroll to Preview to confirm the markup renders the way you expected.

Example

Input
Line one Line two
Output
<p>Line one<br>Line two</p>

GitHub-flavoured line breaks are switched on, so a single newline becomes a <br>. Strict CommonMark would fold those two lines into one paragraph with a space between them — worth knowing if the HTML is going somewhere that expects CommonMark.

What happens to your data

Parsing and sanitising both happen in the page — nothing is posted to a server. The sanitising step is why a raw <script> tag written in your Markdown will not survive into the copied output.

Last updated August 2026

Convert Markdown into clean HTML you can paste into a CMS, email, or web page. Markdown is fast to write; HTML is what browsers render. This tool bridges the two, turning headings, lists, links, code blocks, and emphasis into valid markup instantly.

Write or paste Markdown and copy the generated HTML.

Two jobs get called converting Markdown to HTML, and only one is this. The first is a fragment — the headings, paragraphs and lists that sit inside a page someone else built, which is what a CMS field wants. The second is a whole page, with a doctype and styles of its own. What comes out here is the fragment: it starts at your first heading, ends at your last paragraph, and carries no styling.

That boundary is also where the format stops. Markdown has no syntax for a class, an id, a width or a colour, so a layout needing a wrapper round every section cannot come from the source — write that part as HTML among the Markdown, or add it afterwards.

The mistake that catches people out most is front matter. A fence of three hyphens with title and tags inside belongs to static site generators, not to the language, so the opening fence becomes a horizontal rule and the fields underneath a heading. Strip it first.

How it works

Toolvore renders Markdown to HTML in your browser — your content never leaves your device. The parser is marked in GitHub Flavoured mode with line breaks turned on, which is a meaningful pair of choices rather than a default: gfm gives you tables, strikethrough, task lists and bare URLs turned into links, and breaks means a single newline becomes a line break instead of being folded into the paragraph, the way it behaves in a comment box rather than the way the original Markdown specification defined it. That second one is the difference people notice when the same text renders differently here and in a static site generator. The output is then sanitised before it is shown, so a script tag or an event handler written into the source is stripped rather than run — the preview is a preview, not an execution.

Common use cases

  • Publishing Markdown notes or docs into a CMS that expects HTML
  • Converting README content for a web page
  • Producing HTML email bodies from Markdown drafts
  • Previewing how Markdown will render as markup
  • Converting Markdown written by somebody else into markup that is safe to publish

Frequently asked questions

Is the HTML output clean?

Yes — it produces standard, semantic HTML for common Markdown features.

Is my content uploaded?

No — conversion is entirely local to your browser.

Why does my Markdown put a line break after every line?

Because the conversion runs with line breaks turned on, which is how GitHub and most chat apps behave and not what the CommonMark specification says. Under the plain rules a single newline inside a paragraph counts as a space, and you have to end a line with two spaces, or a backslash, to force a break. With the option on, every newline becomes a break element instead. It shows up most in text an editor or a mail client hard-wrapped at eighty columns: what reads as one paragraph in the source arrives as a stack of short lines. The fix is in the source rather than the output — join each paragraph onto one long line and let the browser wrap it.

Can I write HTML inside Markdown?

Yes, and it survives — raw markup is passed through rather than escaped, so a details and summary block, a table you wrote by hand, or a span carrying an inline style attribute all come through intact. Two rules decide what you get. Markdown nested inside a block-level element is only parsed when you leave a blank line around it; written tight against the opening tag, your asterisks stay asterisks. And the sanitiser has the last word: class, id and style attributes are kept, while script tags, embedded frames and on-event handlers are dropped, along with the target attribute that makes a link open in a new tab.

Why does the HTML look unstyled once I paste it somewhere else?

Because the markup carries structure and nothing else. Headings, lists, quotes and code blocks arrive as bare elements with no CSS attached, so their appearance is decided by the stylesheet of wherever they land. The preview on this page is styled by the page rather than by the HTML you are copying, which is why the two can differ — the preview puts no borders on a table at all, since it styles only headings, links, lists, quotes and code. Email is where this bites hardest: many clients ignore a stylesheet and honour only inline style attributes, so markup that behaves in a CMS can arrive in an inbox as plain text with large headings.

Why is my table not converting?

Tables were never part of the original Markdown syntax; they arrived with GitHub Flavoured Markdown, and a parser renders them only when it is running that flavour. This one is. The syntax is strict about one thing: the row of hyphens under the header is what makes it a table, and without that row you get a paragraph full of pipe characters. Colons in that row set alignment, which comes through as an align attribute on each cell rather than as CSS. The format is limited beyond that too — a cell holds a single line, nothing spans two columns, and anything more structured has to be written as HTML by hand.

Why did part of my text turn italic in the middle of a word?

Asterisks and underscores both mean emphasis, but they are not interchangeable. A pair of asterisks inside a word still emphasises, so an expression like 2*3*4 loses its stars and gains an em element, while a pair of underscores inside a word does not, which is why snake_case_identifiers come through untouched. The distinction exists so that code-shaped words are not mangled, and it is a good reason to type emphasis with underscores when the surrounding text is technical. To keep a literal asterisk, put a backslash in front of it, or wrap the whole token in backticks so it becomes code and nothing inside it is interpreted at all.

Is it safe to convert Markdown that somebody else wrote?

Treat it as untrusted markup, because that is what it is. Markdown permits raw HTML by definition, so a comment, a form submission or a pull request body can carry a script tag or a link whose address is a javascript URL, and a converter that does nothing but turn headings into headings will hand that straight to your page. Here the output is sanitised before it reaches you, and what was stripped is named underneath. If you are converting by hand, once, that is the end of it. If you are building something that renders other people's Markdown automatically, sanitise after rendering rather than escaping the source, which breaks the syntax instead.