HTML to Markdown Converter

Paste HTML and get clean Markdown back: headings, paragraphs, links, lists, images, quotes and code are converted by a small parser built into this page — no libraries, no uploads, no sign-up.

1Paste your HTML
2Press Convert
3Copy or download the Markdown

Private by design: 100% in your browser — nothing is uploaded, no sign-up. This tool runs entirely on your device.

How to use this HTML to Markdown converter

Paste any HTML into the top box — a copied fragment, a CMS export, or the whole source of a page — and press “Convert to Markdown”. The tool parses the markup into a small document tree, then walks that tree and writes each element out in its Markdown equivalent: an h1 becomes a # heading, a link becomes [text](url), a list becomes dashes or numbers. The result lands in the box below, ready to copy or download as a .md file.

Two kinds of tags get special treatment, on purpose. Structural wrappers like div and section carry no meaning Markdown wants, so they are unwrapped and their contents kept. Scripts, styles and form controls are dropped altogether, because they are machinery rather than content. What survives is the document a human would actually want to read and reuse.

Example: a heading, a paragraph and a list

This fragment of HTML:

<h1>Hi</h1><p>Some <strong>bold</strong> text and a <a href="https://example.com">link</a>.</p><ul><li>First item</li><li>Second item</li></ul>

converts to exactly this Markdown:

# Hi Some **bold** text and a [link](https://example.com). - First item - Second item

The same rules scale up: ordered lists keep their numbering, blockquotes gain a > on every line, images keep their alt text, and a pre block becomes a fenced code block with its spacing preserved to the character — because in code, spacing is meaning, and a converter that re-wraps code has destroyed the thing it was asked to carry.

Why people convert HTML to Markdown

The usual story is rescue. A blog is moving off an old platform, documentation needs to leave a wiki, or years of writing sit trapped in a CMS that exports only HTML. Markdown is the natural landing place: it is plain text, so it will be readable in fifty years; it shows its structure without a renderer, so it diffs cleanly in version control; and it is the input format of static site generators, README files, note apps and most modern documentation tools. Converting is rarely the glamorous part of a migration, but it is the part that decides whether the words survive it — which is why the converter aims for boring reliability: common tags converted exactly, uncommon ones unwrapped rather than mangled, and nothing silently invented.

What Markdown cannot say

Markdown was designed for documents, not layouts, and a honest converter admits the gaps. Multi-column tables with merged cells, coloured spans, floats, forms and anything positioned by CSS simply have no Markdown voice. When you meet them, the text is preserved and the presentation is not — the right trade for prose, and a real limitation for pages that were mostly design. If a converted page comes out short, that is usually the correct diagnosis: the original carried less writing than it appeared to.

A two-minute tidy-up after converting

Converted Markdown is a strong first draft, not a finished document, and a short review pass pays for itself. Check the heading order first: pages built for visual styling often jump from an h1 to an h4 because it looked right, and the converted file faithfully inherits the skip — renumber so the levels nest properly. Look at the images next, and write real alt text for any that came through empty; future readers using screen readers, and your own search visibility, both benefit. Then scan for the orphans of the old layout: lines that were sidebars, captions or calls to action rarely sit naturally inside the new document, and deleting them is easier now than at any later stage. Finally, read the first paragraph aloud. Conversion preserves words, not flow, and the opening lines of a page written for the web often lean on the design around them. Two minutes of this turns a mechanical conversion into a document that feels written, not rescued.

Frequently asked questions

Which HTML tags does the converter support?

All the everyday ones: headings h1 to h6, paragraphs, links, strong and emphasis, inline code and pre code blocks, blockquotes, ordered and unordered lists (including nested lists), images, horizontal rules and line breaks. Wrapper tags such as div and section are passed through to their contents, and scripts and styles are dropped entirely.

What happens to tags Markdown cannot express?

Markdown deliberately covers only basic document structure, so things like tables with merged cells, forms, styled spans and layout markup have no equivalent. Unknown inline tags are unwrapped — their text is kept, the tag is dropped — and scripts, styles and form controls are removed. The result is a clean reading document, not a pixel-perfect copy.

Will it convert a whole web page if I paste its source?

Yes, you can paste a full page's HTML. The converter keeps the content tags and discards the head, scripts, styles and navigation chrome it cannot translate, so what you get is the readable article in the middle. For a page that is mostly application rather than document, expect a shorter result — that is the honest shape of the content.

Does it keep links and images?

Yes. A link becomes [text](url) using the href exactly as written, including relative URLs, and an image becomes ![alt](src) with its alt text. If an image has no alt text, the alt is left empty — a good moment to add some when you edit the Markdown.

How are code blocks handled?

A pre element becomes a fenced code block with triple backticks, and its contents are copied exactly, whitespace and all. Inline code elements become single-backtick spans. Code inside a pre is never re-wrapped or re-spaced, because in code the spacing is the meaning.

Is my HTML uploaded to a server?

No. The converter runs in JavaScript inside your own browser — it uses its own small parser, written for this tool, rather than sending anything anywhere. Pasted content never leaves your device and nothing is stored.

Why convert HTML to Markdown at all?

Because Markdown is where writing now lives: documentation, README files, wikis, note apps, static site generators and issue trackers all speak it. Converting is how you rescue content from an old website, a CMS export or an email into a format that is readable as plain text, easy to version in git, and simple to publish somewhere new.

Does the output follow CommonMark?

The output uses the widely supported core syntax — ATX headings, asterisk emphasis, fenced code blocks, inline links and images — which every CommonMark renderer accepts. It avoids flavour-specific extensions, so the result works on GitHub, GitLab, Hugo, Jekyll and note-taking apps alike.

Can I download the converted Markdown?

Yes. The Download button saves the result as a converted.md file, ready to drop into a repository or notes app, and the Copy button puts it on your clipboard for pasting straight into an editor.

Related tools