markdown.new - URL to Markdown Converter
Convert any URL to clean, AI-friendly markdown using Cloudflare's native text/markdown content type.
Quick Usage
Via web_fetch (simplest)
# Basic conversion
web_fetch("https://markdown.new/https://example.com")
# With options
web_fetch("https://markdown.new/https://example.com?method=browser&retain_images=true")
Via curl/script
# GET request (prepend URL)
curl -s "https://markdown.new/https://example.com"
# POST request with options
curl -s 'https://markdown.new/' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com", "method": "browser", "retain_images": true}'
Via included script
# Basic
./scripts/fetch.sh https://example.com
# With browser rendering (for JS-heavy sites)
./scripts/fetch.sh https://example.com browser
# Keep images
./scripts/fetch.sh https://example.com auto true
Options
| Parameter | Values | Default | Description |
|---|---|---|---|
method |
auto, ai, browser |
auto |
Conversion method |
retain_images |
true, false |
false |
Keep image references |
Method Selection
- auto: Try native markdown first, fallback to AI, then browser
- ai: Force Workers AI conversion (good for most sites)
- browser: Force headless browser (required for JS-heavy SPAs)
Response
Returns clean markdown with metadata header:
---
title: Page Title
---
# Content here...
Token count available in x-markdown-tokens response header.
When to Use Browser Mode
Use method=browser for:
- Single-page applications (React, Vue, Angular)
- Sites with heavy JavaScript rendering
- Dynamic content loaded after page load
- Sites that block simple fetches
Integration Tips
- For web_fetch: Just prepend
https://markdown.new/to target URL - For agent-browser: Use the script or curl for more control
- Token budget: Check
x-markdown-tokensheader to estimate costs - Images: Only enable
retain_imagesif you need image URLs in output