All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Image Tools Video Tools Audio Tools Subtitle Tools Font Tools
Analyze Tools Clean Tools Compress Tools Convert Tools Edit Tools Extract Tools Generate Tools Merge Tools Organize Tools Redact Tools Repair Tools Split Tools
Analyze Tools Clean Tools Compare Tools Convert Tools Extract Tools Generate Tools Merge Tools Transform Tools Validate Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Markdown ↔ HTML Converter

Convert Markdown source to semantic HTML, or HTML source back to Markdown - with a source output and a sanitized rendered preview, entirely in your browser.

Convert Markdown to HTML or HTML to Markdown

Enter Markdown or HTML in the input area. The tool converts it as you type and puts the result in Source output. Use Rendered preview to inspect displayed HTML content.

  1. Enter content in the box marked Paste Markdown or HTML here....
  2. Choose Auto-detect, Markdown → HTML, or HTML → Markdown.
  3. Review the converted text in Source output. For Markdown-to-HTML conversion, select Rendered preview to inspect the generated HTML.
  4. For HTML-to-Markdown conversion, read the Unsupported HTML (no Markdown equivalent, content kept as text) warnings when they appear.
  5. Use Copy for the converted source, or Download to save it.

Load content and choose a direction

Paste or type content directly, or select the upload icon with the tooltip Upload. It accepts .md, .markdown, .html, .htm, text/plain, text/html, and text/markdown. You can also drop a file into the input area, where the interface shows Drop file. Only the first selected or dropped file is read.

Auto-detect switches to HTML → Markdown when the input contains two or more HTML-like tag matches. Otherwise, it treats the input as Markdown. Select a direction manually when detection is uncertain.

Review Source output and Rendered preview

Source output is selected by default and contains the converted text in a read-only output area. Markdown → HTML places formatted HTML there and shows that generated HTML in Rendered preview. HTML → Markdown places Markdown in Source output, while the preview shows sanitized HTML from the parsed input.

The preview is sanitized before display. It removes <script>, <style>, <iframe>, <object>, <embed>, and <form> elements, plus onerror, onload, onclick, and onmouseover attributes. It may therefore differ from the original HTML.

Supported Markdown and HTML content

  • Headings: # through ###### and <h1>-<h6>.
  • Lists: ordered and unordered lists, including nesting and GitHub-style task lists (- [ ] / - [x]) backed by checkbox inputs.
  • Links and images: [text](url) / <a href> and ![alt](url) / <img>, including optional titles.
  • Tables: pipe-delimited Markdown tables and <table>/<tr>/<td> markup.
  • Fenced code: triple-backtick code blocks with language hints, mapped to <pre><code class="language-*">.
  • Blockquotes: >-prefixed lines and <blockquote> elements.
  • Inline formatting: bold, italic, strikethrough, and inline code.
  • Horizontal rules: --- and <hr>.

Warnings and conversion limits

HTML-to-Markdown conversion preserves supported content only. Markdown cannot reproduce all HTML layout, styling, attributes, embeds, forms, or custom elements. <script> and <style> are removed before conversion; <template> and <noscript> are also dropped by the converter.

Some unsupported tags are listed in the Unsupported HTML (no Markdown equivalent, content kept as text) warnings panel. <div> and inline elements such as <span>, <font>, <small>, <sub>, <sup>, <abbr>, <mark>, and <u> are passed through without individual warnings. Classes, inline styles, and many attributes may be lost without being reported separately. For tables, the first row becomes the Markdown header. The result is not guaranteed to retain the original HTML structure or semantics.

Copy or download the converted result

The controls act on the converted source in Source output. Copy places that text on the clipboard. Download creates converted-output.md for Markdown output or converted-output.html for HTML output. If the input is empty, the tool clears the output, preview, and warnings. Copy and Download do nothing when Source output is empty.

Browser processing and preview safety

Parsing, conversion, and reading an uploaded file occur in your browser with JavaScript. This tool's conversion script does not make a user-content request with fetch or XMLHttpRequest. The preview is sanitized, so it may not reproduce unsafe or unsupported HTML exactly.

Frequently Asked Questions

How is this different from the Markdown Diff or HTML Diff tools?

Markdown Diff and HTML Diff compare two documents written in the same markup language and report what changed. This tool converts one document from Markdown to HTML or HTML to Markdown, changing the markup language while trying to preserve the same meaning.

What happens to HTML that has no Markdown equivalent?

Supported content is converted, while unsupported layout, styling, attributes, embeds, forms, and custom elements may be flattened, dropped, or reported in the warnings panel. Some elements, including <div> and several inline tags, pass through without individual warnings; classes and styles may be lost.

Is the rendered preview safe if the HTML contains a script tag?

Yes. The preview is sanitized with DOMPurify, which strips scripts, styles, iframes, embeds, forms, and the handled inline event attributes before rendering. The preview may not exactly reproduce the original HTML.

Which Markdown features are supported?

Headings, paragraphs, bold and italic text, links, images, ordered and unordered lists (including nested and task lists), blockquotes, fenced code blocks with language hints, tables, horizontal rules, and inline code.

Is my content sent to a server?

Parsing, conversion, and file reading happen in your browser using JavaScript. The conversion script contains no fetch, XMLHttpRequest, or user-content upload request.

Related Tools

10 views