Passport Scanner

Read passports into structured fields, including the MRZ.

Drag & drop your document here

Supports PDF, JPG, PNG, WEBP

Docyield's passport scanner reads a passport page — whether you upload a flatbed scan, a snapshot taken on a phone, or a PDF saved from a kiosk — and returns the printed details as a tidy set of fields. The holder's name, passport number, nationality, dates, issuing authority, and the full machine-readable zone all come back as JSON, CSV, Excel, or XML, so you can move on to whatever comes next instead of squinting at a small print and typing it out.

The tool reads two things at once: the human-readable visual inspection zone at the top of the page and the machine-readable zone (the two rows of monospaced characters at the bottom). Booklets follow the ICAO standard for that lower strip, which means the MRZ is the most reliable part of the page to capture. Docyield returns both, so you can cross-check the printed name against the encoded one and decide which source you trust for each value.

Inputs
PDF, JPG, PNG, WEBP
Outputs
JSON · CSV · Excel · XML
Price
Free · no signup

What a passport scanner extracts

A passport packs a lot of information into a single laminated page, and most of it is repeated in two forms. Across the top you will find the document type, the issuing country, the surname and given names, the passport number, nationality, date of birth, sex, place of birth, and the issue and expiry dates. Along the bottom, the same core facts are encoded into the MRZ, a fixed-width block designed to be read by border-control machines.

The scanner's job is to capture every one of those printed values and label it correctly, so the surname never ends up in the given-names field and the date of issue is never confused with the date of expiry. Because a passport is a sensitive document, Docyield returns each field exactly as it is printed on the page — it transcribes what is there rather than reformatting, translating, or normalising it.

Why structured extraction beats raw OCR

Running plain optical character recognition over a passport gives you a jumble of characters: the country name, a few dates in different formats, the holder's name, and two lines of MRZ symbols all run together with no indication of which is which. You are left to untangle it by hand, and the MRZ — full of filler characters and check digits — is especially easy to mangle.

Structured extraction returns labelled fields instead. The passport number lands in its own field, the expiry date in another, and the MRZ is preserved as a single block you can verify or decode separately. That predictability is what lets a downstream system read the values by name rather than guessing at the position of text on a page, and it is the difference between data you can import and a transcript you still have to interpret.

Reading the machine-readable zone

The MRZ is the standout feature of a passport for anyone capturing data. It is two lines of exactly 44 characters each, written in a font chosen for legibility, and it encodes the document number, nationality, date of birth, sex, expiry date, and a set of check digits. Because it is designed to be read reliably even on worn documents, it is often the cleanest source on the whole page.

Docyield returns the MRZ as a single text field containing both lines. You can use it as a verification layer against the printed fields above, or feed it into your own MRZ decoder to recompute the check digits. Capturing the zone verbatim — angle brackets, filler characters, and all — keeps the data faithful to the document so your own validation logic has something accurate to work with.

Who uses a passport scanner

  • Travel and hospitality desks capturing guest passport details at check-in instead of photocopying the page.
  • Onboarding and HR teams recording the identity documents of new international hires.
  • Relocation, visa, and immigration services that handle stacks of passports for a single application.
  • Airlines, tour operators, and charter services collecting passenger details ahead of departure.
  • Developers adding a passport-capture step to a mobile or web app with a single API call.

Accuracy, limitations, and review

No reader gets every passport right every time, and it would be dishonest to claim otherwise. Glare from the laminate, a steep camera angle, a tight binding that curves the page, or heavy wear all reduce how cleanly the text reads. A flat, well-lit, in-focus image of the whole page — both the visual zone and the MRZ — gives the best result, and it is worth recapturing a blurry photo rather than working from it.

When a field is missing or genuinely unreadable on the document, Docyield returns it empty rather than inventing a plausible value, because a wrong passport number is far more damaging than a blank one. Because this is identity data, the sensible workflow keeps a person in the loop: review the extracted fields against the original page, and lean on the MRZ check digits where you need extra confidence. Docyield does not verify whether a document is genuine or valid; it reports what is printed.

Languages and document variants

Passports are issued by nearly every country, in dozens of scripts and layouts, but the ICAO standard keeps the essentials consistent. The visual zone may be labelled in the local language alongside English or French, and the MRZ is always in the same Latin character set. Docyield reads the page in context rather than relying on a fixed template, so it handles booklets it has never seen before instead of breaking when a field moves.

Names that include accents, transliterations, or multiple components are returned as printed. Where a country writes dates day-first or uses its own calendar notation, the value is preserved as it appears rather than silently reformatted, leaving any normalisation to you so nothing is lost in translation.

Output formats and scaling up

Every scan can be exported as JSON, CSV, Excel, or XML from the same result. JSON suits developers wiring the fields into an application; CSV and Excel suit teams building a register of travellers or hires in a spreadsheet; XML fits older systems that still import it. The free tool processes one page at a time, which covers most ad-hoc needs.

When you need to handle passports at volume, the Docyield API and batch dashboard return the identical schema you see here, so you can process many documents, receive results by webhook, and apply your own validation. Nothing about the field names or shape changes between the free tool and the paid plans.

What the passport scanner extracts

Each passport is returned against a fixed schema, with every value transcribed exactly as printed. Fields that are absent or unreadable come back empty rather than guessed.

Document type
The kind of document, typically Passport.
Passport number
The booklet's passport number.
Surname
The holder's surname or family name.
Given names
The holder's given (first and middle) names.
Nationality
The holder's nationality as printed.
Date of birth
The holder's date of birth.
Sex
The sex or gender marker on the document.
Place of birth
The holder's place of birth.
Date of issue
The date the passport was issued.
Date of expiry
The date the passport expires.
Issuing authority
The authority or country that issued the passport.
MRZ
The machine-readable zone — both lines of monospaced characters from the bottom of the page.

How to scan a passport into structured data

  1. 1Upload the passport page — drop a PDF, PNG, JPG, or WEBP onto the box above, or click to choose a file.
  2. 2Make sure the whole page is visible, flat, and in focus, including the two MRZ lines at the bottom.
  3. 3Wait a moment while Docyield reads the visual zone and the MRZ and extracts the fields.
  4. 4Review the result against the original page and confirm any value you want to double-check.
  5. 5Choose your output tab — JSON, CSV, Excel, or XML — then copy or download the data.

Frequently asked questions

Processing documents at scale?

Batch upload, an extraction API, and webhooks for 100+ documents a month.

View the API

Related tools