HTML to Markdown
ai_html_to_markdownConvert HTML to clean Markdown for reading or feeding to a model, with optional main-article extraction, CSS selector targeting, absolute links and file output. Runs locally; nothing is uploaded.
Instructions
Convert HTML to clean Markdown for reading or feeding to a model: headings, lists, links, images, code blocks, GitHub-style tables and strikethrough. Give the HTML inline ("html") or as a file ("path": local path or base64). Optional "readable" keeps only the main article (Mozilla Readability, falls back to the whole body), "selector" converts only matching elements, "baseUrl" makes relative links absolute, "includeLinks": false drops link URLs and images. Scripts, styles and forms are removed. Inline Markdown is cut at maxChars (default 200k) with a note; give "output" to save the whole thing to a .md file. Runs locally; nothing is uploaded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | The HTML text. Give this or "path". | |
| path | No | An .html file instead of "html": local path or base64. | |
| output | No | Write the Markdown to this file (or folder ending in "/") and return its path instead of the inline text. | |
| baseUrl | No | URL the HTML came from, to make relative links and images absolute. | |
| maxChars | No | Cut the inline Markdown after this many characters, with a note (a file written with "output" is never cut). Default 200000. | |
| readable | No | Keep only the main content (article text), dropping navigation, ads and footers. | |
| selector | No | CSS selector: convert only the matching elements (e.g. "main", "article .post"). | |
| includeLinks | No | Keep links and images. False turns links into plain text and drops images. |