Skip to content

Web-to-Markdown Converter

Convert pasted HTML or a fetched URL to Markdown for LLM input, dropping scripts, navigation and footers, and estimate the token savings.

Web-to-Markdown Converter

Output

Working…

Updated . Provided as is. Check the output before you rely on it in production.

How to use Web-to-Markdown Converter

  1. 1

    Paste HTML or a URL

    Paste a page's HTML, or switch to Fetch URL mode to load a public page.

  2. 2

    Convert

    Headings, paragraphs, links and lists are converted to Markdown, with scripts and styles dropped.

  3. 3

    Check the token savings

    Compare the estimated token count of the HTML and the Markdown to see how much context you save.

  4. 4

    Copy the Markdown

    Copy it into a prompt, a RAG index or documentation.

Questions and answers

Why convert web pages to Markdown for LLMs?
Markdown keeps the structure models need while dropping markup, which usually cuts the token count substantially.
Why does Fetch URL fail on some sites?
The browser can only fetch pages that allow cross-origin requests. If a fetch fails, paste the HTML instead.

Use it as an API

Web-to-Markdown Converter is also callable as a free HTTP JSON API at https://aidevhub.io/api/web-to-markdown/ — GET with query parameters or POST with a JSON body, no authentication, CORS enabled, fair use (abusive traffic is throttled at the edge; there is no per-request quota header). Responses return { ok, tool, result, meta }.

curl -s -X POST https://aidevhub.io/api/web-to-markdown/ \
  -H "Content-Type: application/json" \
  -d '{"input":"<html><body><h1>Example</h1><p>Hello world.</p></body></html>","mode":"html"}'

Machine-readable contract: /api/tool/web-to-markdown.json All API endpoints: /agents/ LLM site index: /llms.txt

For AI agents: how to call this tool

Machine-readable contract, endpoints and examples. Humans can ignore this section.

Best Path For Builders

Dedicated API endpoint

Deterministic outputs, machine-safe contracts, and production-ready examples.

Dedicated API

https://aidevhub.io/api/web-to-markdown/

OpenAPI: https://aidevhub.io/api/openapi.yaml

GET /api/web-to-markdown/ GET web-to-markdown
POST /api/web-to-markdown/ POST web-to-markdown

Unified Runtime API

https://aidevhub.io/api/tools/run/?toolId=web-to-markdown&a=%3Chtml%3E%0A%20%20%3Cbody%3E%0A%20%20%20%20%3Ch1%3EExample%3C%2Fh1%3E%0A%20%20%20%20%3Cp%3EHello%20world.%3C%2Fp%3E

GET and POST are supported at /api/tools/run/ with identical validation and limits.

Limit: 10 req / 60s, input max 512 KB.