Docstrange

Stale
GitHub Python MIT

Description

Extract and convert data from any document (PDFs, images, Word, PPT, URLs) into multiple formats including Markdown, JSON, and CSV.

Key Features

  • Multi-format conversion — transforms PDF, DOCX, PPTX, XLSX, images, and URLs into Markdown, JSON, CSV, and HTML
  • 7B parameter model — upgraded core model for significantly higher accuracy and deeper document understanding
  • Advanced OCR pipeline — extracts text from scanned documents, phone photos, and receipts with high accuracy
  • Structured extraction — extract specific fields or conform output to custom JSON schemas
  • Cloud and local modes — free cloud API for up to 10,000 docs/month, or 100% private local GPU processing
  • Built-in web UI — local drag-and-drop interface for offline document conversion

Use Cases

💡 RAG pipeline preparation — converting documents into LLM-optimized Markdown for retrieval-augmented generation
💡 Invoice and receipt processing — extracting key-value data like invoice numbers and totals from scanned documents
💡 Document digitization — converting legacy paper documents and photos into searchable structured formats
💡 Compliance-sensitive environments — running 100% local processing to keep document data on-premise

Quick Start

pip install docstrange → from docstrange import DocumentExtractor → extractor = DocumentExtractor() → result = extractor.extract('document.pdf') → result.extract_markdown() or result.extract_data()

Related Projects