# compress.new > Convert any webpage to clean markdown optimized for LLM context windows. Prepend `compress.new/` to any URL to get markdown instantly. Free, no API key required. compress.new is a service that fetches a target URL and converts its HTML to markdown. It strips navigation, ads, and boilerplate, returning only the content that matters for AI context windows. With smart compression, you can cut token usage by up to 90%. ## Request format GET https://compress.new/[?] All other query params (not feature flags) are forwarded to the target URL. The worker identifies itself with the user agent `compress.new/1.0` and respects `robots.txt`. ## Features All features are opt-in via query parameters and can be combined freely. - `compress[=]` - Deduplicate repeated substrings using short tokens (§1, §2) and a prepended dictionary. Presets: `low`, `med`, `high`, `true` (`true` is the most aggressive and kept for backward compatibility with `compress=true`). `compress` or `compress=` defaults to `med`. Unknown preset values disable compression. Compression is returned only when final token usage (including note + dictionary) is at least 5% lower. - `main_only=true` - Strip headers, footers, navigation, and sidebars. Isolates the primary content area before selector filtering. - `selector=` - Extract only DOM nodes matching a CSS selector before conversion. Supports any valid CSS selector. When combined with `main_only=true`, the selector is evaluated on the main-only DOM. - `metadata=true` - Prepend YAML front matter with page title, description, URL, Open Graph type, and canonical image. - `schema_org=true` - Extract schema.org JSON-LD structured data and append as fenced JSON blocks. - `retain_images=true` - Keep image tags in the output as markdown image syntax (images are stripped by default). ## Response format ### Success (200) - Body: converted markdown text (`Content-Type: text/markdown; charset=utf-8`) - `x-markdown-tokens` header: token count using the `o200k_base` encoding (GPT-5 compatible) - `x-markdown-tokens-compressed` header: tokens saved vs uncompressed (returned only when compression is requested with a valid preset; value is `0` when savings are below 5% and original markdown is returned) ### Errors All errors return JSON: `{"error": "reason"}`. - 400 - Target URL is missing, invalid, or uses a non-HTTP(S) protocol - 403 - The site's robots.txt disallows automated access - 429 - Rate limited (500 requests per IP per day, resets at UTC midnight) - 502 - Target page couldn't be fetched (upstream error, DNS failure, bot block, or empty content) - 504 - Target page didn't respond within 15 seconds ## Examples - [Basic conversion](https://compress.new/https://example.com) - [With default compression preset (`med`)](https://compress.new/https://example.com?compress) - [With aggressive compression preset (`true`)](https://compress.new/https://example.com?compress=true) - [Main content only](https://compress.new/https://example.com?main_only=true) - [Combined features](https://compress.new/https://example.com?compress=high&main_only=true&metadata=true) ## Optional - [Landing page](https://compress.new)