200 tools

Code & JSON Tools · · 5 min read

How to Convert Markdown to HTML (and Back) Online

Convert Markdown to HTML or HTML back to Markdown with a live rendered preview, using the HTML ⇄ Markdown tool — no server, no account needed.

To convert Markdown to HTML, paste it into HTML ⇄ Markdown — it turns headings, bold and italic text, links, images, lists, blockquotes and code into clean HTML instantly, with a rendered preview next to the output, and the same tool converts HTML back into Markdown too.

What this tool does and why it matters

Markdown is for writing; HTML is for rendering. You need both directions depending on where the text is going — Markdown source into a CMS field that only accepts HTML, or HTML copied from somewhere else turned back into Markdown you can commit to a README or paste into a Markdown editor. Toolbench's HTML ⇄ Markdown tool does both in one page: pick a direction with the pill toggle, paste your text, and read the result from the output panel. A third panel renders the resulting HTML live, so you can see exactly how it will look before you use it anywhere.

How to convert with Toolbench

  1. Open HTML ⇄ Markdown.
  2. Pick a direction: Markdown → HTML (the default) or HTML → Markdown.
  3. Paste your text into the input panel.
  4. Read the converted result in the output panel, and check the Rendered preview panel on the right to see how the HTML actually displays.
  5. Click Copy to copy the output, or use Send to → to send it straight into another tool.
  6. Use ⇄ Swap output into input to flip direction and keep working on the result — useful for checking a round trip.

Example: Markdown to HTML

This Markdown:

# Weekly notes

Shipped the **new pricing page** and fixed *two* bugs. See the [brief](https://example.com).

- Launch email
- Update docs

> Ship small, ship often.

produces this HTML:

<h1>Weekly notes</h1>
<p>Shipped the <strong>new pricing page</strong> and fixed <em>two</em> bugs. See the <a href="https://example.com">brief</a>.</p>
<ul>
  <li>Launch email</li>
  <li>Update docs</li>
</ul>
<blockquote>Ship small, ship often.</blockquote>

The Rendered preview panel shows this HTML displayed as a page would show it — a heading, a paragraph with bold and italic text and a working link, a bulleted list, and a quoted line — so you can confirm it looks right before copying it out.

Example: HTML to Markdown

Switch direction and paste HTML like this:

<h2>Release notes</h2>
<p>This update adds <strong>dark mode</strong> and fixes <em>3</em> bugs. Read the <a href="https://example.com/notes">full notes</a>.</p>
<ul>
<li>Dark mode toggle</li>
<li>Faster search</li>
</ul>
<blockquote>Ship small, ship often.</blockquote>

and it comes back as:

## Release notes

This update adds **dark mode** and fixes *3* bugs. Read the [full notes](https://example.com/notes).

- Dark mode toggle
- Faster search

> Ship small, ship often.

Reference: what's supported

Markdown HTML Notes
# through ###### <h1>–<h6> Heading level matches the number of # characters
**bold** <strong> Only the double-asterisk form; __bold__ isn't recognized
*italic* <em> Only the single-asterisk form; _italic_ isn't recognized
`code` <code> Inline code span
```fenced block``` <pre><code> No syntax highlighting is applied
[text](url) <a href="url"> Standard link syntax
![alt](url) <img alt="" src=""> Standard image syntax
-, *, or + <ul><li> Any of the three bullet markers starts an unordered list
1. or 1) <ol><li> Numbered list
> text <blockquote> One level of quoting
--- or *** (3+ characters, alone on a line) <hr> Always a horizontal rule — it's not read as a heading underline

Going the other way, <h1>–<h6>, <p>, <strong>/<b>, <em>/<i>, <code>, <pre>, <a>, <img>, <ul>/<ol>, <blockquote>, <hr> and <br> (converted to a trailing double-space line break) all map back to their Markdown equivalents. <script>, <style> and <head> content is dropped, and any other tag is unwrapped to keep its inner text.

Tips and common mistakes

  • Raw HTML inside Markdown gets escaped, not passed through. If you type <br> or any other tag directly into the Markdown input, the < and > are escaped to &lt;/&gt; and show up as literal text in the output rather than becoming real HTML.
  • Nested lists aren't nested. Indenting a bullet or numbered item doesn't create a sub-list — every -, *, +, or numbered line becomes a flat item in the same list, regardless of leading whitespace.
  • A line of three or more dashes is always a horizontal rule. Markdown sometimes uses --- under a line of text to mean "this was a level-2 heading," but this tool always converts it to <hr>, never to a heading.
  • There's no table or strikethrough support. Pipe-delimited tables and ~~strikethrough~~ pass through as plain text rather than being converted.
  • The Rendered preview strips script tags and inline on... event attributes before displaying either direction's HTML, so pasted scripts won't run in the preview.
  • HTML → Gutenberg Blocks — turn HTML or Markdown into WordPress block-editor markup instead of plain HTML.
  • Text Cleaner — strip stray HTML tags, smart quotes, and extra whitespace from pasted text before converting it.
  • Text Diff — compare two versions of a converted document to see exactly what changed.
  • Word Counter — check the length of your Markdown or HTML before or after converting.

Frequently asked questions

Does it support __bold__ and _italic_ with underscores?

No. Bold only recognizes **text** and italic only recognizes *text*. Underscore-based emphasis passes through unconverted.

Can I use raw HTML tags inside my Markdown?

No. Any < or > you type in the Markdown input is escaped before the Markdown rules run, so a raw tag like <br> ends up as literal text in the output, not a real HTML element.

Why did my --- turn into a horizontal rule instead of a heading?

A line made up of three or more dashes or asterisks is always converted to <hr> by this tool, even if it follows a line of text the way Markdown's "setext" heading style does elsewhere.

What happens to script or style tags when converting HTML to Markdown?

They're dropped entirely — their content doesn't appear in the Markdown output. The live preview also strips script tags and inline event-handler attributes before rendering, for both conversion directions.

Is my text sent to a server to convert it?

No. Both directions run entirely in your browser. Signed-out visitors have nothing saved; if you're signed in, your input syncs privately to your account.

More guides

All guides →