⇩
HTML → Markdown
Turn a page fragment or a whole HTML file into Markdown. Parses with HTML's own forgiving rules; scripts, styles and comments are dropped with a reason for each, and merged cells and nested lists each get an explanation.
Runs in browserConvertDocs
Loading tool…
How to use
- Its own scanner, not DOMParser. DOMParser only exists in browsers so none of the rules could be verified offline; it also repairs tags and splits nesting per spec, so the tree it returns is no longer the document you wrote and errors cannot point back at the source.
- Parses with HTML's forgiving rules: void elements like <br> are allowed, <p> / <li> / <td> may omit their closing tags, attribute values may be unquoted. A strict XML parser would reject exactly the real-world HTML this tool exists to handle.
- Everything dropped is listed: head, script, style and comments are never discarded silently — each carries a reason. A notice that flags everything as a problem is a notice nobody reads.
- Markdown tables cannot merge cells, so colspan / rowspan content is kept but flattened, with its own note — otherwise the table just looks broken.
- Only characters that change meaning are escaped. Backslashing every punctuation mark fills the output with \, \; and destroys readability, while Markdown never interprets them.
- Runs entirely in the browser. The HTML never reaches a server.