---
id: "ir_melli_code"
kind: "datatype"
status: "draft"
is_pii: true
categories: ["pii", "persons"]
country: ["IR"]
langs: ["fa"]
quality: 75
url: "https://registry.apicrafter.io/datatype/ir_melli_code"
---

# Iranian national identification number (code melli) (`ir_melli_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Ten-digit national identification number (code melli) printed on the Iranian national identity card and written as XXX-XXXXXX-X. Validators such as validator.js treat the last digit as a modulo 11 check digit over the first nine; no official description of the algorithm was found, so the record sets no checksum.

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: Iran (IR)
- Languages: Persian (fa)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[0-9]{3}-?[0-9]{6}-?[0-9]$
```

## Mappings

- dpv: `pd:OfficialID`

## Supported by tools

- `validatorjs`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/National_identification_number>
- other: <https://github.com/validatorjs/validator.js/blob/master/src/lib/isIdentityCard.js>

## Quality

Score 75/100. Missing: examples, negative example, translation.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/ir_melli_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/IR/persons/ir_melli_code.yaml>
