HTML to Markdown Converter

This HTML to Markdown converter rewrites pasted HTML or an .html file as clean Markdown, with links, lists, tables and code blocks kept. Need somewhere to keep the text afterwards? The notepad on the home page saves a draft in this browser.

Up to 2 MB. The file is read here; nothing is uploaded.

Paste HTML or open a file.

Why use our HTML to Markdown Converter?

Paste Formatted Text

Copy part of a web page and paste it straight in: the converter reads the HTML your browser puts on the clipboard.

Nothing Runs or Loads

Scripts and styles are removed, not run, and images are written as text instead of being fetched.

Tables and Code Kept

Tables become pipe tables and code blocks keep their language, so technical pages come through intact.

What is an HTML to Markdown Converter?

An HTML to Markdown converter rewrites HTML tags as the plain text symbols Markdown uses, so an <h2> becomes ## and a <strong> becomes **. Paste HTML, open an .html file or paste formatted text, and the Markdown appears next to it.

Markdown is an easy-to-read, easy-to-write plain text format that converts to HTML (Daring Fireball: Markdown). It suits READMEs, docs and notes, where you want to edit the text without tags in the way.

Conversion Details

  • Line breaks:A <br> in a paragraph becomes a hard line break, and one inside a table cell stays as <br> so the row stays on one line.
  • Numbered lists:Ordered lists keep their start number.
  • Escaping:Text that would read as Markdown, such as a leading # or a *, gets a backslash so it stays text.
  • Left out:Forms, buttons, iframes, video and SVG are left out, since Markdown has no symbol for them.
  • Unsafe links:Links with unsafe schemes such as javascript: keep only their text.

Common Use Cases

Web Page to Notes

Copy a section of an article in your browser and paste it here to get Markdown for your notes.

CMS Migration

Move posts from a CMS that exports HTML into a Markdown based site, one page at a time.

Docs and READMEs

Turn an HTML help page into Markdown you can edit and review in a repository.

Messy Exports

Strip a cluttered export down to headings, lists and links without editing tags by hand.

Going Back

To go back, use the Markdown to HTML converter.

Plain Text Only

For plain text with no symbols, use HTML to Text.

How to Convert HTML to Markdown

1

Add HTML

Paste HTML into the HTML box, open an .html file, or paste formatted text copied from a web page.

2

Check the Markdown

Check the Markdown next to it. It updates as you type.

3

Read the summary

The line under the Markdown says how many scripts and style blocks were removed.

4

Copy or download

Press Copy Markdown, or Download .md to save a file.

Scripts and Styles Are Removed, Not Run

Parsed, Not Run

Your HTML is read with the browser's DOMParser, which marks scripts as not executable and fires no events (MDN: parseFromString).

Nothing Fetched

Nothing in your HTML is fetched: images become ![alt](src) text and are never loaded.

Not Uploaded

Your HTML is converted in this browser and is not uploaded or stored.

Paste Control

Pasting formatted text from a web page converts the HTML your browser puts on the clipboard; turn off When pasting formatted text, paste its HTML to paste plain text instead.

Tips for Clean Markdown

  • •Live pages: The converter does not open URLs. Open the page, copy its content or source, and paste it here.
  • •One file at a time: Files open one at a time, so convert a batch by opening each file in turn.
  • •Check links: A link with an unsafe scheme keeps only its text, so look for plain words where you expected a link.
  • •Preview the result: Paste the output into the Markdown editor to read it with a live preview.

Convert Your HTML

Paste HTML or formatted text in the box above and copy the Markdown when it looks right.

Nothing you paste leaves this browser, so internal pages and drafts are fine to convert.

What Each HTML Tag Becomes

HTMLMarkdown
<h1> to <h6># to ######
<strong>, <b>**bold**
<em>, <i>*italic*
<del>, <s>~~struck~~
<a href>[text](url)
<img>![alt](src)
<ul>, <ol>- item, 1. item
<pre><code>fenced block with its language
<table>pipe table
<script>, <style>removed

Related tools

Frequently Asked Questions

How do I convert HTML to Markdown online?

Paste the HTML or open the file here; the Markdown appears next to it.

Are links preserved in the output?

Yes, as [text](url). Links with unsafe schemes such as javascript: keep only their text.

Can I convert a live URL to Markdown?

No. Open the page, copy its content or source, and paste it here.

Can I batch convert multiple HTML files?

No. Open one file at a time.

What is the difference between HTML and Markdown?

HTML is tags that a browser renders. Markdown is plain text with a few symbols that converts to HTML.

Is my HTML uploaded?

No. It is converted in this browser and nothing in it is fetched.