Extract data from a passport
Extract data from a passport scan or photo — passport OCR that returns structured fields, not flat text. Get surname, given names, passport number, nationality, dates, issuing authority, and both MRZ lines as JSON, CSV, or Excel.
What should we pull from this passport?
Or pick specific fields
Or describe it yourself
Why this matters
KYC, visa applications, hotel check-in, and identity onboarding all need the same fields. ExtractFox returns them in a stable schema, including both lines of the machine-readable zone, so you can compare MRZ values against the visual fields and flag likely OCR errors. Conventional passport data extraction is two systems bolted together: an MRZ reader that only ever sees the two lines at the bottom, and template OCR that breaks the moment a country moves the issuing authority to the other side of the page. Here both are one pass — which is also how a transposed digit surfaces, because a document number that disagrees between the visual field and MRZ line 2 is a real signal rather than a silent error. Teams still capture data from passports by hand at roughly forty seconds a document, and the mistakes that survive review are the ones nobody reads aloud: an expiry date on a mid-month renewal, or a document number with an O where a zero belongs. When the queue also contains national ID cards, residence permits, or driver's licenses, the ID document extractor handles the same job for documents that have no ICAO MRZ to check against.
How it works
- Step 1Upload the passport image
PDF, PNG, JPG, or HEIC — a flatbed scan or a photo captured at the desk. Front photo page only.
- Step 2Extract identity fields
Surname, given names, passport number, nationality, sex, date of birth, place of birth, issue date, expiry date, issuing authority, and both MRZ lines. The printed fields and the machine-readable zone come from the same pass, so there is no separate MRZ reader to run first.
- Step 3Verify and export
Inspect the table, then download as JSON for an API ingest or Excel for a spreadsheet.
Fields extracted
country_codesurnamegiven_namespassport_numbernationalitydate_of_birthsexplace_of_birthdate_of_issuedate_of_expiryissuing_authoritymrz_line_1mrz_line_2Common use cases
Sample output
Example output from a passport photo page
| country_code | GBR |
| surname | DOE |
| given_names | JANE ELIZABETH |
| passport_number | 123456789 |
| nationality | BRITISH CITIZEN |
| date_of_birth | 1990-04-12 |
| sex | F |
| place_of_birth | LONDON |
| date_of_issue | 2022-03-01 |
| date_of_expiry | 2032-03-01 |
| issuing_authority | HMPO |
| mrz_line_1 | P<GBRDOE<<JANE<ELIZABETH<<<<<<<<<<<<<<<<<<< |
| mrz_line_2 | 1234567894GBR9004129F3203018<<<<<<<<<<<<<<06 |
Frequently asked questions
How do I extract data from a passport scan or photo?+
Drop the passport image (PDF, JPG, PNG, or HEIC) onto this page. ExtractFox reads every printed field — surname, given names, passport number, nationality, date of birth, expiry date, issuing authority, and both MRZ lines — and returns them as JSON, CSV, or Excel. No template setup is required.
Can I extract MRZ data from a passport photo?+
Yes. Use MRZ only for the raw two-line machine-readable zone, or Parsed MRZ fields when you want document type, issuing country, passport number, nationality, birth date, sex, expiry date, and optional data split into separate fields. Either mode stands in for a dedicated MRZ reader, with the difference that the printed fields come back in the same response instead of a second scan.
How accurate is passport data extraction from a phone capture?+
Good enough to review rather than retype, which is the bar that matters. A flat, glare-free photo of the photo page reads about as well as a flatbed scan; angle, motion blur, and laminate reflections are what cost accuracy. Because the MRZ is captured alongside the visual fields, most capture errors announce themselves — the document number, birth date, and expiry appear twice, and a disagreement between the two is the flag to re-shoot.
Does ExtractFox parse the MRZ on a passport?+
Yes — both MRZ lines are returned as separate fields (mrz_line_1 and mrz_line_2), and the Parsed MRZ fields option splits them into document_number, nationality, date_of_birth, sex, date_of_expiry, and optional_data. Keep the raw MRZ lines so you can run ICAO 9303 check-digit validation in your own pipeline.
Is this a passport OCR tool, or something different?+
It's better than classic passport OCR. Traditional OCR returns a flat string of text and you write rules to find each field. ExtractFox returns a typed schema — surname, given_names, passport_number, dates as ISO 8601 — directly, so there's no parsing layer to maintain.
Which countries' passports are supported?+
Any ICAO-compliant passport. The model has been tested on common formats from the EU, US, UK, India, Brazil, Japan, and most APAC and LATAM countries. National ID cards aren't supported on this page — use the ID document extractor for those.
Is it safe to upload passport scans here?+
Files are processed by ExtractFox's secure extraction engine and are not stored long-term; larger uploads use temporary private storage and are deleted after processing. For regulated KYC workloads, contact us for a self-hosted or VPC deployment.
Can I extract passport data from a photo on my phone?+
Yes. Drop a HEIC or JPG photo of the passport's main page. Glare and angle affect accuracy — a flat, well-lit photo works best.
Can I bulk-process passports for KYC onboarding?+
On the paid plan you can hit the REST API directly — useful for KYC pipelines, hospitality check-in, or visa application processing. Each call returns the same stable schema.
What if the passport text is in a non-Latin script?+
ExtractFox extracts text in the script printed on the document. The MRZ is always Latin-transliterated by ICAO standard, so cross-checking against the visual fields works even for Cyrillic, Arabic, or CJK passports.
What about driver's licenses, national IDs, or residence permits?+
Use the ID document extractor for non-passport IDs — it returns the same kind of structured fields (names, document number, dates) without expecting an ICAO-format MRZ.
Is there a passport OCR API?+
The same /api/extract endpoint accepts passport images with schemaId=passport on paid plans. See /developers for auth and quotas — this page is the free browser tool.
Can I use this for KYC passport OCR integration?+
Yes. The output schema is stable across ICAO-compliant passports — pipe JSON into your verification flow, compare MRZ against visual fields, and run check-digit validation in your own code.