Identity document template

Extract passport and ID data from scans

Upload a passport, national ID card or driver's licence and get back document type, holder name, birth date, nationality, issue and expiry dates and the document number as printed.

Sign in to open the Playground with the Identity Document template already picked. Or try a guest inbox from the home page with no account.

At a glance

  • 14 keys, including nested values
  • PDF, PNG and JPEG, including scans and photos
  • Output: JSON, Excel (.xlsx), CSV
  • Built to return null instead of guessing
  • API and Playground documents are not stored after a request finishes
  • Good for: kyc and onboarding, travel and visa processing, age and identity checks

Keys

What gets extracted

The Identity Document template, exactly as it is saved in a new workspace. Every key comes back in the response. A value that is not on the document is null.

KeyType
document_typerequiredFor example passport, national ID or driver's licence.string
full_namerequiredstring
given_namesstring
surnamestring
date_of_birthdate
sexSex or gender as printed on the ID.string
nationalitystring
document_numberrequiredPassport or ID number.string
issuing_countryCountry or authority that issued the document.string
issue_datedate
expiry_datedate
place_of_birthstring
addressResidential address when printed on the document.string
machine_readable_zoneMRZ lines at the bottom of a passport, if visible.string

Good to know

Identity document: keys worth knowing

What the trickier keys in the Identity Document template hold, and how they relate.

  • document_number

    The passport or ID number exactly as printed, including letters and spacing.

  • issue_date and expiry_date

    Valid-from and valid-to dates normalized to yyyy-mm-dd when the print format allows a clear reading.

Example

From identity document to JSON

An illustrative identity document with a made-up company and numbers, and the JSON the Identity Document template returns for it. Keys that are not on the document come back as null.

Output: values
{
  "document_type": "passport",
  "full_name": "Maya Perera",
  "given_names": "Maya",
  "surname": "Perera",
  "date_of_birth": "1994-05-18",
  "sex": "F",
  "nationality": "LKA",
  "document_number": "N1234567",
  "issuing_country": "Sri Lanka",
  "issue_date": "2020-01-15",
  "expiry_date": "2030-01-14",
  "place_of_birth": "Galle",
  "address": null,
  "machine_readable_zone": "P<LKAPERERA<<MAYA<<<<<<<<<<<<<<<<<<<<<<<<<<<"
}

Common gotchas

Where identity document extraction trips up

Things that often catch people out with identity document data, and how to handle them.

  • Document type

    Document Type is the kind of ID, for example passport or national ID, not the issuing country code.

  • Photos and glare

    Heavily cropped or glare-covered fields return null instead of guessed characters.

How it works

Three steps, no setup.

  1. Step 1

    Upload the document

    Drop an identity document into the Playground. PDF, PNG and JPEG all work, including scans and phone photos.

  2. Step 2

    Pick the template

    Choose the Identity Document layout. It is already in every new workspace and guest browser, and you can edit its keys.

  3. Step 3

    Review and export

    The model fills exactly the layout's keys, with numbers as numbers and dates as yyyy-mm-dd. Copy the fields or download Excel or CSV.

Playground

Try the Identity Document template now

Upload an identity document with the Identity Document layout already picked. Edit the keys afterward if you need to match your own records.

FAQ

Identity document extraction, answered.

Can I download identity document data as Excel or CSV?

Yes. After a parse in the Playground, use Download to save the result as Excel (.xlsx) or CSV. Lists like line items get their own sheet in Excel and one row each in CSV.

Do you store my identity document documents?

No. The file is processed in memory for the request and then dropped. Neither the document nor the extracted JSON is saved. Only a usage record is kept, with things like the time, page count and credits used.

Can I change the keys?

Yes. Every new workspace, and every guest browser, starts with the Identity Document template as a normal layout. Edit it, rename keys, add keys or delete it. Changes are yours, and a deleted template does not come back.

What happens when a value is not on the document?

It comes back as null. Doxtract is built to return null instead of guessing, so you can tell missing data from real data.

Is it free to try?

Yes. On the home page you can start a guest inbox with no account. Sign in for the Playground and a free plan with monthly credits and saved layouts. One credit is one page.

Try it on your own identity document.

Sign in to open the Playground with the Identity Document template already picked, then drop in a file. A free account also unlocks saved layouts and exports at volume.