About anydoc - Convert 14 Document Formats to Markdown
"Any document in. Markdown out."
What is anydoc Overview
anydoc is a fast, open-source Rust library by Firecrawl that converts office documents — Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF — into clean GitHub-Flavored Markdown (GFM).
Its mission is simple: clear the document-reading bottleneck for the LLM era. When you need to feed a .docx report, a .pptx deck, or an .xlsx dataset to a language model, anydoc turns it into well-structured, noise-free Markdown. Median conversion time is under 5 milliseconds per document, and it is the conversion engine behind Firecrawl Parse.
It is not another wrapper around office tooling: no LibreOffice, no OCR services, no ML models. Conversion is a pure local parse.
Core features Highlights
- One output standard: every format parses into a shared document model and renders through the same Markdown serializer. Heading anchors, bold/italic/strike, inline code and code blocks, links and internal cross-references, bullet/numbered/nested/task lists (original numbering preserved), tables with merged cells, block quotes, footnotes and endnotes, speaker notes — identical behavior across formats.
- Embedded assets kept: images and embedded objects render as alt text in Markdown, while the raw bytes stay on the document model with their media types; external URL images become regular Markdown images.
- Content-based format detection: the format is read from the bytes (PDF headers, RTF open groups, OLE stream names, ZIP mimetype) — mislabeled files still convert.
- Millisecond performance: pure Rust, median conversion under 5ms.
- Local PDF support: text-based PDFs convert locally through pdf-inspector; no OCR service.
- Five bindings: Node.js (libuv thread pool, non-blocking), Python (releases the GIL), WebAssembly (in-browser, files never leave the device), CLI, and Agent Skill.
- Agent-ready: one
npx skills add firecrawl/anydoccommand lets Claude Code, Codex, and Cursor read office documents. - Safety: fixed limits on decompression, nesting depth, and node count protect against zip bombs.
- Thoroughly tested: snapshot tests, mutation testing, and per-format cargo-fuzz fuzzing targets.
Architecture How it works
The design philosophy fits in one sentence: one model, every format.
.docx / .xls / .pdf / .epub / ...
│
▼
per-format parsers
│
▼
┌─────────────────────┐
│ unified Document │ ← every format converges here
│ model │
└─────────────────────┘
│
▼
unified Markdown serializer
│
▼
GitHub-Flavored MarkdownKey dependencies:
| Dependency | Purpose |
|---|---|
| Rust | Core language, compiled to native / WebAssembly |
| calamine | Excel parsing (xlsx/xls/xlsb etc.) |
| pdf-inspector | Local PDF conversion |
| flate2 | Compression stream handling |
| wasm-bindgen | WebAssembly bindings |
| maturin | Python packaging |
Note: anydoc does not depend on markitdown, the firecrawl SDK, or LibreOffice — it is Firecrawl's own standalone engine, used directly by Firecrawl Parse.
Supported formats Format list
| Category | Extensions |
|---|---|
| Word | .doc .docx .docm |
| PowerPoint | .ppt .pps .pot .pptx .pptm .ppsx .ppsm |
| Excel | .xls .xlsx .xlsm .xlsb |
| OpenDocument | .odt .ods .odp |
| Rich Text Format | .rtf |
| EPUB | .epub |
| CSV | .csv |
.pdf |
14 formats in total — the widest coverage among comparable tools (for reference: libreoffice 12/14, unstructured 8/14, markitdown 6/14, pandoc 5/14, docling 4/14, mammoth 1/14).
Benchmark Performance
Firecrawl's official benchmark ran 100 real documents across 14 formats against seven converters (score 0-100, higher is better; speed is median conversion time):
| Tool | Formats | Median | Score | Completeness | Structure | Fidelity | Cleanliness |
|---|---|---|---|---|---|---|---|
| anydoc | 14/14 | 4.4ms | 81 | 87 | 79 | 78 | 81 |
| libreoffice | 12/14 | 1129.5ms | 40 | 59 | 42 | 40 | 24 |
| unstructured | 8/14 | 572.9ms | 58 | 63 | 76 | 59 | 51 |
| markitdown | 6/14 | 134.8ms | 33 | 65 | 78 | 66 | 60 |
| pandoc | 5/14 | 102.1ms | 34 | 56 | 74 | 57 | 56 |
| docling | 4/14 | 513.6ms | 21 | 57 | 60 | 60 | 57 |
| mammoth | 1/14 | 52.5ms | 8 | 70 | 84 | 71 | 75 |
The takeaway: broadest format support, fastest speed, and the highest quality across the board. See the benchmark page for a deeper read.
License MIT
anydoc is released under the MIT License — free to use, modify, and sell. Source lives at github.com/firecrawl/anydoc, published to crates.io (Rust), npm (Node/WASM/CLI), and PyPI (Python).
Try it now Get started
- Don't want to install anything? Drag a document into the online converter on the home page — it runs locally in your browser.
- Want it in your project? Pick your language on the install page.
- Want the full tour? Head to the guide.
One-liner
anydoc = 14 formats + one document model + one Markdown output + millisecond speed — fully local, MIT-licensed, and agent-friendly.