Passport OCR API

4.8/5

(30+ reviews)

Passport OCR API that reads the MRZ and every visual field

Turn a passport photo or scan into structured JSON in seconds. Names, passport number, nationality, dates and both MRZ lines, each with a confidence score. No template per country, no rules to maintain.

No credit card required

SOC 2 Type II & GDPR

Passport OCR extracting names, passport number, dates and MRZ lines to JSON

Trusted by finance and product teams at

Why passport data slows onboarding down

Every country prints its passports differently, and customers upload glare-filled phone photos. Generic OCR trips on the MRZ, so an agent ends up retyping names and dates, then checking them twice.

Passport uploaded

Photo or scan sent through the sign-up flow.

Manual review

Names, number and dates retyped from the data page.

Friction

Glare and blur trigger a new upload request.

Cross-check

Data compared with the form and other documents.

Friction

Transliterated names rarely match on the first try.

Compliance check

KYC file approved or sent back for missing details.

Friction

Each back-and-forth gives the customer a reason to leave.

Account opened

Finally active, days after the customer signed up.

RESULT

[X] minutes to review each passport by hand, and [X]% of sign-ups lost while customers wait.

See how Mindee fixes it

Holder

surnames, given_names

Birth

date_of_birth, place_of_birth, sex

Passport

passport_number

Validity

date_of_issue, date_of_expiry

Country

issuing_country, nationality

MRZ

mrz_line_1, mrz_line_2

response.json

{

"surnames": { "value": "MARTIN" }, "given_names": { "value": "CLAIRE ANNE" },

"date_of_birth": { "value": "1990-03-15" }, "place_of_birth": { "value": "LYON" }, "sex": { "value": "Female" },

"passport_number": { "value": "24FV81726" },

"date_of_issue": { "value": "2024-09-29" }, "date_of_expiry": { "value": "2034-09-28" },

"issuing_country": { "value": "FRA" }, "nationality": { "value": "FRA" },

"mrz_line_1": { "value": "P<FRAMARTIN<<CLAIRE<ANNE<<<<<<<<<<<<<<<<<<<<" }, "mrz_line_2": { "value": "24FV817265FRA9003154F3409286<<<<<<<<<<<<<<02" },

}

Ready to post, not just to read.

Dates come back in ISO 8601, sex as Male, Female or Other, and both MRZ lines as raw text. Every field carries a confidence score and its position on the page.

Built for real passport photos, not lab scans

Glare on the laminate, a thumb over the corner, a data page shot at an angle on a kitchen table. The model reads the passport photos your users actually take.

Passports from six countries in different scripts, all read into one JSON schema

Any country, one schema

A passport from a country you have never onboarded comes back in the same JSON shape. No template to add per issuing country.

Passport MRZ line with the holder name highlighted next to the printed surname

MRZ and data page, side by side

Both MRZ lines come back as raw text next to the printed fields, so you can compare them in your own checks.

Passport photo with glare, confidence scores and one field flagged for review

Glare and blur, still read

Phone photos with glare on the laminate or a slight tilt are still read, and low-confidence values are flagged for review.

Uploads classified as passport, ID card or driver license and sent to the right model

Passport, ID card or licence, sorted

Mixed uploads are classified first, so each passport, ID card or driver licence is sent to the right extraction model.

PDF / JPEG / PNG / WEBP / TIFF / HEIC, Phone photos & scans, Any issuing country, Latin and non-Latin scripts, Multi-page PDFs

Passport OCR accuracy, visible on every value

Each field comes with a confidence score, so clear values pass straight through and doubtful ones go to a reviewer. Test it on your own passports during the free trial.

96.1%

Field-level accuracy on key fields

Names, number, dates, nationality

99.8%

Accuracy on MRZ lines

Both lines, character by character

0.8s

Median time per passport

Single image, synchronous call

A confidence score on every field

Set your own threshold. Fields above it flow straight to your systems; anything below lands in a review queue, with the exact spot on the passport highlighted. Définissez votre propre seuil. Les champs au-dessus partent directement dans vos systèmes ; les autres rejoignent une file de vérification, avec leur emplacement exact mis en évidence sur votre passport.

Auto-approve the passports you can trust Validez automatiquement les passports fiables

Send only real exceptions to a human

Document AI features, better than OCR

Prepare, classify and extract. Mindee delivers high-accuracy extraction for every document format, so you can automate workflows with speed and high reliability.

Prototype in minutes, go live with the API

Start with a no-code workflow to prove the value on your own passports, then move the same model into your product. Commencez par un workflow no-code pour prouver sa valeur sur vos propres passports, puis intégrez le même modèle dans votre produit.

What teams build with passport OCR

The same API powers very different products. Here is where it usually starts.

Rated 4.8/5 by developers and onboarding teams

4.8

on G2

4.9

on Capterra

quote

Mindee is a web based tool that help us in scanning and reading different type of documents like identity cards, invoices, proposal plans etc and extract all the information with its AI and then it provides all the information and data associated with these documents a structured way.

on G2

quote

Mindee works reliably and delivers good performance. The OCR data is accurate, and the API is stable. It works like a charm.

on Capterra

quote

Excellent. In addition to their great product, the sales team has always been proactive on how they could help us leverage the maximum results from their product. It was like having an additional product manager on our side

on Capterra

FAQ about Mindee's Passport OCR API

Can't find what you're looking for? Our team answers within one business day.

About passport OCR À propos de l’OCR pour les passport

What is the MRZ on a passport, and does Mindee read it?

The MRZ (Machine Readable Zone) is the block of two lines of characters at the bottom of a passport’s photo page. Defined by the ICAO international standard, it encodes the holder’s key details in a format machines can read: document type, issuing country, name, passport number, nationality, date of birth, sex and expiry date, plus check digits that detect reading errors. Mindee reads both the MRZ and the printed fields on the page (the visual zone) and returns them as structured JSON. You can then compare the two sources to catch inconsistencies or typing errors.

Does Mindee work with passports from every country?

Yes. Passports from all countries follow the same ICAO format for the photo page and the MRZ, so Mindee can extract data from passports worldwide, whatever the language or alphabet of the printed fields. The MRZ always uses Latin characters, which means names are returned in a consistent, searchable format even when the visual zone is written in Cyrillic, Arabic or Asian scripts.

Does Mindee verify that a passport is authentic?

Mindee focuses on data extraction. It turns a passport image into accurate, structured data in seconds, but it doesn’t perform forgery detection, chip (NFC) reading or liveness checks. In a KYC or onboarding flow, Mindee typically handles the step where data is captured and pre-filled, and works alongside a dedicated identity verification provider. Confidence scores and consistency between the MRZ and the printed fields also help you flag suspicious or poor-quality captures for manual review.

Is it safe to process passports with an OCR API instead of a general AI chatbot?

A passport contains highly sensitive personal data, so where it is processed matters. Sending passport photos to a general-purpose AI chatbot can mean your data is stored or used under terms you don’t control. Mindee is built for identity document processing: it is SOC 2 Type II certified and GDPR compliant, data is encrypted in transit and at rest, and you control how long documents are retained. You also get consistent, structured output with confidence scores, instead of free-text answers that might guess a passport number or a date.

About Mindee

Is my data secured and protected during the conversion process?

Yes, your data is highly secured and protected during the entire conversion process. As an enterprise-grade OCR solution, Mindee takes data privacy very seriously. Here are the key security measures in place:

  • Certified compliance: Mindee's infrastructure is SOC 2 Type II certified and fully GDPR compliant, ensuring strict industry standards for data protection.
  • Encryption: All documents and extracted data are fully encrypted both in transit (during the API call) and at rest.
  • Data localization: You have control over where your data is processed, with the option to host and process your data on either EU or US servers.
  • Strict privacy: Mindee respects data confidentiality. Your processed documents are not shared with third parties, and your private data is not used to train global AI models.

In short, your sensitive documents are processed in a secure, isolated environment and remain completely under your control.

Is Mindee's OCR API free to use?

We provide a 14 days free trial so you can fully test any of our OCR models — no credit card required. After this, we offer different pricing tiers depending of the volume of pages processed and the features you might need. See the pricing page for more information.

What file formats are supported for JSON conversion?

The supported document formats are:

  • PDF (application/pdf) – While technically a document format rather than an image, it is natively supported for all extraction models.
  • JPEG / JPG (image/jpeg)
  • PNG (image/png) – Must be non-animated.
  • WebP (image/webp)
  • TIFF / TIF (image/tiff) – Both single-page and multi-page TIFFs are supported and processed similarly to PDFs.
  • HEIC (image/heic) – Apple's High-Efficiency Image Container format.

‍

📌 Important technical limitations to keep in mind:

To ensure the OCR pipeline runs smoothly and successfully returns your JSON, make sure your files adhere to the following constraints:

  • Maximum file size: 100 MB per file.
  • Maximum page count: Up to 200 pages per document.
  • File state: The files cannot be encrypted, and PDFs must not be password-protected.

Ready to stop retyping passport details?

Plug the passport OCR API into your onboarding flow in minutes, with a team of document processing engineers behind it.

14-day free trial

No credit card required