Markdown to HTML converter

Turn Markdown into clean HTML with a live preview. Nothing in it can run a script.

Write some Markdown to see it here.

What this tool does

Write or paste Markdown on the left and you get two things on the right: a live preview of how it renders, and the HTML behind it, ready to copy or to save as a .html file. It covers what most documents use: headings, emphasis, links, images, lists, task lists, tables, quotes and code. It runs in your browser, so a README, a note or a draft never leaves your device.

How to use it

  1. Type or paste Markdown, press "Open a file" for a .md file, or drop a file on the page. "Try an example" loads a small document that uses most of the syntax.
  2. Watch the preview. Switch to the HTML tab to read the code.
  3. Press "Copy HTML" or "Download .html". Turn on "Complete HTML page" to get a whole document with a title, a viewport tag and a few lines of CSS, instead of just the fragment you paste into another page.

For example, this Markdown:

# Hello

Some **bold** text and a [link](https://example.com).

becomes:

<h1>Hello</h1>
<p>Some <strong>bold</strong> text and a <a href="https://example.com" rel="noopener noreferrer">link</a>.</p>

What is supported

Headings with # or with an underline, paragraphs with soft and hard line breaks (two spaces or a backslash at the end of a line), emphasis, strong text and strikethrough, code spans with any number of backticks, fenced code blocks with a language and indented code, blockquotes (nested too), horizontal rules, bullet and numbered lists with nesting, tight and loose spacing and a custom start number, task lists with [ ] and [x], tables with left, centre and right alignment, links with titles, images, and autolinks written as <https://example.com>. Backslash escapes and numeric entities work, plus a short list of named ones such as &amp; and &copy;.

What is not supported

Reference-style links such as [text][1] with a definition further down, footnotes, raw HTML and HTML blocks, bare URLs that are not wrapped in angle brackets, and the less common edge cases of CommonMark, such as unusual lazy continuation lines. Raw HTML in your Markdown is not passed through: it is shown as text. If your document depends on those features, check the preview before you use the output.

Why a script cannot run

The tool never pastes your text into the page as HTML. Markdown is parsed into a tree built only from a fixed list of tags (p, h1 to h6, em, strong, del, a, img, lists, tables, code, blockquote and a few more) and a fixed list of attributes. The preview is made from that tree as ordinary page elements, and the HTML you copy is the same tree written out with every ampersand, angle bracket and quote escaped. Links are checked after entities and invisible characters are removed, so javascript:, data:, vbscript: and file: addresses are dropped in any spelling, such as JaVaScRiPt: or &#106;avascript:. Only http, https, mailto, tel, relative paths and #anchors are kept for links, and only http, https and relative paths for images. A link that is not allowed becomes plain text. The tests run dozens of hostile inputs through both the HTML and the preview.

Images in the preview

An image in your document points at some other server, and showing it would make your browser contact that server. So the preview shows a small placeholder with the alt text, and loads images only when you turn on "Load images in the preview". The HTML you copy always contains the image tags either way.

Good to know

The HTML is plain and unstyled, so it takes on the styles of the page it is pasted into. Links get rel="noopener noreferrer". The preview opens links in a new tab so that clicking one does not replace the tool. Size limit: two million characters, and the preview shows the first two thousand blocks of a very long document while Copy and Download hold everything. To tidy other markup, see the XML formatter, and to compare two versions of a document use the diff checker. The text toolkit counts words and changes case.

Frequently asked questions

Can the HTML or the preview run a script?

No. The text is parsed into a tree of allowed tags and attributes, never inserted as raw HTML. Raw HTML in the input is shown as text, and links with javascript:, data: or other unlisted schemes are removed, in any capitalisation or encoding.

Which Markdown flavour is this?

A CommonMark-like subset with the GitHub extras that most people use: tables, task lists and strikethrough. Reference-style links, footnotes, raw HTML and bare-URL autolinks are not supported.

Why does my raw HTML show up as text?

Because passing it through is how scripts get into a page. If you need an HTML block, write it in the final page yourself and use the Markdown for the rest.

Why are images not shown in the preview?

Showing one means fetching it from another server. They load only when you turn on the switch under the input. The copied HTML has the image tags either way.

Is my Markdown uploaded anywhere?

No. Parsing, the preview and the HTML all happen in your browser, and nothing leaves your device.