FTFreeTools
⇩

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

Last changed in v0.11.1

Loading tool…

How to use

  1. 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.
  2. 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.
  3. 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.
  4. Markdown tables cannot merge cells, so colspan / rowspan content is kept but flattened, with its own note — otherwise the table just looks broken.
  5. Only characters that change meaning are escaped. Backslashing every punctuation mark fills the output with \, \; and destroys readability, while Markdown never interprets them.
  6. Runs entirely in the browser. The HTML never reaches a server.

Related tools