Egypt National ID Verification API: Digit Structure, Governorate Codes and Record Checks
The Egyptian national ID number carries fourteen digits: century of birth, date of birth, governorate of registration, a four-digit serial ending in the gender digit, and a check digit. These fields support input validation. The VLens verification API validates them and verifies the card and its holder under the identity requirements of FRA Decision 140 of 2023.
Field layout of the 14-digit Egyptian national ID number
The number divides into five fixed-position fields.
| Digits | Field | Implementation notes |
|---|---|---|
| 1 | Century of birth | 2 = 1900-1999, 3 = 2000-2099; any other value is malformed. |
| 2-7 | Date of birth | YYMMDD, checked as a calendar date against the century digit; 30 February is malformed. |
| 8-9 | Governorate of registration | Two-digit code from a fixed, non-contiguous list. |
| 10-13 | Serial; digit 13 = gender | Separates same-day births in one governorate; digit 13 odd = male, even = female. |
| 14 | Check digit | Algorithm unpublished; acceptance rests on the record check. |
Governorate codes in positions 8 and 9
Positions 8 and 9 hold the governorate of birth registration, independent of current residence. Twenty-seven governorate codes are in use, plus 88 for births registered outside the republic. A parser accepting the continuous range 01-35 admits codes that do not exist.
- 01 Cairo, 02 Alexandria, 03 Port Said, 04 Suez
- 11 Damietta, 12 Dakahlia, 13 Sharqia, 14 Qalyubia, 15 Kafr El Sheikh, 16 Gharbia, 17 Monufia, 18 Beheira, 19 Ismailia
- 21 Giza, 22 Beni Suef, 23 Faiyum, 24 Minya, 25 Asyut, 26 Sohag, 27 Qena, 28 Aswan, 29 Luxor
- 31 Red Sea, 32 New Valley, 33 Matruh, 34 North Sinai, 35 South Sinai
- 88 Birth registered outside the republic
Response contents of an Egypt national ID verification API
A parse result reports the structure of a number; a verification response reports a decision and the checks behind it. VLens runs six stages: OTP phone possession; national ID capture with Arabic OCR and anti-forgery screening; liveness with face match to the ID photo; Civil Status record verification; NTRA phone-ownership confirmation; and issuance of the government-verified digital identity.
- A decision field separate from the parsed fields, with an outcome per stage.
- Arabic fields as captured, with the Latin transliteration in its own field.
- Reason codes distinguishing malformed input, check-not-performed, record-not-found, data-mismatch and upstream-unavailable.
- UTC timestamps per stage and a durable transaction identifier; Decision 140 of 2023 requires the concluded contract to be stored with all pre-conclusion stages and their times.
Arabic OCR on the national ID card
Egyptian identity documents use Arabic-Indic digits (٠-٩); a recogniser trained on Western digits misreads the number and date blocks and raises no error. Annex 1 of Decision 140 of 2023 requires live capture of the document; a gallery upload falls outside it.
Civil Status Organization and NTRA verification
Decision 140 of 2023 makes the national ID the primary identifier for Egyptians, and Annex 1 requires the document's genuineness to be established through linkage with the competent administrative authorities. The captured data is checked against the Civil Status Organization record, and the mobile number against NTRA ownership data. VLens runs OCR on the national ID before the enquiry call, so the data is sound before the enquiry cost is incurred.
Decision 186 of 2024 on the enquiry into the correctness of customer data (الاستعلام عن صحة بيانات العملاء), amended by Decisions 30 of 2025 and 133 of 2026, obliges fintech-licensed companies, outsourcing service providers and insurance companies to enquire with the Civil Status Organization and NTRA without an accompanying OTP: the fintech journey sends two OTPs, at registration and at contract conclusion, and insurance is outside the OTP requirement.
Decision 133 of 2026 added two things: consumer finance companies, microfinance companies and the associations and NGOs licensed for microfinance joined the enquiry obligation, and those two sectors alone must bind an OTP to the enquiry, kept in an immutable record proving the customer's presence, at a new contract and at renewal. A financial transaction requires the OTP only, with no new enquiry. The OTP's reference ID is passed inside the enquiry (PII) API call.
Liveness, face match and factor minimums
Decision 140 of 2023 defines digital identity through identification, verification and authentication (التحديد والتحقق والمصادقة). Creating or renewing a digital identity requires at least four possession factors, including the identity document, email inbox, mobile number and device number; at least three presence and liveness factors, including face biometrics, reaction liveness and geolocation; determination of cyber-location and transaction time; and three knowledge factors created or updated.
Annex 1 requires the applicant's liveness and reaction to be spontaneous rather than mechanical, established through responses to random prompts. The client SDK captures device identifier, geolocation, cyber-location and transaction time alongside the selfie.
VLens registration on the FRA outsourcing register
VLens is an FRA-approved digital identity provider, registered on the fintech outsourcing register by FRA Decision 1224 of 2024 (26 May 2024) and the first provider registered across all four outsourcing fields. Chairman's Decision 2379 of 2026 (4 August 2026) renewed the registration, valid until 25 May 2027.
Frequently asked questions
Can an Egyptian national ID number be validated offline?
Offline validation covers structure: fourteen digits, a century digit of 2 or 3, a calendar-valid date in positions 2-7 and an existing governorate code. Correspondence between the number and the captured card data is established by the check against the Civil Status Organization record.
Which digit of the national ID indicates gender?
The thirteenth digit, which closes the four-digit serial: odd is male, even is female.
Is there a checksum algorithm for the fourteenth digit?
The fourteenth digit is a check digit with no officially published algorithm. Two community packages implement a reverse-engineered weighted-modulus scheme and an academic proposal applies Luhn; the schemes are mathematically incompatible, and python-stdnum ships no Egyptian national ID module.
Which governorate codes in the range 01-35 are unassigned?
Codes 05-10, 20 and 30 are unassigned. The assigned codes are 01-04, 11-19, 21-29 and 31-35, with 88 reserved for births registered outside the republic.
Does Arabic OCR on the card satisfy FRA Decision 140 of 2023?
OCR conversion of the captured data is one of four Annex 1 requirements. The other three are live capture of the document, a selfie compared at the biometric stage, and proof of the document's genuineness.
API documentation
The endpoint reference, request and response schemas and the integration guide are at docs.vlenseg.com/welcome.
API documentationContact us