HTML to Markdown
Convert HTML to Markdown by pasting it or fetching a page by URL.
Results are provided as is, for general information. Check anything important before relying on it. See the Terms of Use.
About this tool
Turns HTML into readable Markdown while preserving the structure writers usually care about: headings, emphasis, links, images, lists, blockquotes and code blocks. Paste mode performs the conversion entirely in your browser. URL mode first asks the server to fetch a public web page through the same private-network and response-size safeguards used by the site's other URL tools, then converts the returned HTML in your browser. The converter removes page chrome such as scripts and styles and produces plain Markdown you can copy into documentation, notes or a content system.
How it works
HTML → DOMParser(text/html) → walk elements → Markdown h1 → #, strong → **text**, a → [text](href), ul → - items Sibling blocks → blank lines; script and style → omitted
Paste HTML to convert it entirely in your browser. Fetch from URL sends the URL to our server after human verification; the server retrieves HTML, then your browser applies the same converter. The converter handles headings, emphasis, links, images, lists, quotes and code, but does not recreate CSS layout or turn tables into Markdown tables. Relative link and image paths remain relative. Browser HTML parsing recovers malformed markup rather than reporting JSON-style syntax errors. URL mode retrieves the page's HTML without executing its JavaScript, so content rendered only by scripts may be missing.
| Question | Working | Answer |
|---|---|---|
| Convert <h1>Notes</h1><p>Hello <strong>world</strong>.</p> | h1 becomes a # heading, strong becomes **bold**, and the paragraph starts after one blank line. | # Notes Hello **world**. |
| Convert <ul><li>Setup<ul><li>Install</li></ul></li><li>Run</li></ul> | Give each list item a hyphen marker; indent the nested item by two spaces. | - Setup - Install - Run |
| Convert <p><a href="/docs">Docs</a> and <code>npm test</code></p> | Use the href as written and wrap inline code in backticks. /docs stays relative; no site origin is added. | [Docs](/docs) and `npm test` |
| Does incomplete HTML such as <p>Hello <strong>world fail? | DOMParser recovers the missing closing tags. The converter then reads the recovered paragraph and bold element. | Hello **world** |
| Convert <p>Keep</p><script>alert(1)</script><style>p{color:red}</style> | Keep the visible paragraph; omit script and style elements, including their contents. | Keep |
| What URL is requested for example.com/post in Fetch from URL mode? | Add https:// to the bare domain. After human verification, the server fetches that URL; Markdown depends on the returned HTML. | https://example.com/post |
| Why does ftp://example.com/post fail in URL mode? | The URL parser checks the scheme before a fetch. Use an http:// or https:// URL instead. | Only http and https URLs are supported. |
When to use it
Questions
Is pasted HTML uploaded anywhere?
No. Paste mode runs entirely in your browser and sends no HTML to the server. URL mode is different: the server must retrieve the public URL because browsers cannot freely read pages on other origins, but the returned HTML is still converted to Markdown in your browser.
Why does the Markdown not reproduce the page's visual layout?
Markdown represents document structure, not a pixel-perfect design. Headings, paragraphs, emphasis, links, images, lists, blockquotes and code survive; CSS, columns, navigation, animations and other presentation details do not. That makes the result suitable for editing rather than for cloning the original page.
Why can a page fail in Fetch from URL mode?
The site may block automated requests, require a login, render its content only after JavaScript runs, return something other than HTML, or exceed the tool's response and timeout limits. Private and local-network addresses are deliberately rejected so the endpoint cannot be used to reach internal services.
What happens to tables and unsupported HTML?
Common document elements are converted directly. Content from elements without a dedicated Markdown form is kept as readable text where possible, while scripts, styles and page-control markup are discarded. Complex tables and heavily styled layouts may need a quick manual cleanup after conversion.