# Docling

> Open-source Python library that parses PDFs, DOCX, PPTX, HTML, and images into structured Markdown and JSON with layout, tables, and reading order for RAG.

Docling is an open-source (MIT) Python library, started at IBM Research and now an LF AI & Data project, that converts PDFs, DOCX, PPTX, XLSX, HTML, and images into structured Markdown and JSON. It understands page layout, reading order, table structure, formulas, and code, runs locally, and plugs into LangChain, LlamaIndex, Crew AI, and Haystack for RAG.

Website: https://docling-project.github.io/docling/

Docling is an **open-source Python library for document parsing**, built to get real-world documents ready for generative AI. It converts PDFs, DOCX, PPTX, XLSX, HTML, EPUB, and images into a unified `DoclingDocument` and exports clean **Markdown** or **lossless JSON**, making messy source files usable as context for RAG and other LLM pipelines.

What sets it apart is **deep document understanding rather than naive text extraction**. Docling parses page layout, reading order, and table structure, and recognizes formulas, code blocks, and images — so the structure of a document survives conversion instead of collapsing into a flat blob of text. It includes OCR for scanned PDFs and images, and can use compact vision-language models (such as IBM's Granite-Docling) for end-to-end document conversion.

It runs **locally**, which means sensitive documents never leave your environment — a key difference from hosted parsing APIs. Docling also ships **plug-and-play integrations** with LangChain, LlamaIndex, Crew AI, and Haystack, plus an MCP server, so it slots directly into existing agent and retrieval stacks.

## Good to know

Docling is MIT-licensed and free to self-host. It was started by IBM Research's AI for knowledge team in Zurich and is now an [LF AI & Data Foundation](https://lfaidata.foundation/) project. It sits at the ingestion layer of a RAG stack — see [how RAG works](/guides/foundations/how-rag-works) and [best RAG frameworks 2026](/guides/foundations/best-rag-frameworks-2026) for where parsing fits, and pair it with a [multimodal document extractor](/skills/rag-knowledge/multimodal-document-extractor) when documents demand vision-language understanding.

---

_Source: https://agentscamp.com/tools/docling — Tool on AgentsCamp._
