Skip to content

HTML to Markdown

This html to markdown tool turns HTML into Markdown text that you can copy or download. The conversion runs in your browser, so nothing you paste or open is uploaded to a server.

  • Markdown cannot show merged table cells, inline colours or layout. Pasted HTML does not include content that JavaScript adds after the page loads; use the URL to Markdown tool for a public page.
  • Files over 2 MB are not opened. The URL to Markdown tool refuses pages whose HTML is larger than 2 MB.

You can also drop a file here.

Markdown

0 words, 0 B

  • Runs in your browser

    Your HTML is converted on your device and never uploaded.

  • No account, no limits to hit

    There is no server round trip, so there is no daily quota.

  • Copy or download

    Copy the Markdown or save it as a .md file.

In one sentence

A free online tool that converts HTML you paste or open into Markdown inside your browser with turndown, so nothing is uploaded to a server.

Key facts

  • Input: pasted HTML or a .html, .htm or .txt file up to 2 MB.
  • Options: hash or underline headings, list marker, fenced or indented code, GitHub-style tables and strikethrough, keep links, keep images, main content only, and a base address for relative links.
  • Output: Markdown to copy or download as a .md file. It does not run the page's JavaScript; use URL to Markdown for a live page.
  • Free, with no account, no human check and no daily limit, because the conversion runs on your device.

How it works

  1. Paste your HTML into the input box, or open a .html, .htm or .txt file from your computer.
  2. Choose the heading style, the list marker and the code block style.
  3. Turn tables, strikethrough, links, images and main content only on or off.
  4. If your HTML has relative links or image paths, enter a base address.
  5. Copy the Markdown, or click Download .md to save it as a file.

How to convert HTML to Markdown

Paste your HTML into the input box. You can paste a fragment, such as one section of a page, or a whole page. You can also open a .html, .htm or .txt file from your computer. The file is read in your browser, and files over 2 MB are not opened.

Set the options you want, then read the Markdown in the output box. The box shows a word count and a byte count, so you can check the size of the result before you use it.

This html to md converter works on the HTML in front of it. It does not fetch anything from the internet, so links and images are only written out as they appear in your HTML, unless you add a base address.

Markdown style options

The headings option lets you choose hash style, which starts each heading with a hash mark, or underline style. Pick the one that the app you will publish in expects.

The list marker option sets the character used for bullet lists: a hyphen, an asterisk or a plus sign. Code blocks can be fenced, with a line of backticks before and after the code, or indented.

The converter writes the style you choose and does not check which style another app needs. If you are unsure, copy a small sample into that app first and look at the result.

  • Headings: hash style or underline style
  • List marker: hyphen, asterisk or plus sign
  • Code blocks: fenced or indented

What converts well and what does not

Headings, paragraphs, lists, links, images and simple tables are the parts of a page that Markdown can hold.

Some things do not survive the conversion. Markdown is a plain-text format, so it cannot show everything that HTML can. Very complex layouts, such as pages built from many nested boxes, come out as plain paragraphs. Check the result against the original page before you publish it.

  • Merged table cells, inline colours and page layout: Markdown has no way to express them.
  • Iframes, embedded objects, embed tags, canvas drawings and SVG graphics: dropped.
  • Script, style, noscript, template, link and meta elements: dropped, and text inside script tags is removed.

Tables are written in GitHub style, and the option is on by default. Turn it off if the app you will paste into does not read GitHub style tables. Strikethrough also follows the GitHub style and is on by default.

Keep links and keep images are separate options. Turn them off if you want plain text only, with no link addresses and no image lines.

Relative links and image sources, such as /docs/setup or images/logo.png, only work on the site they came from. Enter a base address, such as https://aiipworld.com/docs/, and the converter turns each relative link and image source into a full address.

Using the Markdown you get

Click Copy to put the Markdown on your clipboard, or click Download .md to save it as a file. Paste it into a README, a documentation site, a notes app or any other tool that reads Markdown.

If you want a printable file, paste the Markdown into the Markdown to PDF tool. That tool turns the text into a PDF with a rule under the top two heading levels, bordered tables and grey code blocks. It does not support LaTeX maths, Mermaid diagrams or footnotes.

HTML to Markdown for a live web page

Pasted HTML is only the HTML you paste. The converter does not run JavaScript, so content that a page adds with JavaScript after it loads is missing from pasted HTML.

For a public web page, use the URL to Markdown tool. It opens the address in headless Chromium, which runs the page's JavaScript and waits for the page to load. The rendered HTML is then converted with the same options as this tool.

Private networks, localhost and cloud metadata addresses are refused, including after a redirect. Pages behind a login show the login screen, because no cookies are sent. A site that blocks the request gives you its error text, not the article. We do not bypass blocks.

Privacy: your HTML stays in your browser

The HTML to Markdown tool runs entirely in your browser. Nothing is uploaded or sent to a server, and no account is needed. You can paste HTML from a private document without it leaving your computer.

The URL to Markdown tool works differently. It fetches the page on our server, so the page's HTML passes through our servers. The result file is kept for 10 minutes without an account. For pages you do not want to send through our servers, paste the HTML into this tool instead.

The tool gives no legal advice. Check the rights to any text or images before you reuse them in your own work.

Questions

Is this html to markdown converter free?

Yes. The HTML to Markdown tool needs no account, has no human check and has no daily limit. You can paste HTML or open a file of up to 2 MB.

Is my HTML uploaded to a server?

No. The conversion runs in your browser tab, and nothing you paste or open is sent to a server. The URL to Markdown tool is the exception, because it fetches the page on our servers.

Is html to md the same as html to markdown?

Yes. html to md is a short name for the same conversion, and html to md converter and html to markdown converter mean the same thing. This page covers all of them.

Does the converter support tables?

Yes. Tables are written in GitHub style, and that option is on by default. Markdown has no way to express merged cells, so a table with merged cells loses that layout.

Can I choose the heading style?

Yes. You can pick hash style, which starts each heading with a hash mark, or underline style. The list marker and code block style have their own options.

Can I open a file instead of pasting?

Yes. You can open a .html, .htm or .txt file. The file is read in your browser, and files over 2 MB are not opened.

What happens to script and style tags?

They are dropped, along with noscript, template, iframe, object, embed, svg, canvas, link and meta elements. The converter reads the HTML without running scripts, and text inside script tags does not appear in the Markdown.

Why is some content missing after I convert?

The content was probably added by JavaScript after the page loaded. Pasted HTML does not include it, because the converter does not run JavaScript. For a public address, use the URL to Markdown tool instead.

Can I convert a web address instead of pasting HTML?

Yes, with the URL to Markdown tool. It accepts public http and https addresses and runs the page's JavaScript before converting. When you are signed in, each conversion costs 1 credit.

What happens to relative links and images?

Enter a base address, such as https://aiipworld.com/docs/, and the converter turns relative links and image sources into full addresses. Without a base address, they stay as they are in your HTML.

Which library does the converter use?

It uses turndown and turndown-plugin-gfm, both released under the MIT license. The libraries run in your browser, and the GitHub style options come from the plugin.

Does the tool check that my Markdown will look right?

No. The tool converts the HTML you give it, but it does not check how the Markdown will look in another app. Paste a sample into the app where you plan to use it and look at the result first.

Need this in your app or in bulk?

This tool runs in your browser. To get the Markdown of live pages from your own code, the render API returns a page's HTML after its JavaScript has run (output html), which you can convert the same way. A free account includes 100 credits a month.

Related tools