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,471⑂ 1,522
RustCreated 2026-08-03firecrawl.github.io/anydoc/
23,471
stars
+140+156+947
1,522
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

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

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON