# anydoc

> Open-source Rust library that converts Word, PowerPoint, Excel, PDF, and more to clean GitHub-Flavored Markdown, with Node.js, Python, browser (WebAssembly), and CLI bindings.

anydoc is an open-source Rust library built by Firecrawl (Sideguide Technologies Inc.) that converts office documents — Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF — into clean GitHub-Flavored Markdown. It is available on crates.io, npm, and PyPI, and runs entirely locally with no external services or ML models required. The project reached v0.1.6 shortly after its August 2026 launch and has accumulated over 8,600 GitHub stars.

## What It Is

anydoc is a document-to-Markdown conversion library in the same category as tools like pandoc, markitdown, and docling, but built specifically to handle the full breadth of common office formats in a single, consistent pipeline. Every supported format — fourteen in total — is parsed into a shared document model and rendered through one GFM serializer, so headings, nested lists, merged table cells, and footnotes come out identically regardless of whether the source was a `.doc` from 2003 or a `.pptx` from yesterday. The library is written in pure Rust, which means no ML models, no external services, and a median conversion time the project benchmarks at under 5 ms per document.

## Supported Formats and Format Detection

anydoc covers eight format families across fourteen file extensions:

- **Word**: `.doc`, `.docx`, `.docm`
- **PowerPoint**: `.ppt`, `.pps`, `.pot`, `.pptx`, `.pptm`, `.ppsx`, `.ppsm`
- **Excel**: `.xls`, `.xlsx`, `.xlsm`, `.xlsb`
- **OpenDocument**: `.odt`, `.ods`, `.odp`
- **Rich Text Format**: `.rtf`
- **EPUB**: `.epub`
- **CSV**: `.csv`
- **PDF**: `.pdf` (text-based, via the companion pdf-inspector library)

Format detection reads from the file's bytes — PDF header, RTF open group, OLE stream names, ZIP package mimetype — rather than the file extension, so mislabeled files still convert correctly. CSV, which has no byte-level marker, falls back to the extension or an explicit format hint.

## Bindings and Deployment Model

The library ships with first-class bindings for four environments beyond Rust itself:

- **Node.js** (`@firecrawl/anydoc`): conversion runs on the libuv thread pool and never blocks the event loop; TypeScript types are included.
- **Python** (`firecrawl-anydoc`): releases the GIL during conversion so other threads keep running; Python stubs ship with the package.
- **Browser / WebAssembly** (`@firecrawl/anydoc-wasm`): compiled to WebAssembly so conversion happens entirely client-side — files never leave the user's machine. The project homepage demonstrates this live.
- **CLI** (`npx @firecrawl/anydoc`): downloads a prebuilt binary for the current platform on first run; reads from stdin or a file path and writes Markdown to stdout or a file.

The library also ships as an Agent Skill (`npx skills add firecrawl/anydoc`), making it directly consumable by AI coding agents such as Claude Code, Codex, Cursor, and OpenCode.

## Benchmark Results

The project publishes a benchmark comparing anydoc against six other converters (libreoffice, unstructured, markitdown, pandoc, docling, mammoth) across 100 real-world documents. According to the project's own benchmark methodology — where an LLM judge scores outputs against LibreOffice-rendered ground truth on completeness, structure, formatting, and cleanliness — anydoc was the only tool to handle all fourteen formats, scored highest on every judged format, and converted documents at a median of 4.4 ms versus the next-fastest tool's 52.5 ms. The benchmark harness lives in the `bench/` directory of the repository; the corpus is not redistributable.

## Architecture

The conversion pipeline follows a consistent path: format detection → per-format parser → shared Document model → GFM serializer. Because all formats funnel through the same model and serializer, a bug fix in table escaping for one format automatically applies to all others. PDF is handled separately via pdf-inspector, which covers text-based PDFs locally; scanned pages requiring OCR are handled by the hosted Firecrawl Parse API, which wraps this same library.

## Update: v0.1.6

The repository was created in August 2026 and reached v0.1.6 on August 5, 2026 — just two days after the initial commit. Releases are tagged `v<version>` and trigger automated publishing to crates.io, npm, and PyPI via GitHub Actions. The project is under active development with 35 open issues and regular pushes to the main branch.

## Features
- Converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF to GitHub-Flavored Markdown
- Shared document model ensures consistent output across all 14 supported formats
- Content-based format detection reads from file bytes, not extension
- Pure Rust implementation with no ML models or external services
- Median conversion time under 5ms per document
- Node.js bindings with libuv thread pool (non-blocking)
- Python bindings that release the GIL during conversion
- WebAssembly build for in-browser conversion (files never leave the machine)
- CLI via npx with stdin/stdout support
- Agent Skill integration for Claude Code, Codex, Cursor, and OpenCode
- Full document structure: headings, lists, tables with merged cells, footnotes, code blocks
- Embedded asset extraction with raw bytes and media type tagging
- Text-based PDF support via pdf-inspector (no OCR service required)
- TypeScript types and Python stubs included
- MIT licensed open-source

## Integrations
Node.js, Python, Rust, WebAssembly, Claude Code, OpenAI Codex, Cursor, OpenCode, Firecrawl Parse, pdf-inspector, npm, PyPI, crates.io, skills.sh

## Platforms
WINDOWS, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.1.6

## Links
- Website: https://firecrawl.github.io/anydoc/
- Documentation: https://github.com/firecrawl/anydoc#quick-start
- Repository: https://github.com/firecrawl/anydoc
- EveryDev.ai: https://www.everydev.ai/tools/anydoc
