RepositoryRustUSUnited States
firecrawl

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.8kstars
1.6kforks
57issues
3views

📄 anydoc: Office Documents to Markdown, in Milliseconds

One consistent Markdown output from every office format, powered by a pure Rust core.

anydoc, built by Firecrawl, converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF files into clean GitHub-Flavored Markdown. It parses every supported format into a single shared document model and renders through one Markdown serializer, so headings, tables, footnotes, and escaping behave identically regardless of input format. Conversion runs in pure Rust with no ML models or external services, targeting single-digit millisecond latency per document.

✨ Highlights

  • Unified output: All formats parse into a shared document model and render through a single Markdown serializer.
  • Full structure: Headings with anchors, bold/italic/strikethrough, inline code, links, nested lists, tables with merged cells, block quotes, footnotes, and speaker notes.
  • Embedded assets: Images and embedded objects render as alt text in Markdown, with raw bytes available on the document model tagged by media type.
  • Content-based detection: Format read from file bytes (PDF header, RTF group, OLE stream names, ZIP mimetype), so mislabeled files still convert correctly.
  • Fast: Pure Rust, no ML models, no external services. Median conversion time under 5ms per document.
  • Non-blocking bindings: Node.js runs on the libuv thread pool; Python releases the GIL. TypeScript types and Python stubs ship with packages.
  • PDF support: Text-based PDFs convert locally via pdf-inspector, no OCR service required.
  • Agent ready: Ships as an Agent Skill for Claude Code, Codex, Cursor, OpenCode, and other compatible agents.

💡 Why it matters

anydoc avoids the usual toolchain sprawl where each office format needs its own parser, escaping rules, and rendering path. By normalizing to one document model and one serializer, it delivers predictable Markdown regardless of whether the input is a 2003-era .doc or a modern .pptx. That consistency matters when feeding documents into LLM pipelines or knowledge bases where downstream consumers expect stable structure.

It fits best anywhere office documents need to become LLM-ready Markdown quickly and reliably, whether in a CLI workflow, a server-side service, or a browser app via WebAssembly. Firecrawl also offers a hosted Parse API with OCR for scanned pages that anydoc alone cannot read.


#Rust #Markdown #DocumentConversion #OpenSource #TiniX