**Unlocking Document Intelligence: The Rise of Open-Source PDF-to-JSON Extraction**
In the era of artificial intelligence, the value of enterprise data remains locked within unstructured formats—primarily PDFs, scanned images, and slide decks. These traditional document formats pose a significant barrier to large language models (LLMs) and autonomous agents, which require structured data, typically in JSON format, to process and reason effectively. This fundamental mismatch has propelled **open-source document extraction** to the forefront as the definitive solution for converting legacy documents into AI-ready data, all while maintaining data privacy and avoiding costly API dependencies.
However, the journey from PDF to usable JSON is not a single-path process. Understanding the two distinct paradigms—**schema-driven extraction** and **document parsing**—is crucial for selecting the right tool and avoiding costly missteps in implementation.
### The Two Faces of “PDF to JSON”
The phrase “PDF to JSON” encompasses two fundamentally different technical challenges:
1. **Schema-Driven Extraction:** This approach is precision-focused. Users provide a predefined JSON schema outlining specific fields (e.g., `invoice_date`, `total_amount`, `vendor_name`). A model then analyzes the document to identify and extract values that fit these exact fields. This method is ideal for highly structured documents like invoices, legal contracts, tax forms, and receipts where the data points are known in advance.
2. **Document Parsing:** In contrast, this approach prioritizes reconstructing the document’s inherent structure. The model analyzes the visual layout, reading order, typography, tables, and even embedded code or mathematical formulas to convert the page into a clean, structured JSON or Markdown representation. This output is essential for building robust corpora for Retrieval-Augmented Generation (RAG), creating training datasets, or feeding knowledge bases where preserving the original document’s context and hierarchy is paramount.
Choosing the wrong category—using a parser for a simple form or a schema extractor for a complex report—can lead to inaccurate results, wasted computational resources, and project delays.
### The Open-Source Toolkit Landscape
The good news is that a vibrant ecosystem of open-source models and toolkits now exists, enabling organizations to perform these conversions locally. Running these models on-premise eliminates the per-million-page costs associated with proprietary cloud APIs and resolves critical data privacy concerns for sensitive documents. The following models represent the current state-of-the-art, categorized by their primary function.
#### Category 1: Schema-Driven Extraction
* **Datalab Lift:** A 9-billion-parameter vision-language model that exemplifies the power of schema-driven extraction. Users supply a JSON schema, and Lift returns JSON that conforms to it, guaranteeing structural validity. Built on the Qwen 3.5 architecture and running via Hugging Face or vLLM, Lift can process multi-page documents in a single pass. It has set a new benchmark for local models, achieving 90.2% field accuracy on Datalab’s benchmark, though it notes that full-document accuracy remains a challenge for all current models.
* **NuExtract 3:** From NuMind, this 4-billion-parameter model uniquely unifies structured extraction with Optical Character Recognition (OCR). It can take an input and a JSON template to produce structured data while also rendering the document’s text as Markdown. Its multimodal, multilingual design is based on a Qwen backbone and is distributed as an OpenAI-compatible API, making it accessible for a wide range of applications.
#### Category 2: Document Parsing to Structured Formats
This category focuses on converting the entire document into a rich, structured format that preserves its original intent.
* **IBM Docling:** A powerhouse from IBM Research (now under the LF AI & Data Foundation), Docling parses a vast array of formats including PDF, DOCX, PPTX, and XLSX. Its core innovation is the *DoclingDocument* representation, which preserves layout, reading order, tables, and formulas using LaTeX. The output can be Markdown, HTML, lossless JSON, or DocTags, and it integrates seamlessly with LangChain and LlamaIndex.
* **IBM Granite-Docling-258M:** A compact yet powerful 258-million-parameter model designed for one-shot document conversion within the Docling pipeline. Despite its small size, it effectively handles OCR, layout detection, tables, and code, outputting DocTags at a speed of approximately 0.35 seconds per page on an A100 GPU.
* **OpenDataLab MinerU:** A versatile Vision-Language Model (VLM) that tackles the conversion of PDFs, images, DOCX, PPTX, and XLSX into Markdown and JSON. It is specifically engineered to handle complex layouts, including cross-page tables and charts, making it suitable for dense academic or technical documents.
* **Datalab Marker:** Datalab’s pipeline for converting documents into Markdown, JSON, HTML, and chunks. It excels at formatting tables, forms, equations, and code. An optional `–use_llm` flag leverages a language model to further refine tables and forms, offering a high degree of customization.
* **Ai2 olmOCR 2:** A 7-billion-parameter OCR-specialized model from the Allen Institute for AI. It focuses on converting PDFs into clean, readable text and Markdown while meticulously preserving the reading order. It has achieved a leading score of 82.4 on the olmOCR-Bench, demonstrating its strength in handling complex multi-column layouts and even handwriting.
* **DeepSeek DeepSeek-OCR:** Introduced in late 2025, this model from DeepSeek uses a novel “contexts optical compression” technique to represent text-rich pages with compact vision tokens. Its 3-billion-parameter Mixture-of-Experts decoder can output plain text, Markdown, HTML tables, or structured JSON, supporting over 100 languages with a permissive MIT license.
* **Qwen3-VL:** While not document-specific, Alibaba’s Qwen3-VL series serves as a powerful general-purpose multimodal foundation. Many extraction pipelines use it as a base model, prompting it to generate Markdown, JSON, or code. Its broad flexibility and Apache 2.0 license make it a popular fallback option.
### Key Considerations and Takeaways
When embarking on a document digitization project, several critical factors must be considered:
1. **Task Alignment:** The first decision is whether you need **schema-driven extraction** (for filling known fields) or **document parsing** (for rebuilding content). Selecting the wrong category is a primary cause of project failure.
2. **Licensing Complexity:** The open-source landscape is nuanced. Licenses vary from fully permissive (MIT, Apache-2.0) to copyleft (GPL-3.0) or custom commercial terms. For instance, while Lift’s code is Apache-2.0, its weights require a specific license for commercial use. MinerU’s move from AGPL-3.0 to a custom “MinerU Open Source License” in 2026 highlights how the ecosystem is evolving to ease commercial adoption.
3. **Benchmark Caution:** Published performance metrics often come from different evaluation suites and are not directly comparable. For example, Lift’s field accuracy score should not be directly compared to olmOCR-Bench scores. It is essential to run your own documents through the candidates to determine the best fit for your specific use case.
The transformation of enterprise data from static PDFs to dynamic, structured JSON is no longer a theoretical possibility but a practical reality. With a robust selection of open-source models, organizations can unlock the value of their document archives with greater control, lower costs, and enhanced data sovereignty.
—
**Original Source:**
This article was generated based on the information provided in the article “PDF to JSON: How to choose between document parsing and schema extraction” from Marktechpost.
**Source URL:** (Original content was provided directly in the prompt.)
**Date of Original Publication:** July 2026 (as verified by the original content).



