Free passport OCR and MRZ extraction
Upload the data page of a passport and extract the name, passport number, dates and MRZ lines as structured data, free. It reads scans and phone photos of passports from any country. It reads what is printed, and it does not check that a passport is genuine.
- Free
- No sign-up, no card
- Download as Excel, CSV or JSON
A passport is sensitive personal data. Upload your own, or one you have permission to use. We keep the first page and the result for 7 days to run and improve this tool, then delete them. The rest of your file is not stored. Privacy policy
Republic of Sampleland
Passport
- Surname
- SAMPLE
- Given Names
- ALEX
- Passport Number
- XX0000000
- Date of Birth
- 1990-01-01
- Date of Expiry
- 2034-01-01
- Nationality
- SAMPLELANDER
{
"surname": "SAMPLE", "given_names": "ALEX", "passport_number": "XX0000000", "date_of_birth": "1990-01-01"}Any layout, no template
It works out the fields from the page itself, so there's nothing to set up.
Scans and phone photos
Digital PDFs, scanned pages and photos all go through the same way.
Structured, not just text
Named fields and table rows you can download as Excel, CSV or JSON, not a wall of OCR text.
An API when you need it
The same data from your own code, as the sample call further down shows.
What the free passport extractor reads
- Holder: surname, given names, nationality, sex, date and place of birth.
- Passport: passport number, type, issuing country and issuing authority.
- Dates: date of issue and date of expiry.
- MRZ: both machine-readable lines at the foot of the page, exactly as printed.
- Local fields where a country prints them, such as a national ID number or a parent's name.
Passports and travel documents by region
Most passports follow the same international layout, which is why the MRZ looks alike everywhere. The details around it are where countries differ.
| Region | Document | What to look for |
|---|---|---|
| Pakistan | Pakistani passport, machine-readable passport (MRP), e-passport | CNIC number, father's or husband's name |
| India | Indian passport, e-passport | File number, parents' and spouse's names on the last page |
| Bangladesh | Bangladeshi e-passport, MRP | Personal number |
| UAE, Saudi Arabia, Gulf | Passport with Arabic and English text | Names in two scripts |
| United Kingdom, Ireland | British or Irish passport | Authority, biometric chip symbol |
| European Union | Reisepass, passeport, pasaporte | Text in several languages |
| United States, Canada | US or Canadian passport, passport card | Place of birth by state or province |
| Worldwide | Diplomatic, official and service passports | Passport type code in the MRZ |
How to get a clean passport read
- Upload the page with the photo. That's where the fields and the MRZ are.
- Keep all four corners in frame, and include both MRZ lines at the bottom.
- Avoid glare from the laminate: tilt the passport away from the light.
- Some passports print extra details on a second page. A free account reads every page of a PDF.
The passport field list covers all 26 fields, and KYC onboarding shows where passport extraction fits in a client file.
Sample API call
This is how the same passport looks from your own code. wf_demo_passport is a dummy workflow id and every value below is invented, so the call won't run as written. A real run reads every page and adds a confidence score and page position to each field.
curl -X POST "$DOCREFINERY_API/v1/workflows/wf_demo_passport/run" \
-H "Authorization: Bearer $DOCREFINERY_API_KEY" \
-F "[email protected]"
# Take trace_id from the answer, then poll until status is "fulfilled"
curl "$DOCREFINERY_API/v1/runway/9f1c0a7e" \
-H "Authorization: Bearer $DOCREFINERY_API_KEY"{
"trace_id": "9f1c0a7e",
"status": "fulfilled",
"document_type": "passport",
"result": {
"fields": [
{
"key": "surname",
"alias": "Surname",
"text": "SAMPLE",
"field_confidence": 0.99,
"location": { "page": 1, "bbox": [0.08, 0.12, 0.46, 0.14] }
},
{
"key": "given_names",
"alias": "Given Names",
"text": "ALEX",
"field_confidence": 0.98,
"location": { "page": 1, "bbox": [0.08, 0.17, 0.46, 0.19] }
},
{
"key": "passport_number",
"alias": "Passport Number",
"text": "XX0000000",
"field_confidence": 0.97,
"location": { "page": 1, "bbox": [0.08, 0.22, 0.46, 0.24] }
}
],
"extraction_approval": "auto",
"low_confidence_fields": []
}
}Make it run on your own passport
- Create a free account.
- Upload one sample under Workflows, keep the fields you want and save. That gives you a real workflow id.
- Create an API key under Settings. Keys are switched on per account, so ask us if you don't see the option.
- Set
DOCREFINERY_APIandDOCREFINERY_API_KEYas in the quickstart, and swap in your id.
Free try or free account?
| Feature | Free try | Free account |
|---|---|---|
| Pages read | Page 1 | Every page |
| Allowance | 5 tries a day | 100 pages a month |
| File size | Up to 10 MB | Up to 100 MB |
| How it reads | Finds the fields on the page | Built-in passport fields, or your own workflow |
| Checking | Compare with your page | Confidence scores and page citations |
| Output | Fields on screen, download as Excel, CSV or JSON | Excel, CSV and JSON for every page, and API keys on request |
Common questions
Can I read a passport MRZ for free?
Yes. Upload the data page and the two MRZ lines come back as fields alongside the name, number and dates. You get 5 free tries a day with no account or card.
Does passport OCR work on a phone photo?
Yes, if the whole page is in focus and free of glare. The MRZ uses small characters, so a sharp photo matters. Check the passport number against the page before you use it.
Is there a passport OCR API?
Yes. The passport is a built-in document type with 26 fields, and a free account can run it through a saved workflow or the runway. API keys are switched on per account.
Do you verify that the passport is real?
No. docRefinery reads what is printed. It doesn't check authenticity, read the chip or compare the photo with a person. Use a dedicated identity verification provider for that.
Related
- PassportRead passport fields and MRZ lines from a scan or photo into JSON, for KYC and onboarding. docRefinery reads what is printed; it does not verify authenticity.
- ID card OCRFree ID card OCR for CNIC, Aadhaar, Emirates ID and national ID cards. Extract name, ID number and dates as structured data, with no account needed.
- Driving licence OCRFree driving licence and driver's license OCR. Extract the name, licence number, class and dates from a photo or scan as structured data, with no signup.
- KYC and onboardingKYC document extraction for passports, ID cards, proofs of address and company records. Missing fields come back empty, never guessed. Not an ID check.
Try it on your own passport.
Free, with no sign-up and no card.