Convert HTML to Markdown
Paste HTML, paste a copied selection, or clip the current page. Says what Markdown could not carry instead of quietly dropping it.
- SECURE
- NO UPLOADS
- NO SIGNUP
- BROWSER BASED
- FREE
- FOREVER.
Support us with a link or a share
waiting
Nothing at the counter yet.
Three ways to hand it over
- Paste as HTML source. The tags themselves go in the box — from an editor, a template, a “view source” window.
- Paste from a page. Select part of a rendered web page, copy, and paste anywhere here. Your clipboard carries that page’s own HTML alongside the plain text, and this tool reads the HTML.
- Open a file. Any
.htmlor.htmfile, with the button above or by dropping it on this panel.
What Markdown could not carry
Nothing to report yet. Once something is in the box, every construction Markdown cannot express is listed here — named, counted and explained — instead of quietly coming out broken.
Merged table cells, superscript, definition lists and a few others stay as HTML tags, which is valid inside a Markdown document. Nothing is lost, but the output is not tag-free.
- Headings
- —
- Links
- —
- Images
- —
- Code
- —
- List items
- —
- HTML blocks
- —
Current page or selection
Clip the page you already have open
The bookmarklet prefers your selection. With no selection, it uses the largest article, then the page’s main area, then the body. It copies that HTML directly into this editor — no URL fetch and no crawler.
Clip page to Markdown- 1Install once
Drag the link to your bookmarks bar.
- 2Select, or do not
A selection wins; otherwise the collector offers the detected content root.
- 3Edit and export here
Review the Markdown, its source fields and every conversion loss.
The chosen HTML, page URL, title, byline and publication date move directly between your two tabs. Form controls, scripts, styles and cookies are excluded. Mobile share sheets normally provide only a URL, not page DOM access.
Import downloaded collector JSON instead
Where HTML to Markdown conversion runs out of syntax
Markdown was designed to be readable as plain text, which means it deliberately holds less vocabulary than HTML. There is no syntax for a merged table cell. None for a superscript, a definition list, two columns, centered body text or a colored word. HTML has all of them. Every conversion therefore reaches a point where something in the source has no destination, and what happens at that point is the entire difference between one converter and another.
Three honest answers exist. Keep the original HTML, which is legal inside a Markdown
document and is what CommonMark expects. Reduce the construct to plain text and accept
the loss. Or say nothing and hand back something broken. The third is the common one: a
table with a colspan run through a careless converter comes out as a pipe
table with every cell below the merge shifted one column to the left. The file is valid
Markdown, the data is wrong, and nothing on screen tells you.
This tool takes the first answer by default and the second on request, and it reports either way. Beside the output sits a list of what could not be carried — one line per construct, with a count, in words rather than element names: merged cells, a nested table, a line break inside a cell, more than one header row. When that list is empty the tool says so outright, which is worth as much as any of the warnings.
The report describes the Markdown that is actually written, including its final word count. Non-breaking and typographic spaces remain characters rather than being mistaken for disposable source indentation. A malformed document never receives the clean verdict: its tags are read as written, its parser issues stay visible, and a conversion that cannot finish removes the previous result instead of leaving the wrong file ready to copy or download.
When conversion is the starting point rather than the final artifact, copy the result
into the Markdown editor to revise headings and prose in
Styled view while retaining Raw source and a .md download. This converter
remains the place to change HTML-specific policies and inspect loss.
HTML and Markdown, in brief
| Full name | HyperText Markup Language |
|---|---|
| Extension |
.html, .htm
|
| Format type | Markup document |
| MIME type |
text/html
|
| Full name | Markdown |
|---|---|
| Extension |
.md, .markdown
|
| Format type | Plain text with lightweight formatting |
| MIME type |
text/markdown
|
The parts of a page that quietly change shape
Beyond tables, the constructs that reach people most often are inline.
<sup> and <sub> in anything scientific, legal or
financial. <kbd> in documentation. <abbr>,
<mark>, <u>, <time>. Not one of
them has a Markdown spelling, so they stay as inline HTML unless you switch the setting
to stripping. The same holds for definition lists and for collapsible
<details> blocks, where the content between the tags is still
converted to Markdown, so the folded section keeps working where the surrounding
document does.
If the table itself is the whole job and the destination is a spreadsheet, the
HTML table to CSV converter is the more exact route:
it draws every rowspan and colspan before asking how those
merged positions should be represented in CSV, Excel or pipe Markdown.
A second group cannot be kept in any form and is simplified instead. Multi-column
layouts flatten to a single column. Text alignment survives in table columns and nowhere
else. Color, <font> and image dimensions have nothing to attach to. A
figure caption becomes the paragraph after the image, a table caption becomes the
paragraph above the table, and an embedded video or iframe becomes a link to its source
instead of disappearing. A table with no header row has its first row promoted into one,
because a Markdown table always has a header. All of it is named on the report.
Formatting that exists only in a style attribute is treated as content
rather than decoration. Word writes bold as
<span style="font-weight:700"> rather than
<b>, and Google Docs wraps an entire exported document in
<b style="font-weight:normal">. Without both of those special cases a
pasted document comes back either wholly unformatted or wholly bold.
Convert a webpage to Markdown without fetching its URL
The current-page bookmarklet handles the case a URL box cannot: a signed-in article,
a client-side view, or the exact selection already on screen. Run it in that tab. If
text is selected, the selection is the source. Otherwise it chooses the largest
<article>, then <main>, then the page body. The
collector removes scripts, styles, forms and hidden controls, resolves relative links
against the page, and sends the chosen HTML directly back to this editor.
Title, source URL, exposed byline and publication date arrive as a separate receipt. They can be included as YAML front matter in the downloaded Markdown or switched off. The content itself remains editable, and it goes through the same unsafe-URL checks and loss report as pasted source. This is one mode of the existing converter, not a second page competing for the same job.
To curate several published Markdown resources into one concise machine-readable guide, use the llms.txt generator. It accepts visible fields, a URL list or local sitemap XML and never fetches the linked pages or invents summaries.
Two ways to paste when a bookmarklet is not the right route
Pasting HTML source is the obvious route: the text you paste is the tags themselves, taken from a source view, a template file or an export.
Pasting from a page is the other one. When you select part of a rendered web page and
copy it, your clipboard does not hold the visible characters alone — it also holds a
text/html representation of the selection, with the headings, links, lists
and tables intact. This tool reads that flavor and converts it, so turning an article, a
documentation page or a rendered README into Markdown costs a copy and a paste, with no
source view anywhere in the sequence. Both routes are on the page as equals, and
.html files open through the file picker as a third. If what you want is
the tags and active subtrees gone entirely rather than translated, use the
HTML to text converter. The
text cleaner instead starts after extraction, with plain
text that needs whitespace or character cleanup.
A rich paste from Word or Google Docs is identified from the HTML that actually reached the browser, and the intake receipt names unresolved clipboard-only images and Word list styling instead of guessing. When exact DOCX numbering, notes and embedded image bytes matter, use the Word to Markdown converter; its verified ZIP keeps local asset paths together with the Markdown.
Native Word and Google Docs clipboard access was not available in the automated test
environment. The conformance tests therefore use synthetic browser
DataTransfer flavors that reproduce the observed text/html and
text/plain boundary; they prove flavor precedence and reporting, not a live
copy gesture from either desktop application.
What is removed before a single character is written
Scripts, stylesheets, <noscript>, <template>,
<canvas>, <svg>, <math>, forms
and form controls do not survive, and no on… event attribute is ever
written out — not in the plain Markdown and not inside the HTML that is kept. Link and
image destinations are checked against a list of schemes that are allowed rather than a
list that is forbidden, so a javascript: target keeps its text, loses its
link, and turns up on the report.
This matters more than a converter's output usually does, because Markdown is seldom the last stop. It gets rendered back into HTML later by a site generator, a README viewer or a comment field — the same problem seen from the other direction on the Markdown to HTML converter. Anything that slipped through here would be live markup there. The HTML that is kept comes from a short list of permitted tags carrying a short list of permitted attributes, which is why the round trip between the two tools cannot bring back something that runs.
What this tool does not do
It does not fetch a URL for you. There is no address field: you clip the open page,
paste it or open the file, which is also the reason no crawler or proxy is involved. It does not repair
bad HTML either — unclosed tags, stray end tags and mis-nesting are read as they stand
and noted rather than rewritten, and reshaping a document as HTML belongs to
the HTML formatter. And it does not guess at intent. A
<div> that looks like a callout comes out as a paragraph, because
CommonMark has no callout and inventing one would put text in your document that the
source never contained.
Nor does it open an archive. An EPUB is a zip of XHTML chapters, which is HTML by any other name, but unpacking one and putting the chapters back in reading order is a separate job with a separate answer in the EPUB to PDF converter.
Nothing you paste is uploaded. Bookmarklet content moves directly from the source tab to this tab with an origin-bound browser message, or through the JSON file you download; this site has no endpoint that accepts the document. The conversion is JavaScript over text your browser already holds. Open the Network panel before pasting or importing and the conversion adds no document request.
Questions
What happens to a table with merged cells?
It is kept as HTML, and the tool says so. A Markdown pipe table has no way to express colspan or rowspan — the syntax simply has no room for it — so the honest options are to keep the HTML, which is valid inside a Markdown document, or to drop the structure and lose data. Keeping it is the default, dropping it is one click away, and either way the report names what happened.
Can I paste from a web page instead of pasting HTML source?
Yes, and it is usually what people want. When you copy a selection from a rendered page, your clipboard carries the HTML alongside the plain text. Paste from a page reads that flavor and converts it, so you never have to open the source view. Paste as HTML source is there for when the tags themselves are what you have.
Does the converter read older HTML file encodings?
Yes. A charset declaration in the HTML file is read from the original bytes before conversion, including Windows-1251 and Windows-1252. UTF-8 and UTF-16 byte markers remain authoritative, binary input is rejected, and the file receipt names the encoding that was used.
Can I convert a whole webpage without copying it first?
Yes. Install the bookmarklet once, then run it on the open page. An active selection wins; otherwise it uses the largest article, then the main content area, then the body. The chosen HTML and its source fields move directly between your tabs. The tool does not fetch the URL or crawl linked pages.
Why does my output have HTML in it?
Because Markdown could not express something, and dropping it silently would have been worse. Superscript, definition lists, merged table cells, underline and a handful of other elements have no Markdown equivalent — embedding raw HTML is legal CommonMark and is what most renderers expect. If you need it gone, switch the setting and the report will tell you what was removed.
Is the converted Markdown safe to use?
Scripts, styles, event handlers and javascript: URLs never make it through — they are removed before anything is written, and the kept HTML is an allowlist rather than a passthrough. This matters more than it looks: Markdown gets rendered back into HTML eventually, so anything that survived here would become live markup there.
Does my content get uploaded?
No. Rewriting one kind of markup as another is string handling your browser does unaided, so nothing is stored, nothing is logged, and this site keeps no route your markup could be sent down. The common case is worth naming: the HTML people bring here is usually copied out of a page they had to sign in to reach — an internal wiki, a ticket, a draft nobody outside the company has seen.