Cleaner HTML to Markdown by Default

P
Paulius
ConvertAPI

HTML to Markdown now removes the markup of tags that Markdown has no form for and keeps only their text. Buttons, SVG icons and similar page elements no longer end up in the Markdown as raw HTML, which makes the output cleaner for LLM and RAG use.

Highlights

  • UnsupportedTags now defaults to Bypass. A <button>Copy</button> becomes the plain text Copy, and an SVG icon with no text is left out.
  • Tags listed in PassThroughTags are still copied to the Markdown as HTML, whatever UnsupportedTags is set to.
  • To keep the previous output, set UnsupportedTags to PassThrough.

Parameters

  • UnsupportedTags (collection, default Bypass) - how tags Markdown has no form for are handled. Bypass keeps their text, PassThrough copies them as HTML, Drop removes them with their text, and Fail stops the conversion with an error.

Try it out