HTML to Markdown

Turn HTML pages and snippets into clean Markdown.

Runs in your browser Instant No sign-up
Headings
Bullets
HTML

Paste, type or drop a file — output appears as you type.

Waiting for input
Processed locally · nothing is uploadedProcessed locally

How to use the HTML to Markdown converter

  1. Paste HTML into the left pane: a snippet, an email body or a whole saved page. The Markdown updates as you type.
  2. Headings: # ATX style for every level, or Underlined (setext) for h1 and h2.
  3. Bullets: choose -, * or + for unordered lists.
  4. Links (under More options): Inline [text](url) or Reference [text][1] with the URLs collected at the end.
  5. Copy the result, or Download it as page.md.

Example

The sample, a short release-notes article with a list, a code block, a table and a tracking script, becomes:

# Release notes

Version **2.4** adds *pipelines* and a [new page](https://tidypane.dev/pipeline/).

## Changes

- Faster JSON formatting
- Share links for every tool
  - secrets are never included

| Tool | Status |
| --- | --- |
| Formatter | Stable |
| Pipelines | Beta |

The <script> is gone, the nested list is indented under its parent item, and the <pre><code class="language-bash"> block becomes a fenced block tagged bash.

What is converted

  • Headings h1–h6, paragraphs, <br> line breaks and horizontal rules.
  • Inline formatting: bold, italic, strikethrough, inline code (with enough backticks when the code itself contains backticks) and keyboard input.
  • Lists: nested lists, ordered lists keep their start number, and items with several paragraphs become loose lists. Sub-lists written as siblings of <li> (common invalid HTML) still attach to the right item.
  • Code blocks: whitespace is kept exactly, and the fence grows if the code contains a run of backticks.
  • Tables become GFM tables: the first row is the header, colspan cells are padded, pipes inside cells are escaped and line breaks become <br>. The caption goes above the table.
  • Blockquotes, definition lists (as bold terms with : definition), links and images with titles.

The parser is forgiving like a browser: unclosed <p>, <li> and <td> tags, stray end tags and entities such as &eacute; or &#x2014; are all handled. To tidy the HTML first, use the HTML Formatter; to go the other way, use Markdown to HTML. If you only need the readable text, HTML to Text strips every tag but keeps the layout.

Limits

Inline styles, classes and layout (columns, colors, fonts) have no Markdown equivalent and are dropped. Elements Markdown can’t express, such as <sup>, keep their text only. Tables nested inside table cells are flattened into the cell’s text.

Frequently asked questions

Which Markdown flavor does it produce?

GitHub-flavored Markdown (GFM): ATX headings, fenced code blocks, ~~strikethrough~~ and pipe tables. Everything except the tables is also plain CommonMark, so the output works in GitHub, GitLab, VS Code, Obsidian and most static-site generators.

What happens to scripts, styles and navigation?

They are dropped. Script and style contents never appear in the output, and the head, nav menus, forms, buttons, iframes and embedded SVG are left out too, so converting a whole saved page gives you the article rather than the page chrome. Nothing in the HTML is ever executed.

Why are some characters escaped with a backslash?

Text that happens to contain Markdown syntax would otherwise change meaning: a literal *star*, [brackets], a backtick, a < that looks like an HTML tag, or a line starting with # or 1. is escaped so it renders exactly as the original text. Underscores inside words like snake_case are left alone because GFM never treats them as emphasis.

Are javascript: links kept?

No. Links and images whose URL starts with javascript: or vbscript: lose their URL and keep only their text, so the Markdown can't carry a script link into another site. Relative URLs such as /docs/ or ../img.png are kept exactly as written.

Is my HTML uploaded?

No. Parsing and conversion run in your browser tab; the HTML never leaves your device.

Last updated