AttenTech
Document APIs

Passport MRZ

Parse the machine-readable zone of any passport into verified, structured data in one call.

Get API AccessPrivate beta only
// OVERVIEW

How Passport MRZ works

Read the two-line machine-readable zone on any ICAO-compliant passport and turn it into clean, checksum-verified fields — name, passport number, nationality, and expiry — ready for border, travel, and identity-verification workflows. Works from a phone photo or a document scanner, no specialized hardware required.

ICAO 9303 MRZ parsing

Reads both TD3 lines per the ICAO 9303 standard, tolerant of OCR noise, skew, and partial glare across passports from any issuing country.

Checksum-verified fields

Every extracted field is cross-checked against its MRZ check digit, so transcription errors and tampered documents are flagged before they reach your workflow.

Composite document validation

Cross-references the MRZ against the printed photo-page fields to catch mismatches — a key signal for fraud detection in KYC and travel onboarding.

mrz
attentechth.com/api/ocr/passport-mrz
01// parse a passport MRZ in one call
02import { OCR } from '@attentech/sdk'
03
04const ocr = new OCR({
05 region: 'th-bangkok',
06 pdpa: true,
07})
08
09const result = await ocr.extract({
10 document: 'passport_mrz',
11 image: passportImage,
12})
13
14if (result.valid) {
15 const { name, passportNumber, nationality, expiry } = result.fields
16 save(result)
17}
// PROCESS

How Passport MRZ reads the machine-readable zone in one pass

Both MRZ lines are parsed per the ICAO 9303 standard and cross-checked against their own embedded check digits, then reconciled against the printed photo-page fields — so a tampered or mistyped passport gets flagged, not silently accepted.

NAME
PASSPORT NO.
NATIONALITY
EXPIRY
Capture
Parse MRZ
Verify
Structured Output

Ready to integrate Passport MRZ?

Get API access in days, or bring us in to run the full workflow for you — sovereignty by design at every step.

Get API AccessPrivate beta only