Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

HTML to Markdown Converter

Convert HTML to clean Markdown with GitHub-flavored tables, task lists, and code blocks — or paste copied web or Google Docs content directly.

Processed locally in your browser — nothing is uploaded.

HTML to Markdown Converter

0 characters

Markdown

Output appears here…

About HTML to Markdown Converter

Paste HTML on the left and get tidy Markdown on the right: headings, paragraphs, bold and italic text, links and images, nested bulleted and numbered lists, block quotes, inline code, and fenced code blocks that keep their language from a language-* class. GitHub-flavored extras are on by default — tables with column alignment, strikethrough, and task lists from checkbox items.

Paste a web page or document directly. Copy part of a web page, a Google Doc, or a Word document and paste it into the box: the converter takes the formatting that came along with the copy as HTML, rather than the plain text. Word processors mark bold, italic, and strikethrough with inline styles instead of tags, and the converter reads those too — including Google Docs' habit of wrapping an entire document in one "not bold" bold tag. If you copied HTML source from a code editor, it is pasted as the source you copied.

Your style, your choice. The Options drawer picks ATX (#) or Setext (underlined) headings, the bullet character, fenced or indented code blocks, _ or * for italics, ** or __ for bold, and inline or reference-style links. Tables can be turned off, in which case they are kept as simplified HTML that Markdown renderers display as is.

Nothing runs. HTML is parsed as text by a small parser written for this tool — never inserted into the page — so scripts in the input can't execute. Scripts, styles, forms, embeds, and comments are dropped from the output, and javascript: links and non-image data: URLs are removed while their text is kept. Text that would accidentally become Markdown syntax, like *stars* or a line starting with 1986., is escaped.

Common uses

  • Move a blog post, help article, or CMS page to a static site or docs repository
  • Turn a Google Doc or Word document into a README or wiki page
  • Clean up HTML from a rich-text editor into Markdown for a pull request or issue
  • Feed a web page to a language model as compact Markdown instead of markup

Example

Input

<h2>Setup</h2>
<p>Run <code>npm i</code>, then read <a href="/docs">the docs</a>.</p>
<ul><li><strong>Fast</strong></li><li><em>Free</em></li></ul>

Output

## Setup

Run `npm i`, then read [the docs](/docs).

- **Fast**
- _Free_

Limitations

  • Cells that span rows, and tables inside tables, can't be expressed as GitHub-flavored tables — nested tables fall back to simplified HTML, and a row-spanning cell is shown once
  • Layout and colours are not carried over; Markdown has no syntax for them
  • Embedded media (video, audio, iframes) and form controls are dropped rather than linked

Frequently asked questions

How do I convert HTML to Markdown?

Paste the HTML into the left box and the Markdown appears on the right as you type. Copy it or download it as a .md file. Headings, lists, links, images, code blocks, block quotes, and tables are all converted, and the Options drawer controls the Markdown style.

Can I convert a web page or Google Doc to Markdown?

Yes. Select the content, copy it, and paste it into the HTML box: the converter uses the formatted HTML that comes with the copy instead of plain text, and reads the inline styles Google Docs and Word use for bold, italic, and strikethrough. To paste plain text instead, switch off “Paste formatted text as HTML” in Options.

Does it support GitHub-flavored Markdown tables?

Yes. HTML tables become GFM pipe tables, with the first row as the header, column alignment taken from align attributes or text-align styles, column spans padded with empty cells, and pipe characters escaped. Tables nested inside other tables can't be expressed in GFM, so those are kept as simplified HTML.

Is it safe to paste HTML from an untrusted site?

Yes. The HTML is parsed as text and never rendered, so scripts and event handlers can't run. The Markdown output drops scripts, styles, forms, and embeds, and removes javascript: links. Everything happens in your browser; nothing you paste is uploaded.

What's the difference between inline and reference-style links?

Inline links put the URL right after the text, like [docs](https://example.com). Reference-style links use a short label, like [docs][1], and list every URL once at the end of the document — easier to read when a paragraph has many links. Choose either in Options.

Why are some characters escaped with a backslash?

Characters such as *, _, [, and a number followed by a period at the start of a line mean something in Markdown. When they appear as ordinary text in the HTML, the converter escapes them so the Markdown displays the same words instead of turning them into emphasis, links, or a numbered list.

Can I turn the Markdown back into HTML?

Yes — paste it into the Markdown to HTML Converter, or the Markdown Preview to see it rendered. Converting there and back gives equivalent content, though not the original markup: classes, inline styles, and layout elements don't survive a trip through Markdown.