web-to-markdown
Clean, dense, LLM-ready Markdown — from any page or raw HTML.
web-to-markdown strips navigation, ads, cookie banners and scripts, and turns what's left into Markdown sized for an LLM's context window. It runs as a CLI, a TypeScript/JS library, or an authenticated API on Cloudflare Workers — same conversion core behind all three.
Handles static HTML and framework-hydrated pages (Next.js, Nuxt, JSON-LD) without a headless browser — when a client-rendered page arrives empty, it reads the data the framework already serialized into the response. It never executes JavaScript, so for pages whose content only exists after their own code runs, with nothing embedded to fall back on, this isn't the right tool.
See it in action
A fixed input/output pair showing what the conversion actually produces.
# Building Next-Gen AI Microservices Model Context Protocol allows seamless tool execution. ```bash npx @karlangas12/web-to-markdown https://example.com ```
Static example — not a live API call.
Authenticated edge API
Every /v1/* request needs an API key
sent as x-api-key
(an Authorization: Bearer header is
also accepted). GET /salud is a
public health check and needs no key.
# Fetch clean Markdown via API curl -X POST https://web-to-markdown.karlangas12.workers.dev/v1/convert \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "options": {"extract_metadata": true}}'
Request
- Base URL: web-to-markdown.karlangas12.workers.dev
- Body: exactly one of
urlorhtml - Options:
include_images,extract_metadata(both defaultfalse)
Rate-limit headers
RateLimit-Limit— quota for your planRateLimit-Remaining— requests left in the windowRateLimit-Reset— Unix timestamp when it resets
Simple, metered pricing
Billing runs through Polar.sh as Merchant of Record. The API key is delivered by email right after checkout.
Free
- 500 requests / month
- Full API + CLI + SDK access
- No credit card to try the CLI locally
Pro
- 2,000 requests / month
- API key delivered by email at checkout
- Same Cloudflare Workers API, higher quota