Lire en français →

DOCUMENT TYPES

ID card and passport extraction

By Sygnet Research. Written by Sygnet, sourced, checked before publication.

An ID card or passport is issued by a national authority (in France, the ANTS for the CNI, or the Ministry of the Interior for passports) and typically reaches a business through onboarding forms, claims files, or rental applications. The people processing it sit in compliance, operations, or customer support teams who need to confirm identity before moving a case forward. Automated extraction pulls the holder's name, date of birth, document number, and the machine-readable zone (MRZ) into structured fields, and checks that the MRZ checksum matches the visible data. Done well, it turns a manual identity check that takes minutes into one that takes seconds, without weakening the check itself.

Fields to extract

FieldFormat / exampleValidation check
Document typeCNI, passport, residence permitMatches known document taxonomy
SurnameMARTINMatches MRZ line 1
Given namesCLAIRE ISABELLEMatches MRZ line 1, order preserved
Date of birth1988-04-12MRZ checksum digit valid
Place of birthPARIS 14E, FRANCEPresent on CNI, absent on MRZ
SexFM/F/X only
NationalityFRAISO 3166-1 alpha-3 code
Document number19CD81047XMRZ checksum digit valid
Date of issue2021-03-02Before date of expiry
Date of expiry2031-03-01Not in the past for onboarding use
Issuing authorityPréfecture de ParisMatches known issuer list
MRZ line 1IDFRAMARTIN<<CLAIRE<<<<<<<Fixed length, format regex
MRZ line 219CD81047X4FRA8804125F...Composite checksum valid
Signature presencebooleanDetected via layout model
Photo presencebooleanDetected via layout model

Why this document is hard to process

ID documents are small, dense, and inconsistent across countries and even across issue years. France alone has three CNI generations in circulation: the old paper card, the plastic card introduced in 2021 with a new layout and chip, and various transitional formats still valid until expiry. Each generation places fields in different positions, uses different fonts, and in the newest version adds a laser-engraved photo that scanners often misread as a printing artifact.

Passports add another layer: over 190 issuing countries, each with its own layout, language, and security features. The MRZ is the one standardized element (ICAO 9303), but it only carries a subset of fields, and scanners frequently drop characters at the edges when the document is photographed at an angle or partially covered by a hand.

Scan quality is inconsistent by nature: these documents are photographed on phones, under bad light, sometimes through plastic sleeves. Holograms and UV-reactive ink, meant to prevent forgery, also confuse standard OCR into misreading digits. Multilingual documents (Maghreb passports with Arabic and French, for instance) require models that handle mixed scripts in the same line. And because identity documents are the most common target for fraud, extraction has to flag inconsistency, not just read text: a font that doesn't match the issuing year, or an MRZ checksum that fails, matters more here than in most other document types.

How Sygnet processes it

Sygnet first classifies the document by type and generation (old CNI, new CNI, passport, residence permit) before extraction starts, since field position and MRZ structure depend on it. A multimodal LLM reads both the visual layout and the MRZ, cross-checking the two rather than trusting either alone. Each extracted field carries a confidence score and a bounding box tied back to the source image, so a reviewer can see exactly where "date of birth" was read and judge it in one glance. This is what we mean by field-level provenance: no field arrives without a way to verify it.

Validation rules run automatically: MRZ checksum digits, date logic (issue before expiry, birth date consistent with document type), and issuer format checks. Where a document is one of several submitted for the same case, Sygnet applies cross-document validation: does the name on the ID match the name on the payslip or the RIB submitted in the same file? Low-confidence fields, and any document that fails a checksum, route to human review; everything else moves straight into the output schema as clean structured output, delivered by API or webhook. This is the core discipline behind reliable KYC onboarding: automate the routine cases, and route the rest to a human with the evidence already assembled.

Validation rules worth applying

  • Recompute the MRZ checksum digits for date of birth, document number, and the composite line; reject on mismatch.
  • Cross-check MRZ fields against the visible printed fields; a mismatch often signals tampering or a bad scan, not just OCR noise.
  • Confirm date of expiry is not in the past, with a configurable grace window for edge cases.
  • Verify the issuing authority against a known reference list for the document's country and generation.
  • Flag documents where photo or signature zones are missing or show signs of digital editing.
  • Check nationality code against ISO 3166-1 alpha-3, not a free-text country name.
  • For onboarding flows, match extracted name and date of birth against other submitted documents (payslip, RIB) before accepting the file.

FAQ

Can Sygnet read the new French CNI format?

Yes. Sygnet classifies documents by generation before extraction, since the 2021 CNI has a different layout, chip, and laser-engraved photo compared to the older plastic and paper versions. Fields are mapped per generation, and the MRZ (present on both old and new formats) is used as a cross-check against the visible printed data.

What happens if the MRZ checksum fails?

The document is flagged and routed to human review rather than silently accepted or rejected. A failed checksum can mean a genuine scan error, a damaged document, or something more serious. Sygnet surfaces the failure alongside the bounding box of the affected line so a reviewer can judge quickly, without re-reading the whole document from scratch.

How does this differ from OCR-only ID extraction?

Plain OCR reads characters but does not understand layout, generation differences, or MRZ structure. Sygnet combines visual layout understanding with MRZ parsing and cross-validation between the two, which catches errors OCR alone would miss. For more on this distinction, see OCR vs VLM.

NEXT STEP

See it on your own documents

One email when we publish something worth your time.