Free OCR API for PDFs and Scanned Documents

Free OCR API for PDFs and Scanned Documents

Quick answer: For a hosted OCR API with no credit card, use OCR.space (25,000 requests/month) for small images and short PDFs, or Google Gemini for long or complex documents (up to 1,000 pages per file). The moment documents are sensitive or volume is real, self-host Docling (MIT, unlimited, runs on your laptop). Two of the most capable options — Gemini and Mistral — no longer publish their free-tier limits, so plan for HTTP 429 rather than a fixed number.

Every RAG pipeline, invoice parser, and document agent starts with the same problem: the text you need is trapped inside a PDF that’s really a picture of a page. OCR gets it out, and in 2026 there are more ways to do it at $0 than ever. But “free OCR API” covers three different deals — a real recurring quota with no card, a discount inside a paid product, and open weights you run yourself — with different ceilings, failure modes, and licenses. Every number below is quoted from provider docs; where a provider stopped publishing its limits, this guide says so.

Which free OCR API should you use?

Option What “free” means Card? Best for
OCR.space 25,000 req/month, 500/day per IP No Small images and 1-3 page PDFs; fastest start
Cloudflare Workers AI 10,000 Neurons/day, recurring No OCR at the edge inside a Worker you already run
Google Gemini Free tier on Flash models; limits unpublished No Whole documents — 1,000 pages/file, layout + meaning in one call
Google Cloud Vision First 1,000 units/month free, then $1.50/1,000 Yes High-volume plain text at the lowest committed price
Mistral OCR 4 Free mode exists; page limits unpublished No Markdown + tables + bounding boxes in one response
Docling / Tesseract / olmOCR Genuinely unlimited — open source, self-hosted No Private data, air-gapped, no quota ceiling ever

OCR.space: the no-friction free tier

The least glamorous option and the fastest to a working result. Request a free key by email — no console, no billing account. The API page gives you 25,000 requests/month, capped at 500/day per IP, across three engines (Engine 3 covers 200+ languages). The catches: files max 1 MB, PDFs max 3 pages, each page counting separately. This is an API for receipts and single-page forms, not a 200-page contract. Uniquely, its FAQ grants commercial use on the free plan (with no uptime guarantee).

import requests

resp = requests.post(
    "https://api.ocr.space/parse/image",
    files={"file": open("receipt.jpg", "rb")},
    data={"apikey": "YOUR_FREE_KEY", "language": "eng", "OCREngine": "2", "isTable": "true"},
    timeout=60,
)
result = resp.json()
print(result["ParsedResults"][0]["ParsedText"])

isTable: true preserves column alignment with whitespace — far more parseable for receipts and tables.

Cloudflare Workers AI: OCR at the edge

If you already deploy on Cloudflare, the OCR sits next to your code. The pricing page gives 10,000 Neurons/day free on both Free and Paid plans; the Free plan hard-stops instead of billing you (the Paid plan charges $0.011/1,000 Neurons). Reach for @cf/moondream/moondream3.1-9B-A2B, which Cloudflare describes as delivering OCR and structured output.

export default {
  async fetch(request, env) {
    const bytes = await request.arrayBuffer();
    const response = await env.AI.run("@cf/moondream/moondream3.1-9B-A2B", {
      image: [...new Uint8Array(bytes)],
      prompt: "Transcribe all text in this image exactly. Output plain text only.",
      max_tokens: 1024,
    });
    return Response.json({ text: response.description ?? response });
  },
};

The caveat: these are VLMs, so cost is measured in tokens and a dense page produces a lot — budget empirically. See our guide to Cloudflare Workers AI and its 47+ free edge models.

Google Gemini: the most capable free path

Gemini reads a document the way a person would — knowing that this block is a header, that this is a table, that this margin scrawl is a correction. The docs support PDFs up to 50MB or 1,000 pages (258 tokens/page), and the Files API is free in all regions, storing uploads for 48 hours. Several Flash models are “Free of charge” on the standard tier, and a free key needs no card.

But Google no longer publishes free-tier rate limits. The rate limits page now says they “can be viewed in Google AI Studio” — account-specific, with no public RPM/RPD table. Any capacity plan built on a specific free RPD figure is building on a number Google won’t commit to in writing. Check your own quota and handle 429 at runtime.

from google import genai

client = genai.Client(api_key="YOUR_GEMINI_KEY")
uploaded = client.files.upload(file="scanned_contract.pdf")
response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents=[uploaded,
        "Transcribe this document to clean Markdown. Preserve heading levels "
        "and render every table as a Markdown table. Do not summarize or omit anything."],
)
print(response.text)

That single call does OCR, layout reconstruction, and Markdown conversion at once. The trade-off is every LLM’s: it can hallucinate a confident, plausible-but-wrong digit where a classical engine returns detectable garbage. For invoices or medical records, validate against a second pass. See our complete guide to the free Google Gemini API.

Google Cloud Vision: the cheap high-volume workhorse

The enterprise-grade classical option, with the most transparent pricing. Per the pricing page: first 1,000 units/month free, then $1.50/1,000 up to 5M (dropping to $0.60 above). Each PDF page counts as one image, so 1,000 free units ≈ 1,000 free pages. The gate: it requires a GCP billing account with a card — the free units are a discount, not a fence. At $1.50/1,000 pages it’s roughly 2.7× cheaper than Mistral OCR 4 for straight text.

from google.cloud import vision

client = vision.ImageAnnotatorClient()
with open("scan.png", "rb") as f:
    image = vision.Image(content=f.read())
response = client.document_text_detection(image=image)
print(response.full_text_annotation.text)

Mistral OCR 4: structure in one response

A purpose-built OCR model, not a general VLM moonlighting. Per the docs, a response can include markdown, images, tables, hyperlinks, and blocks (bounding boxes via include_blocks=True), from PNG, JPEG, PDF, PPTX, and DOCX inputs. Watch the price — the widely-quoted ~$1/1,000 figure is stale. The current page lists OCR at $4/1,000 pages (Document AI $5), halved with batch. A free mode exists, but like Google, Mistral publishes no free-tier number — it lives in your admin panel.

from mistralai import Mistral

client = Mistral(api_key="YOUR_MISTRAL_KEY")
uploaded = client.files.upload(
    file={"file_name": "report.pdf", "content": open("report.pdf", "rb")}, purpose="ocr")
signed = client.files.get_signed_url(file_id=uploaded.id)
result = client.ocr.process(
    model="mistral-ocr-latest",
    document={"type": "document_url", "document_url": signed.url})
for page in result.pages:
    print(page.markdown)

If you already use Mistral’s chat models, this is one more capability behind the same key — see the Mistral AI free API guide.

The pattern nobody talks about: free limits went dark

The most useful finding here isn’t a number — it’s that two of the four hosted providers, Gemini and Mistral, have removed their free-tier limits from public docs entirely. Both now say “log in and look.” Free-tier capacity is now account-specific and adjustable without an announcement. Three things follow:

  • Distrust every specific free-tier RPD figure you read, including in articles published this month — if the provider doesn’t publish it, the author can’t verify it.
  • Check your own console and treat the number as true for your account today only.
  • Handle 429 as a normal condition. Backoff and a fallback provider are no longer optional — LiteLLM makes multi-provider fallback a two-line config.

OCR.space (25,000/month), Cloudflare (10,000 Neurons/day), and Cloud Vision (1,000 units/month) still publish hard numbers — a legitimate reason to prefer them for anything you must plan around.

Self-hosting: the only truly unlimited free OCR

If documents are sensitive, volume is real, or you want a number nobody can change on you, run the model yourself. Docling (IBM, MIT, 63k stars) is the best default — it handles layout, reading order, table structure, formulas, and OCR over scanned PDFs, with explicit “air-gapped environments” support. Its Markdown output drops straight into a free vector database like Qdrant or Chroma.

from docling.document_converter import DocumentConverter

result = DocumentConverter().convert("scanned_report.pdf")
print(result.document.export_to_markdown())  # tables preserved, ready to chunk

Tesseract (Apache 2.0) is still the fastest way to OCR a clean image on CPU — but its own docs warn it needs 300+ DPI and degrades fast on skew or uneven backgrounds. Excellent on clean straight scans, weak on a phone photo of a crumpled receipt; preprocessing is the job. olmOCR (AllenAI, Apache-2.0) is built for scale, with a README claim of “less than $200 per million pages” — versus ~$1,500 on Cloud Vision and ~$4,000 on Mistral. Pair it with Modal’s free GPU credits if you don’t own a GPU. PaddleOCR (Apache-2.0, 85k stars) leads on multilingual (50-111 languages); RapidOCR (Apache-2.0) wraps its models in ONNX for CPU-only and embedded use.

The licensing trap: free code, restricted weights

This is the section that justifies the article. Two of the best-known OCR projects — Marker and Surya (both Datalab) — split licensing across two layers, and the second one bites.

Project Code license Model weights license
Marker GPL-3.0 Modified AI Pubs Open Rail-M — free for research/personal use and startups under $2M
Surya Apache 2.0 Modified AI Pubs Open Rail-M — free for research/personal use and startups under $5M

Seeing “Apache 2.0” on Surya’s badge tells you about the code and nothing about your right to use the model commercially. Cross the revenue threshold and you need a purchased license; Marker’s GPL-3.0 adds copyleft on top. These are fine tools — Surya reports 83.3% on olmOCR-bench and 5 pages/s on an RTX 5090 — but “open source” and “free for your use case” are different claims. The unencumbered set, safe for commercial use with no revenue test: Docling (MIT), Tesseract, olmOCR, PaddleOCR, and RapidOCR (all Apache 2.0). The two thresholds above are quoted from each README and disagree ($2M vs $5M) — read the actual LICENSE files before you ship.

OCR or document AI? Pick the right tool

  • You need OCR when the goal is characters — page in, string out. Tesseract, Cloud Vision, OCR.space. Fast, cheap, deterministic, never make anything up.
  • You need document AI when the goal is structure or meaning — reading order across columns, “which cell is the total,” Markdown for a chunker. Mistral OCR, Docling, Gemini.

Running Tesseract on a two-column academic PDF and getting interleaved sentences isn’t an OCR failure — the characters were right; reading order is a layout task. Docling and Mistral solve it natively; Tesseract doesn’t claim to. On the money side: at 5,000 pages a one-off ingest is ~$6 on Cloud Vision or $0 self-hosted on Docling — at 500,000 pages ($750), self-hosting is obviously correct.

FAQ

What is the best completely free OCR API with no credit card?

OCR.space — 25,000 requests/month, no card, explicit commercial-use grant. Its 1 MB and 3-page ceilings are the price. If those block you, Cloudflare Workers AI’s 10,000 Neurons/day is the next-best no-card quota.

Can I use a free OCR API commercially?

OCR.space, yes (no uptime guarantee). Among open-source tools it depends on the license: Docling, Tesseract, olmOCR, PaddleOCR, RapidOCR are commercially safe; Marker and Surya carry revenue-capped weight licenses above their thresholds. For hosted APIs, check the provider’s current terms.

Is Gemini good at OCR compared to a real OCR engine?

On messy documents — photos, skew, handwriting, complex layouts — a modern VLM usually reads better because it uses context. That same mechanism is the risk: it can produce a confident wrong character where Tesseract emits obvious garbage. For high-stakes numbers, prefer a deterministic engine or validate.

What is the cheapest way to OCR a million pages?

Self-hosting olmOCR (“less than $200 per million pages” per its README). The cheapest hosted option is Cloud Vision at $1.50/1,000 units — about $1,500 for a million pages, dropping to $0.60/1,000 above 5 million.

The bottom line

Free OCR in 2026 is genuinely solved for small volumes and cheap for large ones. OCR.space, Cloudflare, and Cloud Vision publish hard numbers you can plan against; Gemini and Mistral, the two most capable, have moved their ceilings behind a login. Check your own console, handle rate limits as a normal path, and keep a fallback key. And when a project truly matters — private documents, climbing volume, a license lawyer with questions — the answer has been in the open all along: pip install docling, MIT, runs on your laptop, no quota, no meter. The best free OCR API may be the one you host yourself.

Related Reads