Skip to content

HTML to Markdown and Markdown to HTML converter, free, in your browser

To convert HTML to Markdown, each HTML element is mapped to its Markdown equivalent: headings become # lines, <strong> becomes **bold**, lists become - items, and tables become pipe tables. The reverse direction parses Markdown and emits HTML. This converter runs locally in your browser, supports GitHub-flavoured Markdown (tables, strikethrough, task lists, fenced code) and lets you choose heading and bullet styles.

C14HTML ↔ Markdown — TabbyTools
Ready0 B sent to server

Your files never leave your device. Processing happens in your browser. How that works.

How it works

  1. Paste HTML or Markdown.
  2. Choose the direction (auto-detected) and options such as heading style.
  3. Copy the result or share the URL.

Runs as JavaScript inside this tab. Turn off your connection after the page loads and it still works.

HTML to Markdown mapping

Element mapping

HTML Markdown (GFM)
<h1>–<h6> # to ###### (or underlined with ===/--- for h1/h2 in setext style)
<p> Paragraph separated by a blank line
<br> Two trailing spaces or a backslash before the line break
<strong>, <b> **bold**
<em>, <i> _italic_ or *italic*
<del>, <s>, <strike> ~~strikethrough~~
<code> `inline code`
<pre><code> Fenced block ``` with the language taken from class="language-…"
<a href> [text](url "title")
<img> ![alt](src "title")
<ul> / <ol> - item / 1. item, nested by indentation
<input type="checkbox"> in a list - [ ] / - [x] task list
<blockquote> > quoted
<hr> ---
<table> Pipe table (needs a header row); alignment from align attributes
<div>, <span>, <section> Dropped; content kept
<script>, <style>, <iframe> Removed entirely
Other unknown elements Content kept, tags dropped, unless “keep unknown tags” is on

Markdown to HTML

The reverse direction follows GitHub-flavoured Markdown (GFM): tables, task lists, strikethrough, autolinks and fenced code are supported. Output is sanitised: <script>, event handlers and javascript: URLs are removed, so it is safe to insert into a page.

Things that do not round-trip

  • Inline styles, classes and ids have no Markdown equivalent and are discarded.
  • Tables without a header row, or with merged cells (colspan, rowspan), cannot be expressed as pipe tables; they are emitted as HTML.
  • Nested block elements inside table cells (lists, paragraphs) are flattened.
  • Definition lists, <figure>/<figcaption>, <details> have no standard Markdown; enable “keep unknown tags” to preserve them as HTML, which most Markdown renderers pass through.

Choosing options

  • ATX headings (## Title) are universal. Setext underlines exist only for two levels and are rarely preferred now.
  • Bullet marker: - is the most common; some linters (markdownlint) enforce one style per document.
  • Emphasis: _ avoids ambiguity with bold **; * matches CommonMark examples. Both render identically.

Worked examples

HTML → Markdown

<h1>TabbyTools</h1>
<p>Free tools that <em>never</em> upload your files. <a href="https://tabbytools.com">Try them</a>.</p>
<ul><li>Private</li><li>Batch by default</li></ul>
<table><thead><tr><th>Tool</th><th>Cluster</th></tr></thead>
<tbody><tr><td>Morse</td><td>Text</td></tr></tbody></table>
# TabbyTools

Free tools that _never_ upload your files. [Try them](https://tabbytools.com).

- Private
- Batch by default

| Tool | Cluster |
| --- | --- |
| Morse | Text |

Markdown → HTML

- [x] Ship text tools
- [ ] Ship converters

~~Old~~ **New**
<ul>
<li><input checked disabled type="checkbox"> Ship text tools</li>
<li><input disabled type="checkbox"> Ship converters</li>
</ul>
<p><del>Old</del> <strong>New</strong></p>

Pasting from a web page

Copy content from a browser, paste into the input: rich clipboard content arrives as HTML in most editors, but the input box receives plain text. To convert a page, use the browser’s View source or Copy outer HTML from the developer tools, then paste here.

Cleaning Word or Google Docs HTML

Exported HTML from word processors is full of <span style> wrappers. Converting to Markdown strips all of it, leaving headings, bold, italics, lists and links, which is usually what you wanted.

Frequently asked questions

Which Markdown flavour is produced?

GitHub-flavoured Markdown (GFM), which works on GitHub, GitLab, Notion, Obsidian and most static site generators.

What happens to HTML that has no Markdown equivalent?

Elements such as <div>, <span> and inline styles are dropped and their text content is kept. Unknown elements can optionally be kept as raw HTML.

Are images and links preserved?

Yes. <a> becomes [text](url) and <img> becomes ![alt](src).

Is the HTML output safe to paste into a page?

Markdown to HTML output is sanitised to remove scripts and event handlers.

HTML ↔ Markdown · last updated · changelog · part of Canned Tuna