NSS
The Número de Seguridad Social that IMSS gives every worker. 11 digits.
Try it
NSS72795608040Valid
- Subdelegation
- 72
- Registered in
- 1979
- Born in
- 1956
Validate and parse
import { parseNss } from "mexico-utils";
parseNss("72795608040");
// {
// nss: "72795608040",
// subdelegation: "72",
// registrationYear: 1979,
// birthYear: 1956
// }| Digits | Meaning |
|---|---|
| 1–2 | IMSS subdelegation |
| 3–4 | Year the person signed up |
| 5–6 | Birth year |
| 7–10 | Sequence number |
| 11 | Check digit (Luhn) |
Years only have two digits, so they're guessed: the registration year can't be in the future, and the birth year can't be after the registration year.
| Error | Meaning |
|---|---|
format | Not 11 digits |
check-digit | The last digit doesn't match |