CNIC to text, free and online

Upload a photo, scan or PDF of a Pakistani CNIC and get its details back as text: the name, father's or husband's name, 13-digit CNIC number and dates. Copy the fields, or download them as Excel, CSV or JSON. It's free, with no account, and it reads what is printed rather than verifying the card.

Upload your CNICTake a photo or pick a PDF, up to 10 MB
  • Free
  • No sign-up, no card
  • Download as Excel, CSV or JSON

A CNIC is sensitive personal data. Upload your own, or one you have permission to use. 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

Sample. Every value is invented.

Sample identity card

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.

What you get when you convert a CNIC to text

Plain OCR gives you every word on the card in one block, in the order the scanner happened to find it, with Urdu and English mixed together. This tool returns each detail under its own name, so the CNIC number is in the CNIC number field and the expiry date is in the expiry field. That is what you need to paste into a form, a spreadsheet or your own system.

CNIC details returned as text
FieldWhere it is on the cardExample (invented)
NameFront, in English and Urdu on most versionsAlex Sample
Father's or husband's nameFrontSam Sample
CNIC numberFront, 13 digits as 00000-0000000-000000-0000000-0
Gender, country of stayFrontM, Pakistan
Date of birthFront1990-01-01
Date of issue, date of expiryFront2024-01-01, 2034-01-01
Present and permanent addressBack, mostly in UrduAs printed

How to convert a CNIC to text

  1. Photograph the card flat, in good light, with all four corners in frame and no glare across the number. A scan or a PDF works too.
  2. Upload the front. The free try reads one image or the first page of a PDF, so upload the back separately if you need the address.
  3. Check the fields against the card, especially names, since Urdu script is where a misread is most likely.
  4. Copy what you need, or use Download to save it as Excel (.xlsx), CSV or JSON.

Which Pakistani ID cards it reads

  • CNIC, the green computerised national identity card, in its older and newer layouts.
  • Smart NIC (SNIC), the chip card NADRA issues today, front and back.
  • NICOP, the card for overseas Pakistanis, and the POC (Pakistan Origin Card).
  • Juvenile cards and the B-Form (Child Registration Certificate), which is a printed page rather than a card.
  • Photocopies and attested copies, as long as the number is still sharp.

Reading the CNIC number

The 13 digits are grouped 5-7-1. Under NADRA's numbering the first digit stands for the province or region where the card was registered, and the last digit is odd for men and even for women. The tool returns the number exactly as printed, with its dashes, so it pastes cleanly into a form that expects the 00000-0000000-0 pattern. If a form wants the digits only, remove the dashes after you paste.

CNIC to Excel for many cards

HR teams, landlords, microfinance and onboarding teams often have a folder of CNIC photos to type into a sheet. The free try handles one card at a time, 5 a day. A free account reads up to 100 pages a month, keeps every result, and exports them together, one row per card, to Excel or CSV. For a whole onboarding flow, see KYC onboarding.

Sample API call

This is how the same CNIC 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.

Run a workflow, then read the result
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"
Response (invented values)
{
  "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 CNIC

  1. Create a free account.
  2. Upload one sample under Workflows, keep the fields you want and save. That gives you a real workflow id.
  3. Create an API key under Settings. Keys are switched on per account, so ask us if you don't see the option.
  4. Set DOCREFINERY_API and DOCREFINERY_API_KEY as in the quickstart, and swap in your id.

Free try or free account?

Free try and free account, compared
FeatureFree tryFree account
Pages readPage 1Every page
Allowance5 tries a day100 pages a month
File sizeUp to 10 MBUp to 100 MB
How it readsFinds the fields on the pageBuilt-in CNIC fields, or your own workflow
CheckingCompare with your pageConfidence scores and page citations
OutputFields on screen, download as Excel, CSV or JSONExcel, CSV and JSON for every page, and API keys on request

Common questions

Is CNIC to text conversion free?

Yes. You get 5 free tries a day with no account and no card. Each try reads one image, or the first page of a PDF, and you can download the result as Excel, CSV or JSON.

Can it read the Urdu on a CNIC?

It tries to read every language printed on the card, including the Urdu name and the Urdu address on the back. Check Urdu names against the card, because that is where a misread is most likely.

Can I convert a CNIC to text from a phone photo?

Yes. A clear phone photo works as well as a scan. Lay the card flat, avoid glare on the number and keep the whole card in frame.

Can I get the front and back of a CNIC together?

The free try reads one side: one image, or the first page of a PDF. Upload each side in turn, or use a free account to read both pages of a PDF in one run.

Can I convert a CNIC to Excel?

Yes. After the try, choose Download, then Excel. The fields arrive on one sheet as Field and Value. A free account exports many cards at once, one row per card.

Is it safe to upload a CNIC?

A CNIC is sensitive personal data. Upload only your own card, or one you have permission to process. We keep the first page and the result for 7 days to run and improve the tool, then delete them.

Sources

  1. NADRA, Pakistan's national identity authority

Related

Try it on your own CNIC.

Free, with no sign-up and no card.