firecrawl/anydoc

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

What it solves

anydoc is a high-performance library designed to convert a wide variety of office documents into clean, GitHub-Flavored Markdown. It solves the problem of inconsistent and slow document parsing across different file formats, providing a single, consistent output format that is ideal for LLM-ready data preparation.

How it works

The library is written in pure Rust for speed and does not rely on ML models or external services. It uses a multi-step process:

  1. Format Detection: It identifies the file type based on content markers (bytes) rather than relying on file extensions.
  2. Format Parser: Each supported format has its own parser that converts the document into a shared internal document model (containing blocks, inlines, tables, and assets).
  3. GFM Serializer: This shared model is then rendered into Markdown via a single serializer, ensuring identical behavior for elements like tables and footnotes across all input formats.
  4. PDF Handling: Text-based PDFs are converted directly to Markdown using pdf-inspector.

Who it’s for

  • AI Developers: Those building RAG pipelines or LLM applications that need to ingest a mixed bag of office documents.
  • Agentic Workflows: Developers creating AI agents that can read and process local files via the provided "Agent Skill" integration.
  • Software Engineers: Anyone needing a fast, local, and consistent document-to-markdown converter with bindings for Node.js, Python, and Rust, or the ability to run it in the browser via WebAssembly.

Highlights

  • Broad Format Support: Supports 14 formats including Word, PowerPoint, Excel, OpenDocument, and PDF.
  • Extreme Speed: Median conversion time is under 5ms per document.
  • Consistent Output: A shared document model ensures that formatting (like LaTeX equations for math) is uniform across all formats.
  • Local Processing: No external API calls or ML models required for core conversion, with a WebAssembly version for local browser-based conversion.
  • Agent Ready: Integration as an Agent Skill allows AI agents to easily adopt the document reading capability.

Related

  • Project
  • Project
  • Project
  • Project
  • Project