HTML to Markdown

Paste HTML, or copy straight from a web page or Google Docs, and get clean Markdown: headings, lists, links, tables and code blocks included. Free, no signup.

  • No account
  • Nothing uploaded
  • Rich text paste

Paste HTML code, or copy part of a web page, Google Doc or Word file and paste it here: the formatting comes along.

Runs in your browser. Your HTML is never uploaded, and it is read as text, never run.

Markdown

How it works

How to convert HTML to Markdown

  1. Paste HTML or rich text

    Paste HTML code, or select part of a web page, a Google Doc or a Word file, copy it and paste it in. The formatting is picked up from your clipboard.

  2. Pick your style

    Choose dash or asterisk bullets, how italics and headings are written, whether to keep links and images, and an optional line width.

  3. Copy or download

    The Markdown updates as you type. Copy it, or download it as a .md file for your notes app, README or static site.

What converts

What turns into what

CommonMark with the GitHub additions: tables, task lists and strikethrough. Anything with no Markdown equivalent keeps its text.

Headings and text

h1 to h6 become # headings, paragraphs stay paragraphs, and br becomes a line break. Extra spaces and line breaks in the HTML are tidied, as a browser would.

<h2>Plan</h2> → ## Plan

Bold, italic, code

strong, em, del and code, plus the inline styles Google Docs and Word use for bold, italic and strikethrough.

<span style="font-weight:700">Hi</span> → **Hi**

Lists and tasks

Bulleted and numbered lists, nested to any depth, with start numbers kept. Checkboxes become task list items.

<li><input type="checkbox" checked> Done → - [x] Done

Links and images

Links keep their address and title, images their alt text. javascript: and data: addresses are dropped, keeping just the text.

<a href="#intro">Intro</a> → [Intro](#intro)

Tables

Tables become pipe tables with a header row and column alignment. Pipes inside cells are escaped, and merged cells get an empty cell.

| Name | Qty | | ---- | --: |

Code and quotes

pre blocks become fenced code that keeps the language from class="language-js". Blockquotes nest with >. Scripts and styles are removed.

<pre><code class="language-js"> → ```js

FAQ

Questions about converting HTML to Markdown

How do I convert HTML to Markdown?

Paste your HTML into the box on the left. The Markdown appears on the right as you type, and you can copy it or download it as a .md file. Choose your bullet style, italics, headings and line width under the box.

Can I paste from a web page or Google Docs?

Yes. Select the part you want on a web page, in Google Docs or in Word, copy it and paste it into the box. Browsers put the formatting on the clipboard as HTML, so headings, bold, lists, links and tables come along. If you paste HTML source code, it is used as typed.

Which Markdown flavor does it write?

CommonMark, the standard most apps read, plus the GitHub additions: pipe tables, task lists and ~~strikethrough~~. It works in GitHub, Obsidian, VS Code, static site generators and most notes apps.

What happens to HTML that has no Markdown equivalent?

It keeps its text. Wrappers like div and span disappear, underline and colors are dropped, and merged table cells get an empty cell, since Markdown tables can't merge cells. Scripts, styles, forms and the page head are removed.

Are unsafe links removed?

Yes. Links and images that point to javascript:, vbscript: or data: addresses are dropped and only their text is kept, so the Markdown is safe to paste into a site or a notes app. Normal web, email and relative links are kept as written.

Is my HTML uploaded?

No. The conversion runs in your browser, and the HTML is read as text, never loaded or run as a web page, so nothing is sent to Trezio or anyone else. Your last input and options are kept in this browser's local storage so a refresh doesn't wipe them; press Clear to remove the input.

How is this different from Trezio?

This tool converts HTML and forgets it. Trezio is where the pages and notes you want to keep live: save a page in one click from the browser extension, write text notes next to it, and find everything again with search. There's a free plan.

More free tools

Other tools for Markdown and notes