Skip to main content
Install Code Examples Code Generator Comparison FAQ Documentation About this site PaddleOCR on GitHub
Current release: PaddleOCR 3.7.0 (June 11, 2026) · PP-OCRv6 is now the default

PaddleOCR, explained
with code that actually runs.

PaddleOCR is Baidu's open-source OCR and document-parsing toolkit. This independent guide gives you the correct 3.x install commands, copy-ready Python and CLI examples, a code generator, and a straight comparison with other OCR tools — every fact checked against the official docs, PyPI and model cards.

Quick start (CPU · Linux, Windows, macOS)
# 1. Install an inference engine (CPU build; GPU commands are below)
python -m pip install paddlepaddle==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

# 2. Install PaddleOCR with all pipelines (OCR, PP-StructureV3, PaddleOCR-VL)
python -m pip install "paddleocr[all]"

# 3. Run OCR on a sample image (models download on first run)
paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --save_path ./output
91k+
GitHub stars (Oct 2026)
100+
Recognition languages
96.33%
OmniDocBench v1.6 (VL-1.6, self-reported)
Apache 2.0
License

Last reviewed against official docs, PyPI and GitHub. How we check facts.

In one minute

What is PaddleOCR?

PaddleOCR is an open-source toolkit, maintained by Baidu's PaddlePaddle team, that turns images and PDFs into machine-readable text and structured data. Version 3 bundles three main tools you call from Python or the paddleocr command line:

  • PP-OCRv6 (PaddleOCR class) — finds and reads lines of text, returning text, boxes and confidence scores. Default since 3.7.0.
  • PP-StructureV3 (PPStructureV3) — a multi-model pipeline that detects layout, tables, formulas, seals and charts and writes Markdown, JSON or DOCX with fine-grained coordinates.
  • PaddleOCR-VL (PaddleOCRVL) — layout analysis plus a 0.9B vision-language model for the hardest documents; best on a GPU.

It runs locally on CPU, NVIDIA GPUs, Apple Silicon and several AI accelerators, and the official README lists Dify, RAGFlow, MinerU, Umi-OCR, Cherry Studio and Haystack among the projects built on it.

Pick by outputText lines → PP-OCRv6 · Markdown/tables → PP-StructureV3 or PaddleOCR-VL
50 languages in one modelPP-OCRv6 covers Chinese, English, Japanese + 46 Latin-script languages
Local by defaultInference runs on your hardware; only model downloads need a network
Capabilities

What PaddleOCR 3.7 can do

Claims below come from the official README, docs and model cards. Vendor benchmark numbers are labelled as such.

Document parsing

PDFs and scans to Markdown, JSON or Word

PP-StructureV3 recovers reading order, headings, tables (as HTML with cell boxes), LaTeX formulas, seals and charts. PaddleOCR-VL-1.6 scores 96.33% on OmniDocBench v1.6 according to its model card (evaluated by Baidu). Since 3.5.0 both can export DOCX, and Word, Excel and PowerPoint files can be converted to Markdown.

100+ languages

PP-OCRv6 reads 50 languages with one model (the tiny tier skips Japanese). Korean, Arabic, Cyrillic, Devanagari, Thai, Greek and more use PP-OCRv5 multilingual models; PaddleOCR-VL-1.5+ covers 111 languages.

Three PP-OCRv6 tiers

tiny (1.5M parameters) for edge/IoT, small (7.7M) for mobile, medium (34.5M, default) for servers. Baidu reports medium beats PP-OCRv5_server by +4.6% detection and +5.1% recognition.

Fast on ordinary hardware

Official figures for PP-OCRv6: 5.2× end-to-end CPU speedup with OpenVINO, 6.1× on Apple M4 (tiny) and 0.13 s per image on an A100. Choose PaddlePaddle, ONNX Runtime or Transformers as the engine.

Runs where your data is

Python API and CLI on Linux, Windows and macOS; C++ deployment; Android/iOS demos; and the official PaddleOCR.js SDK (@paddleocr/paddleocr-js) runs PP-OCRv5 in the browser.

Built for LLM, RAG and agent workflows

The official MCP server (paddleocr-mcp) exposes OCR, PP-StructureV3 and PaddleOCR-VL as tools for Claude Desktop and other MCP hosts. Official Agent Skills, a hosted API with Python, TypeScript and Go SDKs, and paddlex --serve HTTP serving cover the rest.

High-throughput parsing

HPD-Parsing (July 2026) decodes document regions in parallel on a customised vLLM, reaching a reported 4,752 tokens/s peak. It needs an NVIDIA GPU with CUDA 12.8+ and Linux.

Output explorer

See what PaddleOCR returns

Pick a document type to see the shape of the result each pipeline produces. These are illustrative samples, not live inference — to run PaddleOCR on your own file, use the official online demos linked here or the code below.

Sample:

Hover a box to see the recognized text:

Install

Install PaddleOCR 3.7 correctly

Since 3.5 you install an inference engine and the paddleocr package separately. Use Python 3.9–3.13 and a fresh virtual environment.

Don't run pip install paddlepaddle-gpu from PyPI. The newest GPU build on PyPI is 2.6.2, and PaddleOCR 3.x needs PaddlePaddle 3.0 or later (PaddleOCR-VL needs 3.2.1+). Use the official PaddlePaddle package index shown below. You only need a compatible NVIDIA driver; the CUDA toolkit version on the machine doesn't matter.

EnvironmentCommandNotes
CPU — Linux, Windows, macOS (incl. Apple Silicon)
python -m pip install paddlepaddle==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
Inference engine. PaddlePaddle 3.x wheels exist for Python 3.9–3.13.
NVIDIA GPU, driver ≥ 550.54.14 (CUDA 12.6 build)
python -m pip install paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
Recommended for RTX 30/40 and A-series GPUs. Don't install CPU and GPU builds together.
NVIDIA GPU, driver ≥ 450.80.02 (CUDA 11.8 build)
python -m pip install paddlepaddle-gpu==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
For older drivers. RTX 50-series on Windows needs the special wheels.
Hugging Face Transformers engine
python -m pip install "transformers>=5.10.0"
Alternative to PaddlePaddle; then pass engine="transformers". Also install PyTorch. Keep one engine per environment.
PaddleOCR — everything
python -m pip install "paddleocr[all]"
OCR, PP-StructureV3, PaddleOCR-VL, PP-ChatOCRv4, translation, Office→Markdown.
PaddleOCR — OCR only
python -m pip install paddleocr
Smallest install. Add [doc-parser] for PP-StructureV3 / PaddleOCR-VL.
Google Colab / Kaggle
!pip install paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/ && pip install "paddleocr[all]"
GPU runtime. On a CPU runtime use the CPU index URL instead.
Docker (PaddleOCR-VL, NVIDIA GPU)
docker run -it --gpus all --network host ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-vl:latest-nvidia-gpu /bin/bash
Official image (~8 GB), driver with CUDA 12.6+. An -offline tag bundles the models.
Browser (JavaScript)
npm install @paddleocr/paddleocr-js
Official PaddleOCR.js (PP-OCRv5 via ONNX Runtime Web). Note: the unscoped paddleocr-js package is a third-party project.
MCP server for AI agents
python -m pip install -U "paddleocr-mcp[local-cpu]"
Python 3.10+. Drop [local-cpu] if you only call the hosted API. Setup guide.
Verify the install
# PaddleOCR version (expect 3.7.0)
python -c "import paddleocr; print(paddleocr.__version__)"

# PaddlePaddle engine check — prints "PaddlePaddle is installed successfully!"
python -c "import paddle; paddle.utils.run_check()"

# GPU visible to PaddlePaddle? (True/False)
python -c "import paddle; print(paddle.device.is_compiled_with_cuda())"

Need training, C++ deployment, NPUs or offline installs? See the full installation guide and troubleshooting.

Copy & run

PaddleOCR 3.x code examples

Every snippet uses the current 3.x API (predict(), device=, result objects). Older tutorials using ocr(img, cls=True) or use_gpu are for 2.x.

Extract text from an image

PP-OCRv6 medium is the default model.

from paddleocr import PaddleOCR

ocr = PaddleOCR(
    use_doc_orientation_classify=False,
    use_doc_unwarping=False,
    use_textline_orientation=False,
)
for res in ocr.predict("receipt.jpg"):
    res.print()                  # readable summary
    res.save_to_img("output")    # boxes drawn on the image
    res.save_to_json("output")   # full result as JSON

Text, boxes and confidence

Filter out low-confidence lines.

from paddleocr import PaddleOCR

ocr = PaddleOCR(lang="en")
for res in ocr.predict("invoice.png"):
    for text, score, box in zip(
        res["rec_texts"], res["rec_scores"], res["rec_boxes"]
    ):
        if score >= 0.80:
            x1, y1, x2, y2 = box.tolist()
            print(f"{score:.2f} {text} @ ({x1},{y1})-({x2},{y2})")

Whole PDF → one Markdown file

Needs paddleocr[doc-parser] or [all].

from pathlib import Path
from paddleocr import PPStructureV3

pipeline = PPStructureV3()
pages = pipeline.predict("report.pdf")
md = pipeline.concatenate_markdown_pages(
    [res.markdown for res in pages]
)
Path("report.md").write_text(md, encoding="utf-8")
# Images referenced in the Markdown: res.markdown["markdown_images"]

Tables as HTML

Each table includes cell boxes and its own OCR.

from paddleocr import PPStructureV3

pipeline = PPStructureV3(
    use_formula_recognition=False,  # skip what you don't need
    use_seal_recognition=False,
)
for res in pipeline.predict("statement.png"):
    for table in res["table_res_list"]:
        print(table["pred_html"])

PaddleOCR-VL (hardest documents)

Defaults to PaddleOCR-VL-1.6. GPU recommended.

from paddleocr import PaddleOCRVL

pipeline = PaddleOCRVL()   # pipeline_version="v1.6" by default
pages = list(pipeline.predict("paper.pdf"))
# merge tables split across pages + rebuild heading levels
for res in pipeline.restructure_pages(
    pages, merge_tables=True, relevel_titles=True
):
    res.save_to_markdown(save_path="output")
    res.save_to_json(save_path="output")

Other languages

Codes are PaddleOCR's own, e.g. ar not arabic.

from paddleocr import PaddleOCR

ocr_ja = PaddleOCR(lang="japan")    # PP-OCRv6
ocr_fr = PaddleOCR(lang="fr")       # PP-OCRv6 (Latin)
ocr_ko = PaddleOCR(lang="korean")   # PP-OCRv5 multilingual
ocr_ar = PaddleOCR(lang="ar")       # PP-OCRv5 Arabic
ocr_ru = PaddleOCR(lang="ru")       # PP-OCRv5 Cyrillic
ocr_hi = PaddleOCR(lang="hi")       # PP-OCRv5 Devanagari

GPU, tiers and engines

device replaces 2.x's use_gpu.

from paddleocr import PaddleOCR

ocr = PaddleOCR(
    device="gpu:0",   # "cpu", "gpu", "npu:0", "xpu:0" ...
    text_detection_model_name="PP-OCRv6_small_det",
    text_recognition_model_name="PP-OCRv6_small_rec",
    # engine="transformers",   # or "onnxruntime", "paddle"
)

Batch a folder efficiently

Pass a folder or list — faster than a Python loop.

from paddleocr import PaddleOCR

ocr = PaddleOCR(text_recognition_batch_size=16)
for res in ocr.predict("scans/"):          # or ["a.png", "b.png"]
    res.save_to_json("output")
# Multi-GPU / multi-process: see the parallel inference docs

Command line

Subcommands replace 2.x's --image_dir flags.

# Text OCR (image, PDF or folder)
paddleocr ocr -i invoice.png --lang en --save_path ./output

# Layout, tables, formulas -> Markdown/JSON
paddleocr pp_structurev3 -i report.pdf --device gpu:0 --save_path ./output

# PaddleOCR-VL document parsing
paddleocr doc_parser -i paper.pdf --save_path ./output

More patterns — HTTP serving, MCP, browser SDK, high-performance inference — are in the documentation.

Code generator

Generate PaddleOCR code for your setup

Choose a pipeline, language, hardware and output. You get the matching install commands and a runnable 3.7 script. Incompatible choices (for example Japanese with the tiny tier) are corrected and explained.

Options

Your code

Compare

PaddleOCR vs Tesseract vs EasyOCR vs Docling vs Surya vs Textract

A capability comparison sourced from each project's own documentation (October 2026). We deliberately don't print cross-tool accuracy percentages: vendors test on different datasets, so mixed numbers would mislead. For like-for-like scores, see the OmniDocBench leaderboard.

Capability PaddleOCR 3.7 Tesseract 5 EasyOCR Docling Surya AWS Textract
LicenseApache-2.0 (code and models)Apache-2.0Apache-2.0MIT code; model licenses varyApache-2.0 code; weights under modified OpenRAIL-M (paid license above $5M revenue/funding)Proprietary, pay per page
Languages100+ (50 in one PP-OCRv6 model; 111 in PaddleOCR-VL)100+ (trained data per language)80+Depends on chosen OCR engine90+6 (EN, FR, DE, IT, PT, ES)
Layout & reading orderYesPage segmentation onlyNoYesYesYes
Table structureYes — HTML + cell boxesNoNoYesYesYes
Formulas → LaTeXYesNoNoYes (enrichment)Yes (math in HTML)No
Native outputsJSON, Markdown, DOCX, imagesText, hOCR, ALTO, TSV, PDFPython listMarkdown, HTML, JSON, DocTagsJSON with HTML blocksJSON
Runs offlineYes (after model download)YesYesYesYesNo — cloud API
In the browserYes — PaddleOCR.jsYes — Tesseract.jsNoNoNoNo
Typical hardwareCPU for OCR/Structure; GPU for VLCPUCPU or GPU (PyTorch)CPU or GPUGPU recommendedManaged
Best fitMultilingual OCR + structured parsing, self-hostedClean printed scans, tiny footprintQuick prototypes in PyTorch stacksConverting many formats for RAGLayout-heavy docs with GPU budgetAWS-native forms & tables

Sources: PaddleOCR, Tesseract, EasyOCR, Docling, Surya, AWS Textract quotas. Practical guides: tesseractocr.org · docling.org.

PaddleOCR vs Tesseract

Tesseract is a mature, CPU-only C++ engine that does well on clean, horizontal printed text and is easy to ship. PaddleOCR's deep-learning detector copes better with photos, rotated or curved lines, mixed CJK/Latin text and low-contrast scans, and adds tables, formulas and Markdown output. Choose Tesseract for minimal dependencies; choose PaddleOCR when inputs are messy or you need structure.

PaddleOCR vs EasyOCR

Both are deep-learning OCR libraries under Apache-2.0. EasyOCR has a very small API and fits PyTorch projects. PaddleOCR offers newer models (PP-OCRv6), model tiers for different hardware, layout and table parsing, and production options such as HTTP serving, ONNX Runtime and C++. If you only need text lines from simple images, either works — benchmark on your own data.

When PaddleOCR isn't the best choice

If you're already on AWS and need managed forms/queries with an SLA, Textract is simpler. If your inputs are mostly born-digital PDFs with a text layer, a PDF text extractor (or Docling) may be faster than OCR. And PaddleOCR-VL without a GPU will be slow — use PP-StructureV3 on CPU instead.

Ecosystem

Official tools and integrations

Where to get models, how to connect PaddleOCR to agents and RAG systems, and which projects build on it.

MCP server

AI agentsOfficial

paddleocr-mcp (since PaddleOCR 3.1) gives Claude Desktop, VS Code and other MCP hosts OCR, PP-StructureV3 and PaddleOCR-VL tools — running locally, against your own server, or via the hosted API.

Agent Skills

AI agentsOfficial

paddleocr-text-recognition and paddleocr-doc-parsing skills for Skills-enabled apps such as Claude Code. They call the hosted API and need an AI Studio access token.

Official website & API

HostedOfficial

Browser demo plus a hosted API with Python, TypeScript and Go SDKs and the paddleocr api CLI. Documents are processed on Baidu's servers — use local inference for sensitive files.

Hugging Face & ModelScope

Models

PP-OCRv6, PaddleOCR-VL and other weights are published on both hubs. Hugging Face is the default download source; set PADDLE_PDX_MODEL_SOURCE to switch (e.g. BOS).

PaddleOCR.js

BrowserOfficial

Runs PP-OCRv5 detection and recognition client-side with ONNX Runtime Web and OpenCV.js, optionally in a Web Worker. Install @paddleocr/paddleocr-js.

vLLM, SGLang & FastDeploy

Serving

For production PaddleOCR-VL, run the VLM behind a dedicated inference server (vLLM, SGLang or FastDeploy, compute capability 8.0+) and let the pipeline call it.

Dify & RAGFlow

Built on PaddleOCR

Listed in PaddleOCR's README among projects that use it. To feed your own pipelines, serve PP-StructureV3 over HTTP and pass its Markdown into the knowledge base — see RAG integration.

MinerU & Umi-OCR

Built on PaddleOCR

MinerU converts documents to Markdown; Umi-OCR is a free offline desktop OCR app for batch screenshots and PDFs. Both appear in PaddleOCR's showcase.

Cherry Studio, Pathway, Haystack

Built on PaddleOCR

A desktop LLM client, a streaming ETL framework and an LLM orchestration framework — each listed in the official "Awesome projects" table.

FAQ

PaddleOCR questions, answered

Short, verified answers. Each links to deeper documentation where it helps.

What is PaddleOCR?

PaddleOCR is an open-source OCR and document AI toolkit developed by Baidu's PaddlePaddle team. It extracts text from images and PDFs (PP-OCRv6), parses document layout, tables and formulas into Markdown or JSON (PP-StructureV3), and offers a compact vision-language document parser (PaddleOCR-VL). It is licensed under Apache 2.0.

Is PaddleOCR free for commercial use?

Yes. PaddleOCR is released under the Apache License 2.0, which allows commercial use, modification and redistribution without license fees. Running it locally costs nothing beyond your own hardware. The separate hosted PaddleOCR official API is a different service with its own terms.

How do I install PaddleOCR 3.x?

Install an inference engine first, then PaddleOCR. For CPU: python -m pip install paddlepaddle==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/ and then python -m pip install "paddleocr[all]". For an NVIDIA GPU with a driver that supports CUDA 12.6, use python -m pip install paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/ instead. Do not use pip install paddlepaddle-gpu from PyPI: the latest GPU build there is 2.6.2, which PaddleOCR 3.x does not support. All install options.

Which Python versions does PaddleOCR support?

The paddleocr package installs on Python 3.8 and later, but PaddlePaddle 3.x wheels are published for Python 3.9 to 3.13, and the document-parsing extras need Python 3.9 or later. In practice, use Python 3.9 to 3.13. High-performance inference (enable_hpi) currently supports Python 3.8 to 3.12 on Linux x86-64.

Does PaddleOCR work without a GPU?

Yes. PP-OCRv6 and PP-StructureV3 run on CPU, and PP-OCRv6 has tiny and small tiers designed for limited hardware. Baidu reports a 5.2x end-to-end CPU speedup for PP-OCRv6 with OpenVINO and 6.1x on Apple M4 for the tiny tier. PaddleOCR-VL can run on CPU, but the official docs do not recommend CPU for production; use an NVIDIA GPU or a dedicated VLM inference server for throughput.

Should I use PP-OCRv6, PP-StructureV3 or PaddleOCR-VL?

Use PP-OCRv6 (the PaddleOCR class) when you need lines of text with boxes and confidence scores. Use PP-StructureV3 when you need Markdown or JSON with layout, tables, formulas and fine-grained coordinates on CPU-friendly models. Use PaddleOCR-VL when you want the highest document-parsing accuracy (96.33% on OmniDocBench v1.6 for PaddleOCR-VL-1.6, self-reported) and have a GPU.

What changed in PP-OCRv6 compared with PP-OCRv5?

PP-OCRv6, released with PaddleOCR 3.7.0 on June 11, 2026, adds tiny (1.5M), small (7.7M) and medium (34.5M) tiers, covers 50 languages in one recognition model (Chinese, English, Japanese and 46 Latin-script languages), and the medium tier improves detection by 4.6% and recognition by 5.1% over PP-OCRv5_server according to Baidu. It is the default model in PaddleOCR 3.7. Languages outside that set, such as Korean, Arabic or Russian, still use PP-OCRv5 multilingual models.

Can PaddleOCR read handwriting?

Yes, within limits. PP-OCRv5 and later recognize printed text and common handwriting in the same model, and PaddleOCR-VL handles handwritten notes and historical documents. Messy cursive remains hard for every OCR engine, so test on your own samples before committing.

Does PaddleOCR send my documents to the cloud?

Not when you run it locally: inference happens on your machine. It does need network access the first time to download model weights (from Hugging Face by default), unless you point it at pre-downloaded models. Documents are only uploaded if you deliberately use a hosted service such as the PaddleOCR official API, the AI Studio or Qianfan modes of the MCP server, or the online demos.

My PaddleOCR 2.x code broke after upgrading. What changed?

PaddleOCR 3.x is not backward compatible. Replace use_gpu=True with device='gpu' (use_gpu now raises "Unknown argument"), call predict() instead of ocr(img, cls=True), rename use_angle_cls to use_textline_orientation, and use PPStructureV3 instead of PPStructure. Results are objects with print(), save_to_json() and save_to_img() instead of nested lists. Full migration table.

How do I use PaddleOCR with Dify, RAGFlow or an AI agent?

For agents, install the official MCP server (pip install -U paddleocr-mcp) and add it to an MCP host such as Claude Desktop; it exposes OCR, PP-StructureV3 and PaddleOCR-VL as tools. For RAG platforms, run PP-StructureV3 or PaddleOCR-VL as an HTTP service (paddlex --serve) or use the official API, then feed the Markdown output into your knowledge base. Step-by-step.

What is the latest version of PaddleOCR?

As of October 2026 the latest release is PaddleOCR 3.7.0, published on PyPI on June 11, 2026. It made PP-OCRv6 the default OCR model. PaddleOCR-VL-1.6 arrived in 3.6.0 (May 28, 2026), and the HPD-Parsing high-throughput model was announced on July 22, 2026. Changelog.