Set Up Identity Fields for ID Cards and Passports
Configure ID and passport fields in the dashboard — extract document numbers, dates, and holder details for KYC workflows.
Ready to set this up? Sign up for PerfectParser and get 20 free credits — no credit card required.
What this guide helps you do
This guide shows how to configure an ID card parser in PerfectParser, define identity fields, run a test batch, and export verification data. After you upload a sample, field detection runs automatically. Compare the Schema tab with the recommended fields below so license and passport zones map to the right fields.
Why ID cards are hard to parse
Identity documents combine a visual inspection zone (name, photo, dates printed on the front) with a machine-readable zone (MRZ) on passports and many national IDs. The two zones can disagree — a typo in the visual zone vs the MRZ — and your schema should capture the fields your compliance workflow treats as authoritative. Issue date and expiry date sit near each other and are frequently swapped during detection. Photos and holographic overlays cause glare that obscures document numbers on phone-captured images. Driver's licenses from different US states use entirely different layouts with no shared field positions. International passports add nationality and issuing authority in non-English scripts. Expiry date format varies (DD/MM/YYYY vs MM/DD/YYYY), so storing dates as Text preserves the printed format for downstream validation rules.
Recommended Fields
We suggest configuring the following schema fields for your ID & Passport Parser to capture all essential compliance data.
| Field Name | Type | Description |
|---|---|---|
document_type | Text | The type of ID found (e.g. Passport, Driver's License, National ID). |
document_number | Text | The unique document identifier or passport number. |
full_name | Text | The holder's full legal name as printed. |
date_of_birth | Text | The holder's date of birth. |
nationality | Text | The country of issue or nationality. |
issue_date | Text | The date the document was issued. |
expiry_date | Text | The date the document expires. |
issuing_authority | Text | The government authority that issued the ID. |
Set up this parser in the dashboard
Create a parser
Go to Parsers → New Parser in the dashboard. Give it a name like "ID Card Parser". You can set the parser name while detection runs.
Upload a sample document
Drag and drop a representative ID document (PDF, PNG, or JPEG). Use the document type and image quality typical of your KYC intake — the AI uses it to learn field placement. Field detection and sample extraction start automatically.
Review detected fields
Field detection and sample extraction start as soon as the upload finishes. Open the Schema tab and compare detected fields with the Recommended Fields table above. Rename, remove, or add fields, and edit each field's instructions. Check sample values on the Results tab.
Review and save your schema
Check that issue_date and expiry_date are separate fields and not swapped. Confirm document_number is Text to preserve alphanumeric passport numbers. Click Save parser. You can edit fields later on the parser Fields tab.
Run a test batch
Open Run Extraction, choose how your files are organised, upload a small test set of ID images, and click Start batch extraction. Review the run on the Results tab and export to CSV or Excel.
Common mistakes
- Swapping issue_date and expiry_date because both appear as date fields in the header region.
- Using a glare-free scan as the sample when user uploads are phone photos with reflection on the laminate.
- Storing document_number as Number — passport and license numbers often contain letters.
- Ignoring MRZ vs visual zone discrepancies — add field descriptions noting which zone your workflow prioritises.
Next steps
Test your first extraction free — sign up for PerfectParser, no credit card needed.
FAQs
Do I need a sample ID document to set up this parser?
Yes. Upload the document type you process most often — driver's license, national ID, or passport. Layouts differ significantly between document types and issuing countries, so match your sample to production intake.
What image quality do I need for reliable extraction?
Use a well-lit photo or scan where all four corners are visible and text is in focus. Heavy glare on laminated IDs or cropped photos that cut off the MRZ zone reduce accuracy on document_number and expiry_date. Test with the same quality level you accept from users.
How many credits does setup and a test extraction use?
Parser setup is free. Each ID image or PDF page costs 1 credit. Passports scanned as two-page spreads may count as 2 credits depending on file structure.
Looking for product features and use cases?