What Is Docling? Converting PDFs to Markdown and JSON With Their Tables, OCR, MCP and How It Differs From MarkItDown
You type `docling invoice.pdf --to json` in the terminal; Docling uses models to work out the PDF's page layout, reading order and tables, and gives you the document as Markdown, HTML or JSON that carries the tables with their cells. On scanned documents, it reads the text with OCR engines that run on your computer; it also converts Word, PowerPoint, Excel, email and audio files into the same format. You pass the output to AI, a knowledge base or your own program. It's an open-source (MIT) project that started at IBM Research and is hosted by LF AI & Data; it's used as a command-line tool, a Python library and an MCP server.
- What it does
- Converts documents to Markdown/JSON with layout and tables
- Type
- Python library + command line + MCP server
- Maker
- LF AI & Data (started at IBM Research)
- Privacy
- Runs on your computer, OCR included, even offline
- Watch out
- Downloads models on the first PDF; slow without a graphics card
- Latest release
- 2.150.1 (November 14, 2026)
- Price
- Free (MIT)
What is Docling and what does it do?
Getting text out of a PDF is easy; the hard part is preserving which paragraph comes first on a two-column page, which row a table cell belongs to, and where a heading ends. If that structure is lost, AI matches the amount on an invoice to the wrong line or mixes up the clauses in a contract. Docling is a document converter built for exactly this: it examines the page with models, finds the elements (paragraphs, tables, figures, headings, code, formulas), works out the reading order and rebuilds tables with their rows and cells. It keeps the result in a single document format (DoclingDocument), from which you get Markdown, HTML or lossless JSON.
Who it's for: accounting firms (invoice and statement tables), legal and consulting work (long contracts), research teams (papers, reports) and developers who build a knowledge base from documents. It also suits organizations that want to process documents without sending them over the internet: the README lists running on sensitive data and in air-gapped environments as a feature. Who it's not for: someone who doesn't use the terminal and wants a one-click interface; Docling is a Python library and command-line tool.
Sources: Docling README (Features, IBM ❤️ Open Source AI, LF AI & Data), November 18, 2026.
How does Docling work?
invoice.pdfInputA file, folder or URL.- Layout: finds the elements
- Tables: rebuilds the cells
- OCR: reads scanned text
› --to md --to jsonMarkdown, HTML, JSON, chunks.Sources: README, Model Catalog, Advanced options (Model prefetching), FAQ ("Which model weights are needed"), November 18, 2026.
Which files does Docling read, and what does it output?
- Others it reads: EPUB, LaTeX, plain text, email (EML, MSG), calendar (ICS), ODF (odt, ods, odp), Apple Pages / Numbers / Keynote, WebVTT, XBRL financial reports, USPTO patents, JATS articles.
- Outputs it produces (`--to`): md, json, yaml, html, text, doctags, vtt, chunks, latex and others; Markdown by default.
- Images can be embedded in the output (default), left as placeholders or written as separate PNG files (
--image-export-mode).
Sources: README (Features, What's new), CLI reference (--from, --to, --image-export-mode), November 18, 2026.
How do you install Docling?
No account needed. You need Python 3.10 or newer; it runs on macOS, Linux and Windows, on x86_64 and arm64 processors. Docling's models rely on PyTorch, so the install is bigger than MarkItDown's. In the pip command, the latest release as of November 18, 2026 (2.150.1) is pinned.
› pip install docling==2.150.1The README's command has no version: pip install docling. Extra features come with package extras: [vlm] the vision-language model pipeline, [easyocr], [tesserocr], [rapidocr] OCR engines, [audio] / [asr] audio. Example: pip install "docling[easyocr,vlm]".
› uv add docling› pip install docling --extra-index-url https://download.pytorch.org/whl/cpuOn a Linux server without a graphics card, the docs recommend this PyTorch distribution.
› uv add torch==2.2.2 torchvision==0.17.2 docling› pip install docling "numpy<2.0.0"Intel Macs have no PyTorch builds newer than 2.2.2, and that version only works with NumPy 1.x; PyTorch 2.2.2 requires Python 3.12 or older. The docling[mac_intel] extra in the installation docs isn't defined in the 2.150.1 package (it's not in the PyPI extras list); pip then only warns and does a normal install without pinning PyTorch. If you use pip, add torch==2.2.2 and torchvision==0.17.2 to the same command.
- Download the models in advance (optional):
docling-tools models downloaddownloads the layout, table, picture classification and OCR models; this step is required if you'll work offline. - Convert your first document:
docling https://arxiv.org/pdf/2206.01062writes a .md file to your current folder (the README's example).
Sources: README (Quickstart), Installation (Alternative PyTorch distributions, macOS Intel, Available extras), Advanced options, PyPI docling 2.150.1. Checked on November 18, 2026.
How do you use Docling? What you type, what you get
The commands use options from the CLI reference; the outputs are described only as far as the docs describe them.
› docling fatura.pdf --to md --to json --output ./ciktiWhat you get: a .md and a .json file with the same name in the output folder. In the Markdown, headings and tables are readable; in the JSON (DoclingDocument), each element's type, position on the page and the tables' cell structure are kept losslessly. You can read the JSON with a program and move the table rows into accounting software or Excel. The table model runs in accurate mode by default; for speed, use --table-mode fast.
› from docling.document_converter import DocumentConverter
source = "https://arxiv.org/pdf/2408.09869" # a document via a local path or URL
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown())What you get: the document's Markdown text. JSON or HTML can be taken from the same result.document object; for knowledge bases there are integrations with LangChain, LlamaIndex, Crew AI and Haystack, and on the command line --to chunks splits the document into chunks.
› docling ./sozlesmeler --from pdf --from docx --output ./markdownWhat you get: one .md file in the markdown folder for each PDF and Word file in the folder. The CLI accepts local files, folders or http(s) URLs as sources; --from filters which types are picked up.
Sources: README (Python usage), Usage, CLI reference (--to, --output, --from, --table-mode), November 18, 2026.
Which pipeline and model? The differences
Docling isn't a chat model; it uses small, task-specific models to read documents, and by default all of them run on your computer. A remote model or OCR service is used only if you explicitly allow it (enable_remote_services). The main choice is between two pipelines: the standard pipeline processes the page step by step with several models, and the VLM pipeline has a single vision-language model (a model that sees an image and writes text) read the page end to end.
| Stage / pipeline | Models (by their names in the docs) | What for |
|---|---|---|
| Layout (standard pipeline) | docling-layout-heron (default); heron-101, egret-medium, egret-large, egret-xlarge | Finds elements such as paragraphs, tables, figures and headings |
| Table structure | TableFormer fast / accurate (accurate by default on the command line) | Rebuilds the table's rows and cells |
| OCR | Auto (default; the docling package brings RapidOCR), EasyOCR, Tesseract, ocrmac (macOS), Nemotron OCR (Linux x86_64, Python 3.12 and CUDA 13 only) | Reads the text on scanned pages |
| VLM pipeline | --pipeline vlm uses GraniteDocling by default; another preset is chosen with --vlm-model (docling models --vlm lists them); the [vlm] extra | Converts the page to DocTags, Markdown or HTML with a single model |
| Audio (ASR) | Whisper backends (the [audio] / [asr] extras) | Transcripts from audio and video |
Which should you pick? For most jobs, the default standard pipeline is enough: it comes with the install and also runs on the processor. Use the accurate table mode for complex tables and fast when you need speed. The VLM pipeline needs extra dependencies and speeds up meaningfully on a graphics card; it's the second route to try on pages where the standard pipeline struggles. In the maker's measurement, the standard pipeline without OCR processed 7.9 pages per second on a machine with an RTX 5090 and 1.5 pages per second on the processor alone on the same machine; the VLM pipeline (GraniteDocling, with an inference server) did 3.8 pages per second on the same machine.
Checked on November 18, 2026. Sources: Model Catalog, Vision Models, GPU support (Results table, the maker's measurement), Installation (OCR engines), CLI reference. The model list changes often; the docs say "new models are added regularly." The license for model weights is in each model's own package.
!The weights of some presets in the catalog restrict commercial use: for example, Surya-OCR-2.5 (surya_ocr2_5) is under a modified OpenRAIL-M license; it's free for research, personal use and organizations under USD 5M in funding or revenue, and its model card should be read before commercial use. When you choose a model other than the default, check its card.
Scanned documents with Docling: OCR engines and language selection
OCR means reading the text in an image and turning it into text. In Docling, OCR is on by default and is done with engines that run on your computer; it doesn't go to a model API or the cloud. You choose the engine with --ocr-engine and the language with --ocr-lang.
› docling taranmis-sozlesme.pdf --ocr-engine tesseract --ocr-lang iso:trWhat you get: the text of the scanned pages as Markdown, along with the layout and table structure. First you need to install Tesseract and its Turkish language data on your system and set TESSDATA_PREFIX; tesseract --list-langs shows which languages are installed. The language is given as a BCP-47 tag with the iso: prefix (iso:tr) or as the engine's own code.
If the selected engine has no model for the language you ask for, Docling raises an error; it doesn't silently fall back to another language. supported_ocr_languages() shows which languages an engine supports.
The default automatic selection never picks Tesseract; if you want Tesseract, write --ocr-engine tesseract. The Tesseract options' default languages are eng, spa, fra and deu; if one of them isn't installed, the conversion fails.
--ocr-lang "" asks the engine to choose: per-page script detection in Tesseract, English in EasyOCR, and the Simplified Chinese default in RapidOCR.
Sources: OCR in Docling (Language selection), Installation (OCR engines, Tesseract installation, Installation without RapidOCR), FAQ ("Which OCR languages are supported?"), November 18, 2026.
Docling MCP: how do you connect it to Claude Desktop and LM Studio?
MCP (Model Context Protocol) is a common connection format that lets an AI assistant use a tool. docling-mcp gives the assistant tools for converting documents (PDF to DoclingDocument JSON), writing new documents and exporting them; it keeps documents in a cache.
In remote mode, the document goes to the docling-serve server you configure; in local mode, it stays on your computer.
› {
"mcpServers": {
"docling": {
"command": "uvx",
"args": [
"--from=docling-mcp",
"docling-mcp-server"
]
}
}
}In Claude Desktop, this entry goes into the claude_desktop_config.json file; in LM Studio, into the mcp.json file (the docs also have a one-click install button for LM Studio).
!The docs contradict each other here: Docling's MCP page says the server converts locally by default, while the settings table in the docling-mcp README shows DOCLING_MCP_CONVERSION_MODE defaulting to remote and ties local conversion to the docling-mcp[local] extra. uvx builds its own isolated environment from the package in --from for each entry; a [local] extra installed separately with pip doesn't get into that environment. To convert on your own computer, combine the README's env example with the local extra: write --from=docling-mcp[local] in the entry and add DOCLING_MCP_CONVERSION_MODE: local to the env section.
› {
"mcpServers": {
"docling": {
"command": "uvx",
"args": [
"--from=docling-mcp[local]",
"docling-mcp-server"
],
"env": {
"DOCLING_MCP_CONVERSION_MODE": "local"
}
}
}
}If you use pip instead of uvx: install with pip install "docling-mcp[local]", write docling-mcp-server as the command in the entry and add the same env line.
The docs have no separate step for Claude Code. A skill also ships with the Docling package: if Docling is installed, uvx library-skills --claude links it into Claude Code's .claude/skills folder; for Codex, Cursor and Copilot, uvx library-skills.
Sources: Docling MCP docs, docling-mcp README (Installation Options, Configuration, Examples) and pyproject.toml, Agent skills docs; docling-mcp 3.5.0 (November 4, 2026). Checked on November 18, 2026.
Is Docling free? Commercial use
Yes. Docling's code is MIT-licensed, with no paid plan and no account; because the models run on your computer, there's no per-call fee either. The cost is your hardware: with large document volumes, a graphics card speeds things up. If you have a remote docling-serve server do the conversion, that server's cost is separate.
- Using, modifying and embedding the code in your own product, including commercially (MIT)
- Removing the copyright and license notice from copies
- Assuming the model weights share the code's MIT license: each model's license is in its own package (README); the weights of some presets restrict commercial use (see the model section)
Sources: LICENSE (MIT, "The Docling Contributors"), README (License), November 18, 2026. This is not legal advice.
Does Docling work with Turkish documents?
| Interface and docsNo | The commands and docs are in English. |
|---|---|
| Turkish PDFs and office documents with a text layerUnclear | The docs state no language-specific limit; check on your first document that Turkish-specific letters come through correctly. |
| Scanned Turkish documents (OCR)Partly | The language is given with iso:tr; if the engine you choose has no Turkish model, it raises an error. With Tesseract, you need to install the Turkish language data. |
Is Docling safe? Where do my documents go?
FAQ: Docling doesn't use any remote service and can run in fully air-gapped environments. Internet is needed only to download the models; you download them in advance with docling-tools models download and point to them with artifacts_path.
If you choose remote conversion (docling-serve, MCP remote mode) or a remote OCR server, the document goes to that server.
The fixes for the entries in GitHub security advisories were released in 2.142.1 and earlier; if you process files that come from others, don't use a version older than 2.142.1.
Sources: FAQ ("How do I run completely offline?"), Advanced options, Docling MCP docs, GitHub Security Advisories, November 18, 2026. This is not a security audit.
Common problems and fixes
| What happens | What to do |
|---|---|
ImportError: libGL.so.1 in Docker or on a server | opencv-python and opencv-python-headless are conflicting. Uninstall both and install only opencv-python-headless, or add the libgl1 system package. |
| SSL CERTIFICATE_VERIFY_FAILED while downloading models | pip install --upgrade certifi; if that fails, set SSL_CERT_FILE and REQUESTS_CA_BUNDLE to the value of python -m certifi. |
| "No OCR engine found" warning, no OCR happens | In an install without RapidOCR, automatic selection can't find an engine. Choose the engine explicitly: --ocr-engine tesseract --ocr-lang ... |
| PyTorch error on an Intel Mac | Pin PyTorch 2.2.2: uv add torch==2.2.2 torchvision==0.17.2 docling; Python 3.12 or older. According to the FAQ, NumPy 1.x is required (pip install docling "numpy<2.0.0"). |
| The MCP server doesn't convert and expects a remote service address | The default mode is remote. For local, use --from=docling-mcp[local] in the entry and DOCLING_MCP_CONVERSION_MODE: local in the env section. |
Sources: FAQ, Installation, docling-mcp README, November 18, 2026.
How do you uninstall Docling?
› pip uninstall docling docling-mcpThe downloaded models stay on disk separately (by default ~/.cache/docling/models); delete this folder to free up space. If you added it to an MCP client, remove the docling entry from the config file.
Docling or MarkItDown?
| Docling | MarkItDown | |
|---|---|---|
| Approach | Works out page layout, reading order and table structure with models | Lightweight format-specific converters; the goal is preparing text for AI |
| OCR | Local engines (RapidOCR, EasyOCR, Tesseract…) | Not built in; the plugin uses a model API, the Azure options are a paid cloud |
| Model downloads | On first use, for the PDF pipeline | None for the built-in converters |
| Output | Markdown, HTML, lossless JSON, chunks | Markdown |
| MCP | docling-mcp (conversion + document writing) | markitdown-mcp (single tool, alpha) |
| License | MIT (models under their own licenses) | MIT |
The table comes from the two projects' official docs (November 18, 2026); the other rows summarize those tools' own guides. This is not a ranking.
Frequently asked questions
How do you convert a PDF to Markdown with Docling?
Install it with pip install docling and type docling file.pdf in the terminal; a .md file is written to your current folder. If you also want JSON, use --to md --to json, and --output for the output folder.
How do you connect Docling MCP to Claude?
Add a uvx --from=docling-mcp docling-mcp-server entry to claude_desktop_config.json. The default mode is remote conversion; to convert on your computer, write --from=docling-mcp[local] in the entry and add DOCLING_MCP_CONVERSION_MODE=local to the env section. The docs have no separate step for Claude Code.
Docling or MarkItDown?
Docling works out page layout, reading order and tables with models and does local OCR; it downloads models on the first PDF and is heavier. MarkItDown is lightweight and has no built-in OCR. For documents with complex tables or scanned pages, Docling fits; for plain office files, MarkItDown does the job.
Which OCR engines does Docling use?
RapidOCR (included with the docling package), EasyOCR, Tesseract, ocrmac on macOS, and an OCR model that needs CUDA on Linux only (details in the model section). The engine is chosen with --ocr-engine and the language with --ocr-lang; all of them run on your computer.
Can Docling do Turkish OCR?
The language is given with --ocr-lang iso:tr; if the engine you choose has a Turkish model, it reads the text, and if not, it raises an error. If you work with Tesseract, you need to install the Turkish language data on your system.
What is Docling, and is it from IBM?
An open-source (MIT) document conversion project started by a team at IBM Research Zurich and now hosted by the LF AI & Data Foundation.
Is Docling free?
Yes. The code is MIT-licensed, with no account and no paid plan; the models run on your computer. The license for the model weights is stated in each model's own package.
Does Docling need a graphics card?
No, it also runs on the processor, but it's slower. In the maker's measurement, the standard pipeline without OCR processed 7.9 pages per second with a graphics card and 1.5 pages per second on the processor alone, on the same machine.
Related guides
Sources
- Docling README
- Docling documentation
- Installation and OCR engines
- Supported formats
- Model catalog
- OCR and language selection
- GPU and speed measurements
- CLI reference
- FAQ
- Docling MCP
- docling-mcp README
- GitHub security advisories
- PyPI: docling
Not clear in the official sources: Turkish recognition with automatic OCR selection (RapidOCR): the docs only give the language selection rules; the Tesseract iso:tr route for scanned Turkish documents is described · docling-mcp's default mode: Docling's MCP page and the docling-mcp README say different things; the local mode setting is in the MCP section · the docs have no MCP setup step for Claude Code.





