PDF, DOCX, XLSX, CSV, ODT and images in — Markdown out.
document_to_markdown
convertAI
Free for PDF/Office/CSV/HTML. Image input spends Workers AI neurons.
Wraps Cloudflare's AI.toMarkdown() document converter.
Supported: PDF, DOCX, XLSX / XLS / XLSM / XLSB, ODT / ODS, Numbers, CSV, HTML, XML, and images (PNG / JPEG / WebP / SVG / GIF / BMP).
Everything except images is converted with deterministic parsers and costs no AI quota. Image input runs
object detection plus summarisation models, which does spend neurons — for scanned text prefer
describe-image with task: "ocr".
Upload a file from the playground, or pass url / fileBase64 over the API.
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | — | Fetch the document from this URL. |
| fileBase64 | string | — | Base64-encoded file bytes (data: URLs are accepted too). |
| filename | string | — | Original filename — the extension drives format detection. Strongly recommended. |
Markdown plus the detected MIME type and a token estimate.
| Parameter | Type | Default | Description |
|---|---|---|---|
| markdown | string | — | Converted content. |
| name | string | — | Document name. |
| mimetype | string | — | Detected MIME type. |
| tokens | integer | — | Cloudflare's token estimate for the output. |
| format | string | — | markdown or text. |