HTML to Markdown
Turn a page of HTML into readable Markdown.
What you paste
Parsed in your browser — never uploadedHow this reads your output
Script and style blocks are removed first, so a page copied from a browser does not bring its behaviour along. Block elements are then converted in order of specificity, with code blocks handled before inline code so a fenced block is not mistaken for a run of inline spans. Entity references are decoded at the end, which is why the output reads as text rather than as markup.
What the results mean
- Tables found
- Table markup that could not be converted. Cells come through as plain text, so any table needs rebuilding by hand.
- Nested lists found
- Lists inside list items. They are lifted to a single level, so check the structure if the original nesting carried meaning.
- Links
- Anchors converted to Markdown link syntax with the href preserved. Link text is stripped of any inner markup.
Common problems and fixes
- The output is full of stray blank lines and fragments
- The source is probably a full page rather than a content region. Navigation, footers and layout wrappers all become empty lines once their tags are stripped. Copy just the article or main element from the browser inspector, which gives a much cleaner result.
- Formatting inside links disappeared
- Link text is flattened to plain text, since Markdown link labels cannot reliably carry nested emphasis across renderers. If the emphasis mattered, add it back by hand around the link rather than inside it.
Frequently asked questions
What is this useful for?
Moving content out of a content management system, turning documentation pages into files you can keep in version control, and cleaning up rich text pasted from an email or a word processor, which typically arrives as deeply nested markup full of inline styles.
Will it keep images?
Yes, converted to Markdown image syntax with the alt text and source preserved. The images themselves are still hosted wherever they were, so if you are moving content you will need to move the files separately.
Can I convert back and forth safely?
Not without loss. HTML can express things Markdown cannot, so a round trip drops attributes, classes and any structure without a Markdown equivalent. Converting once and editing the result is the practical approach.
Put this on your own site
Free to embed, no attribution required beyond the source link the frame carries itself. It runs entirely in your visitor's browser, sets no cookies and loads no third-party script.
<iframe src="https://runthetests.com/embed/html-to-markdown/" width="100%" height="720" style="border:1px solid #e5e5e5;border-radius:8px" title="HTML to Markdown" loading="lazy"></iframe>
Preview it at https://runthetests.com/embed/html-to-markdown/. Embedded pages are marked noindex, so yours stays the canonical copy — not this one.