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
More from this author
+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 neTop issues
#52Feature request: Support for HTML / MHTML files (e.g. Jira exports)5 comments · 2026-08-07#1440.2.4: one image-only page makes the whole PDF convert to nothing, including the pages that do have text4 comments · 2026-08-27#128Support email file formats: `.eml` and `.msg`3 comments · 2026-08-23#96DOCM to MD Conversion - Headings to not match expected numbering from document.3 comments · 2026-08-14#41docx to md puts a backslash between number and period in ordered lists3 comments · 2026-08-06#24Rust CLI binary3 comments · 2026-08-05#11Docker support please3 comments · 2026-08-05#173Multi-column tables collapse into unreadable single-column blobs during PDF conversion2 comments · 2026-09-12
Latest release
v0.2.4 - Scanned pages v0.2.4 2026-08-27Scanned 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相关报道 (5)
51CTOGitHub 爆了! 17K+ Star!20 多种文档格式,一条命令全部转 Markdown2026-08-28blog.csdnanydoc:Firecrawl 出的 Rust 文档转 Markdown,4ms 转换、14 种格式干翻 MarkItDown2026-08-24MSNWord・Excel・PDFなどの文書をAIが読みやすいMarkdownに爆速変換する「anydoc」がオープンソース公開(生成AIクローズアップ)2026-08-11blog.csdnGitHub每日热评|Valhalla 静态工程审阅|AnyDoc 源码证据驱动评测2026-08-09https://www.80aj.com/解决 Agent 文档读取痛点:DeepSeek Harness 生态新增万能格式转换插件2026-08-14
News & coverage (6)
Hacker Newsanydoc: Rust library that converts 14 document formats to Markdown▲ 4 · 0 comments · 2026-08-05Hacker NewsAnydoc: Word, PowerPoint, Excel, OpenDocument, RTF, ePub, CSV, PDF to Markdown▲ 3 · 0 comments · 2026-08-11noteWhat is "anydoc," the OSS that converts Office documents into "LLM-readable Markdown" in milliseconds?2026-08-06noteanydoc has been released, converting 14 formats including Word, Excel, and PDF to Markdown in under 5 milliseconds. It runs entirely locally, so API costs are zero.2026-08-06技術評論社サイトについて2026-08-04irblog.prnewswire.comHyland Software Acquires AnyDoc Software2013-02-28