A polyglot document intelligence framework with a Rust core. Extract text, metadata, and structured information from PDFs, Office documents, images, and 50+ formats. Available for Rust, Python, Ruby, TypeScript/Node.js—or use via CLI, REST API, or MCP server.
🚀 Version 4.0.0 Release Candidate This is a pre-release version. We invite you to test the library and report any issues you encounter. Help us make the stable release better!
- Rust-powered core – High-performance native code for text extraction
- Truly polyglot – Native bindings for Rust, Python, Ruby, and TypeScript/Node.js
- Production-ready – Battle-tested with comprehensive error handling and validation
- 50+ file format families – PDF, Office documents, images, HTML, XML, emails, archives, and more
- OCR built-in – Multiple backends (Tesseract, EasyOCR, PaddleOCR) with table extraction support
- Flexible deployment – Use as library, CLI tool, REST API server, or MCP server
- Memory efficient – Streaming parsers handle multi-GB files with constant memory usage
📖 Complete Documentation • 🚀 Installation Guides
pip install kreuzberggem install kreuzbergnpm install @goldziher/kreuzbergTypeScript/Node.js Documentation →
[dependencies]
kreuzberg = "4.0"brew install goldziher/tap/kreuzbergcargo install kreuzberg-cliEach language binding provides comprehensive documentation with examples and best practices. Choose your platform to get started:
- Python Quick Start → – Installation, basic usage, async/sync APIs
- Ruby Quick Start → – Installation, basic usage, configuration
- TypeScript/Node.js Quick Start → – Installation, types, promises
- Rust Quick Start → – Crate usage, features, async/sync APIs
- CLI Quick Start → – Command-line usage, batch processing, options
| Format | Extensions | Metadata | Tables | Images |
|---|---|---|---|---|
.pdf |
✅ | ✅ | ✅ | |
| Word | .docx, .doc |
✅ | ✅ | ✅ |
| Excel | .xlsx, .xls, .ods |
✅ | ✅ | ❌ |
| PowerPoint | .pptx, .ppt |
✅ | ✅ | ✅ |
| Rich Text | .rtf |
✅ | ❌ | ❌ |
| EPUB | .epub |
✅ | ❌ | ❌ |
All image formats support OCR: .jpg, .jpeg, .png, .tiff, .tif, .bmp, .gif, .webp, .jp2
| Format | Extensions | Features |
|---|---|---|
| HTML | .html, .htm |
Metadata extraction, link preservation |
| XML | .xml |
Streaming parser for multi-GB files |
| JSON | .json |
Intelligent field detection |
| YAML | .yaml, .yml |
Structure preservation |
| TOML | .toml |
Configuration parsing |
| Format | Extensions | Features |
|---|---|---|
.eml, .msg |
Full metadata, attachment extraction | |
| Archives | .zip, .tar, .gz, .7z |
File listing, metadata |
LaTeX (.tex), BibTeX (.bib), Jupyter (.ipynb), reStructuredText (.rst), Org Mode (.org), Markdown (.md)
Multiple OCR backends (Tesseract, EasyOCR, PaddleOCR) with intelligent table detection and reconstruction. Extract structured data from scanned documents and images with configurable accuracy thresholds.
Process multiple documents concurrently with configurable parallelism. Optimize throughput for large-scale document processing workloads with automatic resource management.
Handle encrypted PDFs with single or multiple password attempts. Supports both RC4 and AES encryption with automatic fallback strategies.
Automatic language detection in extracted text using fast-langdetect. Configure confidence thresholds and access per-language statistics.
Extract comprehensive metadata from all supported formats: authors, titles, creation dates, page counts, EXIF data, and format-specific properties.
Production-ready API server with OpenAPI documentation, health checks, and telemetry support. Deploy standalone or in containers with automatic format detection and streaming support.
Model Context Protocol server for Claude and other AI assistants. Enables AI agents to extract and process documents directly with full configuration support.
Official Docker images available in multiple variants:
- Core (~1.0-1.3GB): Tesseract OCR, Pandoc, modern Office formats
- Full (~1.5-2.1GB): Adds LibreOffice for legacy Office formats (.doc, .ppt)
All images support API server, CLI, and MCP server modes with automatic platform detection for linux/amd64 and linux/arm64.
Kreuzberg is built with a Rust core for efficient document extraction and processing.
- Rust core – Native code for text extraction and processing
- Async throughout – Asynchronous processing with Tokio runtime
- Memory efficient – Streaming parsers for large files
- Parallel batch processing – Configurable concurrency for multiple documents
- Zero-copy operations – Efficient data handling where possible
- Installation Guide – Setup and dependencies
- User Guide – Comprehensive usage guide
- API Reference – Complete API documentation
- Format Support – Supported file formats
- OCR Backends – OCR engine setup
- CLI Guide – Command-line usage
- Migration Guide – Upgrading from v3
Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.