Markdown to HTML
Turn Markdown into HTML with a live preview and escaped output.
Turn a page of HTML back into readable Markdown.
HTML to Markdown converts markup back into the shorthand, which is the direction you need when moving content out of a CMS and into a static site, a documentation repository or anywhere that stores text as Markdown.
Conversion uses the browser's own HTML parser and walks the resulting tree, so the structure it sees is the structure a browser sees, including markup that is technically invalid but renders anyway. Headings, paragraphs, emphasis, links, images, ordered and unordered lists with nesting, blockquotes, inline code, pre blocks and tables all map to their Markdown equivalents.
Elements with no Markdown equivalent are handled by choice rather than by accident. You can keep them as inline HTML, which Markdown permits, or strip them to their text content. Scripts, styles and comments are removed either way, because nobody wants them in a Markdown document.
The html to markdown is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:
You choose. Markdown allows inline HTML, so keeping them is valid and lossless. Stripping them to their text content gives a cleaner document at the cost of some structure.
Yes, into Markdown table syntax, provided the table is reasonably regular. Tables with merged cells have no Markdown equivalent and are kept as HTML.
No, and it cannot be. HTML can express far more than Markdown. Classes, inline styles, data attributes and complex nesting have nowhere to go. What survives is the document structure, which is usually what you wanted.
A pre block containing a code element becomes a fenced block. If the code element carries a language class, the language is written onto the fence so highlighting still works.
No. Browsers block requests to other domains, so copy the HTML yourself using view-source or developer tools.
No. Parsing and conversion happen in your browser.
If the html to markdown is not quite what you need, these other free tools solve closely related problems.
Turn Markdown into HTML with a live preview and escaped output.
Pretty-print HTML with consistent indentation, or collapse it back down.
Tidy messy pasted text: extra spaces, empty lines, breaks and special characters.
Extract all URLs from text or HTML, with anchor text and filtering options.
A three-pane editor with a live preview that updates as you type.