A two-column PDF can turn into sentences in the wrong order; a table can become a string of numbers with no rows or columns. Docling tackles that problem by converting documents in different formats into a structured representation that preserves the role and relationships of their contents. The open-source toolkit is designed to prepare files for people and AI systems without flattening them into undifferentiated text.

Psst!Add AlexTech.ai asPreferred Source on Google

The difficulty starts with how a PDF is built: it often records text as elements placed at precise positions, not as paragraphs, headings and table cells. A basic extractor can therefore read an article's columns in the wrong order or lose a table's boundaries. Scans add another step: an optical character recognition system, or OCR, must first interpret the letters in the image. Repeated headers, formulas, captions and code blocks also need specific handling.

From varied files to a shared structure

Docling imports PDFs, Word and PowerPoint files, Excel spreadsheets, Markdown, HTML, CSV, images and even audio. It can export the result as JSON, Markdown, HTML, plain text and Doctags, a structured format for representing documents. Its output can preserve reading order, table cells, list items, formulas, captions and the coordinates of page elements.

The goal is not merely to retrieve words, but to identify what each element represents and how it connects to the others. A cell needs to remain associated with the right row and column; a caption needs to stay linked to its figure. This structure is useful for searching documents or feeding them into RAG systems, which retrieve relevant passages before a model generates a response.

The project's technical report describes two specialized models: DocLayNet for layout analysis and TableFormer for reconstructing tables. The project says Docling is designed to run on commodity hardware with a modest resource budget. It differs in approach from papero, a PDF parser that reconstructs structure from page geometry and says it uses no machine-learning models; it targets CPU use and also runs in a browser.

Local processing and pipeline settings

Docling is released under the MIT license and can be used as a Python package or from the command line. Following the hands-on examples in the original article requires Python 3.10 or later and pip. The project says its core models run locally: after installation, conversion needs neither an API key nor an internet connection. That makes it possible to process sensitive documents without sending them to a remote service, while leaving users responsible for securing their files and machine.

Pipeline options allow users to configure OCR engines and the table model, and to enable additional enrichment features. For organizations that do not want to manage the infrastructure, IBM offers Docling for watsonx, a managed service that transforms documents into structured data for search, RAG and AI agents. The two approaches serve different needs: controlled processing in a local environment or a managed service for systems that need to scale.