firecrawl /anydoc

Convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF to clean Markdown. Built in Rust, with Node.js and Python bindings.

★ 23,554⑂ 1,532👁 57⑃ 134● 88▤ 14
RustMITCreated 2026-08-03firecrawl.github.io/anydoc/
More from this author
Download: v0.2.4 - Scanned pagesv0.2.4 ↓0.2.42026-08-27
+9
Daily
+223
Weekly
+782
Monthly
23,554
stars
1,532
forks
57
watchers
134
prs
88
issues
14
releases

README

anydoc







Fast Rust library that converts documents (Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF) into clean GitHub-Flavored Markdown. Includes bindings for Node.js, Python, and the browser (WebAssembly).

Built by Firecrawl to turn any office document into LLM-ready Markdown in single-digit milliseconds, with one consistent output no matter which format goes in. It powers Firecrawl Parse, so if you'd rather not run it yourself, the hosted API gives you the same conversion plus our OCR models for the scanned pages anydoc can't read on its own.

Try it in your browser: the demo page runs the library as WebAssembly, so files are converted locally and never leave your machine.

 Quick start

 Agent skill

anydoc ships as an Agent Skill, so your agent can read any document it runs into:

bash
npx skills add firecrawl/anydoc


The skill teaches the agent to convert documents with the anydoc CLI. Works with Claude Code, Codex, Cursor, OpenCode, and any other compatible agent.

 CLI

bash
npx @firecrawl/anydoc report.docx                Markdown to stdout
npx @firecrawl/anydoc slides.pptx -o slides.md   or to a file
npx @firecrawl/anydoc - --format csv  Full API reference: node/README.md

 Python

bash
pip install firecrawl-anydoc


python
import anydoc

 From a file path:
markdown = anydoc.to_markdown("report.docx")

 To enable OCR:
markdown = anydoc.to_markdown("report.docx", ocr="hosted")

 From bytes, with the format detected from the content:
markdown = anydoc.to_markdown_bytes(data)

 Or name it, which signature-less formats (CSV) need:
markdown = anydoc.to_markdown_bytes(data, "csv")

 Or stop at the document model, which also carries embedded assets:
document = anydoc.to_document(data)


 Full API reference: python/README.md

 Browser (WebAssembly)

bash
npm install @firecrawl/anydoc-wasm


js
import init, { toMarkdownBytes, toDocument } from '@firecrawl/anydoc-wasm';

await init();

// From bytes, with the format detected from the content:
const markdown = toMarkdownBytes(bytes);

// Or name it, which signature-less formats (CSV) need:
const fromCsv = toMarkdownBytes(bytes, 'csv');

// Or stop at the document model, which also carries embedded assets:
const document = toDocument(bytes);


 Full API reference: wasm/README.md

 Rust

bash
cargo add anydoc


rust
// From a file path:
let markdown = anydoc::to_markdown("report.docx")?;

// From bytes, with the format detected from the content:
let markdown = anydoc::to_markdown_bytes(&bytes, None)?;

// Or name it, which signature-less formats (CSV) need:
let markdown = anydoc::to_markdown_bytes(&bytes, anydoc::Format::Csv)?;

// Or stop at the document model, which also carries embedded assets:
let document = anydoc::to_document(&bytes, None)?;


 OCR

anydoc reads text-based PDFs locally but does no OCR, so a PDF with scanned or image-only pages fails with NeedsOcr. Opt in and those documents go to Firecrawl Parse, which OCRs them and returns the same Markdown. No signup ne

Top issues

Latest release

v0.2.4 - Scanned pages v0.2.4 2026-08-27
Scanned pages are reported, not dropped

A PDF with scanned or image-only pages used to convert with those pages silently missing, and a fully scanned one failed as unsupported. Conversion now fails naming the pages: ConvertError::NeedsOcr { pages, page_count } in Rust, needsOcr with pages and pageCount on the error in Node and wasm, NeedsOcrError with .pages and .page_count in Python, exit code 3 on the CLI.


$ anydoc scan.pdf
anydoc: pages 2, 5-7 of 12 need OCR


 Hosted OCR, opt in

anydoc converts locally and does not do OCR. In Node and Python, ocr: 'hosted' / ocr="hosted" (CLI: --ocr ho

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON