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. Leave the AI prompt blank on the first pass unless you need tighter mapping to specific document zones on licenses or passports.
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 auto-detect. 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. |
AI Prompt (Optional)
Use this only when you want to guide auto-detect toward a specific set of fields.
If you want PerfectParser to discover additional fields on its own, leave the AI Prompt (Optional) box blank for the first pass, review the detected schema, then add a prompt only if you need tighter consistency.
When you do use a prompt, copy and paste the following instructions into the AI Prompt (Optional) field during setup:
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" and optionally select the document category.
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.
Detect fields or use standard fields
Paste the AI Prompt from the section above into the AI Prompt (Optional) box if you want tighter field mapping, then click Auto-Detect. To discover more fields automatically, leave the prompt blank and click Auto-Detect. Or skip auto-detect and add fields manually using the Recommended Fields table above.
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.
Run a test batch
Navigate to Bulk Extraction, choose how your files are organised, upload a small test set of ID images, and click Extract All Files. Review the results in Batch History 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?