Markdown ↔ HTML

Preview Markdown and convert to and from HTML.

Free. Runs in your browser: nothing you enter or open is uploaded.

Result

Markdown is read with marked (MIT licence) and the preview is built element by element from what it finds, never by pasting HTML into the page. HTML inside your Markdown is kept only for a safe list of formatting tags; scripts, styles, event handlers and javascript: links are removed. The HTML to Markdown converter is a small script on this page that handles headings, lists, links, images, emphasis, code, quotes and tables.

How to use it

  1. Pick the direction: Markdown to HTML, or HTML to Markdown.
  2. Type, paste or open a file. The preview and the converted code update as you type.
  3. Copy the HTML or the Markdown, or download it as a file.

Questions

Which Markdown does this follow?

CommonMark with the GitHub additions: tables, task lists with [ ] and [x], strikethrough with two tildes, and links written as plain addresses. Untick GitHub extras for plain CommonMark.

Why did some of my HTML disappear?

Raw HTML in Markdown is filtered for safety. Formatting tags such as b, i, sup, kbd, details and tables are kept; script, style, iframe, forms and any on... attributes are removed, which is what most sites that accept Markdown do too.

Does HTML to Markdown keep everything?

It converts the parts Markdown can express. Colours, fonts, classes and layout have no Markdown equivalent and are dropped, and the text inside them is kept.

Is my text sent anywhere?

No. Both conversions run in your browser.