Free ID card OCR for CNIC, Aadhaar and national IDs
Upload an identity card and extract the name, ID number and dates as structured data, free. It reads Pakistan's CNIC, India's Aadhaar and national ID cards from around the world, from a scan or a phone photo. It reads what is printed, and it does not verify the card.
- Free
- No sign-up, no card
- Download as Excel, CSV or JSON
An ID card is sensitive personal data. Upload your own, or one you have permission to use. Cover any number you don't need. We keep the first page and the result for 7 days to run and improve this tool, then delete them. The rest of your file is not stored. Privacy policy
Republic of Sampleland
National Identity Card
- Full Name
- Alex Sample
- Father Name
- Sam Sample
- Identity Number
- 00000-0000000-0
- Date of Birth
- 1990-01-01
- Date of Issue
- 2024-01-01
- Date of Expiry
- 2034-01-01
{
"full_name": "Alex Sample", "father_name": "Sam Sample", "national_identification_number": "00000-0000000-0", "date_of_birth": "1990-01-01"}Any layout, no template
It works out the fields from the page itself, so there's nothing to set up.
Scans and phone photos
Digital PDFs, scanned pages and photos all go through the same way.
Structured, not just text
Named fields and table rows you can download as Excel, CSV or JSON, not a wall of OCR text.
An API when you need it
The same data from your own code, as the sample call further down shows.
Identity card names by country
An identity card is the same kind of document everywhere, but almost every country has its own name for it. If yours isn't listed, upload it anyway: the tool works out the fields from the card itself, in the card's own layout.
| Country | Card names | Number on the card |
|---|---|---|
| Pakistan | CNIC, Smart NIC (SNIC), NICOP, POC, from NADRA | 13 digits, written 00000-0000000-0 |
| India | Aadhaar card, PAN card, Voter ID (EPIC) | Aadhaar 12 digits, PAN 10 characters |
| Bangladesh | NID, Smart NID card | 10 or 17 digits |
| Sri Lanka, Nepal | NIC, Nagarikta citizenship certificate | Varies by card |
| UAE | Emirates ID | 15 digits, starting 784 |
| Saudi Arabia | National ID (Hawiya), Iqama resident card | 10 digits |
| Qatar, Kuwait, Oman | QID, Civil ID, Resident card | Varies by card |
| Malaysia, Singapore | MyKad, NRIC, FIN | MyKad 12 digits, NRIC 9 characters |
| Indonesia, Philippines | KTP, e-KTP, PhilID (PhilSys), UMID | NIK 16 digits on a KTP |
| Nigeria, Ghana, Kenya | NIN slip, Ghana Card, Huduma or Maisha card | NIN 11 digits |
| South Africa, Egypt | Smart ID card, Egyptian national ID | 13 digits, 14 digits |
| Turkey | T.C. Kimlik card | 11 digits |
| Germany, France, Italy | Personalausweis, Carte nationale d'identité, CIE | Varies, with a machine-readable zone |
| Spain, Latin America | DNI, NIE, cédula, RG, CURP, INE credential | Varies by country |
| United States, Canada | State ID card, Green Card, provincial photo card | Varies by state or province |
What the free ID card extractor reads
- Identity: full name, surname, given names, and the name in local script where printed.
- Family: father's, husband's or mother's name, which cards such as the CNIC carry.
- Numbers: national ID number, card number and machine-readable zone lines.
- Dates: date of birth, date of issue and date of expiry.
- Details: sex, nationality, place of birth, address and issuing authority.
CNIC OCR: reading a Pakistani identity card
A CNIC prints the holder's name and father's or husband's name, the 13-digit number, and the dates of birth, issue and expiry. Depending on the card version, the front carries English, Urdu or both, and the addresses sit on the back. Upload it as a clear photo with the whole card in frame. For a Smart NIC, the same applies. For a step-by-step guide to the CNIC fields, see CNIC to text.
Aadhaar OCR: reading an Indian identity card
An Aadhaar card prints the name, date of birth, sex and 12-digit number on the front, with the address on the back. A printed e-Aadhaar puts both on a single page. If you don't need the full number, use a masked Aadhaar, which shows only the last four digits. A PAN card or Voter ID reads the same way.
Front and back of the card
Many cards split the details across two sides, so the number can sit on the front and the address on the back. The free try reads one side: the first page of a PDF, or a single image. Upload the side you need, or use a free account to read both together in one run.
Sample API call
This is how the same ID card looks from your own code. wf_demo_identity_card is a dummy workflow id and every value below is invented, so the call won't run as written. A real run reads every page and adds a confidence score and page position to each field.
curl -X POST "$DOCREFINERY_API/v1/workflows/wf_demo_identity_card/run" \
-H "Authorization: Bearer $DOCREFINERY_API_KEY" \
-F "[email protected]"
# Take trace_id from the answer, then poll until status is "fulfilled"
curl "$DOCREFINERY_API/v1/runway/9f1c0a7e" \
-H "Authorization: Bearer $DOCREFINERY_API_KEY"{
"trace_id": "9f1c0a7e",
"status": "fulfilled",
"document_type": "identity_card",
"result": {
"fields": [
{
"key": "full_name",
"alias": "Full Name",
"text": "Alex Sample",
"field_confidence": 0.99,
"location": { "page": 1, "bbox": [0.08, 0.12, 0.46, 0.14] }
},
{
"key": "father_name",
"alias": "Father Name",
"text": "Sam Sample",
"field_confidence": 0.98,
"location": { "page": 1, "bbox": [0.08, 0.17, 0.46, 0.19] }
},
{
"key": "national_identification_number",
"alias": "Identity Number",
"text": "00000-0000000-0",
"field_confidence": 0.97,
"location": { "page": 1, "bbox": [0.08, 0.22, 0.46, 0.24] }
}
],
"extraction_approval": "auto",
"low_confidence_fields": []
}
}Make it run on your own ID card
- Create a free account.
- Upload one sample under Workflows, keep the fields you want and save. That gives you a real workflow id.
- Create an API key under Settings. Keys are switched on per account, so ask us if you don't see the option.
- Set
DOCREFINERY_APIandDOCREFINERY_API_KEYas in the quickstart, and swap in your id.
Free try or free account?
| Feature | Free try | Free account |
|---|---|---|
| Pages read | Page 1 | Every page |
| Allowance | 5 tries a day | 100 pages a month |
| File size | Up to 10 MB | Up to 100 MB |
| How it reads | Finds the fields on the page | Built-in ID card fields, or your own workflow |
| Checking | Compare with your page | Confidence scores and page citations |
| Output | Fields on screen, download as Excel, CSV or JSON | Excel, CSV and JSON for every page, and API keys on request |
Common questions
Can I extract CNIC data for free?
Yes. Upload a photo or scan of a CNIC and the tool returns the name, 13-digit number and dates as structured fields. You get 5 free tries a day with no account or card.
Does the Aadhaar OCR work with a masked Aadhaar?
Yes. It reads what is printed, so a masked Aadhaar returns the masked number as it appears. If you don't need the full number, a masked copy is the better one to upload.
Is there a CNIC or Aadhaar OCR API?
Yes. A free account lets you save a workflow for your card and run it through the API. The identity card is a built-in document type with 26 fields, and keys are switched on per account.
Can it read Urdu, Arabic or Hindi on an ID card?
It tries to read every language printed on the card, and the identity card fields include a name in local script. Check the result against the card, especially for names, since local scripts are where a misread is most likely.
Is it legal to upload someone else's ID card?
An ID card is sensitive personal data, and the rules depend on where you are. Upload only your own card, or one you have a lawful reason and permission to process. We keep the first page and result for 7 days, then delete them.
Sources
Related
- CNIC to textConvert a CNIC to text free. Upload a photo or scan of a Pakistani ID card and get the name, CNIC number and dates as text, Excel, CSV or JSON.
- Passport OCRFree passport OCR. Extract the name, passport number, dates and MRZ lines from a scan or photo as structured data, with no account or card needed.
- Driving licence OCRFree driving licence and driver's license OCR. Extract the name, licence number, class and dates from a photo or scan as structured data, with no signup.
- KYC and onboardingKYC document extraction for passports, ID cards, proofs of address and company records. Missing fields come back empty, never guessed. Not an ID check.
- Utility bill OCRFree utility bill OCR for electricity, gas, water and phone bills. Extract the account, address, usage and amount due as structured data, with no signup.
Try it on your own ID card.
Free, with no sign-up and no card.