Skip to content
I Hate Online Tools

Markdown to HTML

Convert Markdown to clean HTML and back.

Runs in this tab. The file stays here.

HTML

The HTML is shown as text and is not sanitized. Clean it before putting it on a live page.

This runs in your browser. Nothing is uploaded.

About Markdown to HTML

Turns Markdown into raw HTML source you can copy, or HTML back into Markdown, entirely in your browser.

This page is about the output text, not the look. Paste Markdown on the left and the right-hand box fills with the HTML source, tags and all, ready to copy into a CMS, an email template, or a static page. Switch direction and you can paste HTML and get Markdown back. A Download button writes either result to a file.

The Markdown preview does the opposite job. It shows how Markdown renders as a formatted page, sanitised, and nothing in it is meant for copying markup. Here the output is a text box of angle brackets and nothing renders, so if you want to see how your document looks, use the preview, and if you want the HTML itself, use this one. The Markdown side supports the usual set: headings, lists, links, images, code blocks, tables, and emphasis. Raw HTML in the Markdown passes through as is.

Going from HTML to Markdown is a lossy trip by nature. The converter understands headings, bold and italic, lists, links, images, quotes, code, and horizontal rules. Tables, inline styles, classes, and layout are flattened to their text. And scripts, which Markdown has no way to represent, come out as their text content, not as markup. Check the result before you rely on it.

How to use Markdown to HTML

  1. 1Choose the direction: Markdown to HTML, or HTML to Markdown.
  2. 2Paste your input in the left box.
  3. 3Copy the output from the right, or download it as a file.

What it won't do

  • HTML to Markdown handles headings, emphasis, lists, links, images, quotes, and code, but not tables or styling.
  • The HTML output is not sanitised.
  • One document at a time, pasted as text.

Common questions

Is the HTML output sanitised?

No. The output is shown and copied as raw text, exactly as produced. If your Markdown contained a script tag, it'll be in the HTML. Sanitise it on your side before putting untrusted content on a live page.

How is this different from Markdown preview?

The preview renders a sanitised, formatted page next to your Markdown and is for reading. This page gives you the HTML source as copyable text and nothing is rendered. They use the same Markdown family but serve different jobs.

Will HTML to Markdown keep my tables?

No. The converter has no table support, so table cells turn into plain text. Rebuild them with the Markdown table generator if you need the table back.

Can I convert several files at once?

No. It works on one block of pasted text. Paste, convert, copy or download, then repeat.

Related tools

Why this one doesn't upload your file

There is no server to upload to. This page is a static file, and the work happens in your browser using the same graphics and WebAssembly code that renders every other site you visit. Your file is read from disk into memory, processed, and handed back as a download. Once the page has loaded you can disconnect from the network entirely and it keeps working. The longer explanation

Install the app