Document OCR
Read the document.
Trust the fields.
IDProval captures the user's passport, parses the MRZ, runs OCR on the visual zone, and returns structured fields you can drop straight into your application form, with checksums and authenticity signals attached.
Try it live
Drop in a document. See the fields.
Upload a passport image for identity extraction, or a general document/PDF for OCR text extraction. Images are not stored; the bytes are forwarded to the OCR pipeline and the response goes straight back to your browser.
Document type
Passport image
Drop an image or click to browse
JPG, PNG, WebP, TIFF, BMP (max 6 MB)
Public demo, limited to 5 / minute
Response
Extracted fields will appear here as soon as you submit a document.
Integration
One call. Structured data.
Passport extraction is a synchronous endpoint. POST an image, get typed JSON back. No session, no webhook, no polling.
import { createServerClient } from '@id-proval/sdk/server'
const client = createServerClient({
apiSecret: process.env.IDPROVAL_API_SECRET,
environment: 'production',
})
// Pass the captured image straight to the OCR endpoint
const result = await client.document.extract({
type: 'passport',
frontImage: passportFile, // Blob | File
})
if (result.is_valid) {
saveApplicantData(result.data)
}
curl -X POST https://api.idproval.com/api/v1/document/passport \ -H "Authorization: Bearer $IDPROVAL_API_SECRET" \ -F "front_image=@./passport.jpg"
{
"request_id": "req_01jt8w2k...",
"billing_eligible": true,
"is_valid": true,
"confidence": 0.97,
"data": {
"document_name": "ERIKA MUSTERMANN",
"document_number": "C01X00T47",
"document_nationality": "DEU",
"document_dob": "1964-08-12",
"document_expiry_date": "2031-03-15",
"document_age": 61,
"retake_reasons": null
}
}How it works
Two zones.
Cross-checked fields.
Modern passports carry the same identity data twice: printed on the page and encoded in the MRZ at the bottom. IDProval reads both, validates checksums, and only accepts a result when the two agree.
Image upload
POST the captured passport photo page as multipart form data. Capture however you want; the OCR endpoint doesn't care where the bytes came from.
MRZ extraction
The Machine Readable Zone is parsed first. Its fixed format and built-in checksums make it the most reliable source for date of birth, expiry, document number, and country code.
Visual zone OCR
OCR runs over the printed visual zone. Each field is matched against its MRZ counterpart. Mismatches are flagged in the verdict reasons rather than silently overridden.
Synchronous response
The same HTTP response carries is_valid, confidence, and the typed data object. No callbacks, no polling, just typed JSON ready to bind to your form.
Output
Fields, not free text.
Every field is typed, normalised, and ready to bind to a database column. Dates are ISO 8601, country codes are ISO 3166-1 alpha-3, names match what's printed on the document.
is_validtrueDocument passed all integrity checks
confidence0.97Combined MRZ + visual zone confidence (0 to 1)
data.document_name"ERIKA MUSTERMANN"Full name as printed on the document
data.document_number"C01X00T47"Document number
data.document_nationality"DEU"ISO 3166-1 alpha-3 country code
data.document_dob"1964-08-12"ISO 8601, MRZ-derived
data.document_expiry_date"2031-03-15"ISO 8601, MRZ-derived
data.document_age61Computed age in years from DOB
data.retake_reasonsnullPopulated with reason codes when is_valid is false
Capabilities
Built for compliance teams.
MRZ parsing
Machine Readable Zone extraction with checksum validation. Catches transposed digits and tampered fields automatically.
Visual zone OCR
Field-level OCR over the printed data: name, date of birth, document number, expiry. Cross-validated against the MRZ.
Single image capture
Send the passport photo page as one multipart request. ID cards and licences will use separate front/back processors when those pipelines are live.
Generic document OCR
PDFs and non-identity documents belong to the general OCR pipeline, separate from passport identity extraction and verification.
Authenticity signals
Layout, font, and checksum checks flag inconsistencies that indicate edited or fake documents, surfaced via the is_valid flag and retake_reasons.
Synchronous response
One HTTP call, structured JSON back. No session to poll, no webhook plumbing. The typed fields are in your handler before it returns.
Sandbox documents
Sandbox keys return realistic OCR payloads with a documented set of test passports so you can build against real shapes.
FAQ
Common questions.
What documents do you support?
The identity extraction endpoint supports passports today. National ID and driver licence pipelines are being built separately because they need barcode and layout-specific extraction rather than passport MRZ-only logic.
What file formats are accepted?
Passport extraction accepts raster captures such as JPG, PNG, WebP, TIFF, and BMP. Generic document and PDF OCR is available through the document extraction pipeline, separate from identity verification.
How is the data extracted?
We parse the Machine Readable Zone (MRZ) where present, run OCR against the visual inspection zone, and cross-check the two. When they agree we return high-confidence structured fields.
Is this a session or a raw API?
Document OCR is a raw, synchronous API. You POST the image, you get structured JSON back in the same response. No session to create, no webhook to wait for. If you also need liveness or age, use the verification flow which embeds OCR.
Do you verify the document is real?
Yes. Authenticity checks (MRZ checksum validation, font and layout consistency) run on every request and feed the is_valid flag and retake_reasons.
Is the image stored?
The image is processed for the request and discarded. Only the extracted structured fields are retained against your account for audit purposes.
How accurate is the MRZ parsing?
MRZ is a fixed-format machine-readable strip with built-in checksums. When the MRZ reads cleanly, parsing is essentially exact. Visual zone OCR is cross-checked against MRZ to catch capture issues.
Get started
Stop typing passport numbers by hand.
Grab a sandbox key, POST a passport image, and watch the structured fields come back in the same response.