GitHub - firecrawl/anydoc: Convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF to clean Markdown. Built in Rust, with Node.js and Python bindings.

Open the original

Short summary

anydoc is a Rust library that converts 14 document formats (Word, PowerPoint, Excel, PDFs, etc.) into clean GitHub-flavored Markdown in milliseconds. It works across Node.js, Python, and the browser via WebAssembly, and benchmarks show it's 200x faster than LibreOffice while scoring higher quality than competing tools. The library parses any format into a shared document model, so tables, headings, and formatting behave consistently regardless of input type.

  • anydoc converts 14 document formats to Markdown in ~4.4ms per file versus LibreOffice's 1129ms—about 200x faster
  • In benchmarks against 6 competitors on 100 documents, anydoc scored 81 overall (vs. 40-70 for others) and was the only tool supporting all 14 formats
  • It works by parsing every format into a shared document model before rendering to Markdown, keeping tables, headings, and formatting consistent regardless of input type
  • Scoring was done by Claude Sonnet as a blind judge against ground-truth images across 482 verdicts

Full summary

anydoc is a Rust library that converts office documents into clean Markdown fast—we're talking single-digit milliseconds per file. It handles 14 formats: Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF. The library comes with bindings for Node.js, Python, WebAssembly, and Rust itself, so you can use it however fits your workflow. Built by Firecrawl, it's designed to prep documents for LLMs by producing consistent output regardless of input format. You can test it in your browser using the WebAssembly version, which processes files locally without uploading them. The real differentiator is consistency and speed. anydoc parses every format into a shared document model, then renders through a single Markdown serializer. This means tables, headings, lists, footnotes, and formatting behave identically whether you feed it a 2003 Word doc or yesterday's PowerPoint. The library preserves document structure—anchor links on headings, merged table cells, nested lists, speaker notes, embedded images. It detects formats by reading the file bytes themselves (PDF headers, ZIP mimetypes, etc.), so mislabeled files still work. Images and objects render as alt text in Markdown, with raw bytes available if you need them. In benchmarks against six competitors on 100 real documents, anydoc scored 81 overall while the next-best tools scored in the 40–70 range. More telling: it was the only tool supporting all 14 formats. LibreOffice took 1129ms per document; anydoc averaged 4.4ms. The per-format breakdown shows anydoc leading on every format it was tested against—88 on DOCX, 87 on DOC, 80 on ODT. The scoring used Claude Sonnet 5 as a blind judge comparing outputs against ground truth images, with 482 total verdicts to reduce bias. If you're building a pipeline that handles mixed document types and need reliable, fast conversion to LLM-ready text, this is the tool that actually covers everything.

Ask about this article