Account

What new tool do you want?

Developer Tools

HTML to Markdown Converter

Convert HTML into clean Markdown for READMEs, docs and static sites — headings, links, lists, tables and code preserved.

How to use

  1. 1Paste HTML (a full page or a fragment).
  2. 2Copy the Markdown result.

Frequently asked questions

What happens to styling and scripts?

Inline styles, classes, scripts and other presentation-only markup are dropped; only the content structure is kept.

Are tables converted?

Yes. Simple HTML tables become Markdown pipe tables. Merged cells can't be represented in Markdown and are flattened.

Can I paste a whole web page?

Yes, but you'll get navigation and footers too. Paste just the article's HTML for the cleanest result.

What's lost on purpose

NodeHtmlMarkdown intentionally discards anything Markdown has no concept of — inline `style` attributes, `class` names, `<script>` tags and other presentation-only markup — so the output is content structure (headings, emphasis, links, lists, tables, code) and nothing else. That's the right trade-off for pulling content into a README or a static-site page, but it means visual formatting that depended on CSS (colored text, custom fonts, specific spacing) won't survive the round trip, because Markdown simply has no syntax to express it.

Tables convert cleanly — until a cell spans more than one

A standard HTML `<table>` with simple `<tr>`/`<td>` rows becomes a Markdown pipe table correctly. The one case that breaks down is `colspan`/`rowspan`: Markdown's pipe-table syntax has no way to represent a merged cell, so the converter flattens it, which can shift columns out of alignment in the result. If your source table relies on merged header cells, expect to hand-fix that section after conversion rather than treating the output as final.

Why pasting a whole page is rarely the right move

Feeding in an entire fetched web page (nav bar, sidebar, footer, cookie banner and all) converts every one of those into Markdown too — you'll get a document with dozens of nav links before the content even starts. The FAQ's advice to paste just the article's HTML isn't a minor tip, it's the difference between a usable document and one you'll spend longer cleaning up than you would have spent just rewriting it by hand. If you're pulling from a live page, use your browser's reader view or inspect the DOM to grab the `<article>` or `<main>` element specifically.

Worked example: HTML to Markdown Converter

Input `<h2>Hi</h2><p>A <strong>b</strong> <a href="https://x.io">link</a></p><ul><li>one</li></ul>` converts to: ## Hi A **b** [link](https://x.io) - one The heading level is preserved (h2 → `##`), bold becomes `**b**`, the anchor becomes bracket-paren link syntax with the href carried over, and the list item gets a leading `-` — a clean Markdown fragment ready to paste into a README.

Code blocks, images and blockquotes map onto exact Markdown equivalents

A `<pre><code>` block (the way browsers and most CMS editors wrap code snippets) converts to a proper fenced triple-backtick block with the code's internal line breaks preserved exactly — not squashed into one line the way a naive HTML-to-text strip would. An `<img src="a.png" alt="A pic">` becomes `![A pic](a.png)`, carrying the alt text into the Markdown image syntax where it belongs, and a `<blockquote>` becomes a `>`-prefixed line. These three are the cases where getting the conversion exactly right matters most for a README, since a code block that lost its fencing or an image that silently dropped its alt text would need to be manually fixed on every single occurrence.

Why the bullet marker is configurable at all

This tool explicitly sets bulletMarker: "-" rather than leaving node-html-markdown's default, because Markdown allows -, *, or + for unordered list items interchangeably, and consistency matters once a document has several lists — mixing markers across a file is valid Markdown but reads as inconsistent style in a diff or a style-linted repo. Fixing it to a hyphen means every `<ul>` in your pasted HTML, no matter how it was originally marked up, comes out using the same convention most style guides (including GitHub's own default formatter) already prefer.

Related tools

More: Developer Tools