Mexico NSS IMSS Validator
Online Mexico NSS IMSS validator. Verify format and check digits. Test.
How is the NSS IMSS validated?
The NSS is the unique Social Security Number assigned by the IMSS in Mexico to citizens registered in the national health system. It features 11 digits.
This tool generates and validates Mexican NSS numbers using the Luhn algorithm to check the 11th verification digit.
Anatomy & Structure of Mexican NSS
The 11-digit Social Security Number comprises 5 segments:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 & 2 | IMSS Subdelegation | 2 digits | Regional agency code where the worker was registered | 12 |
| 3 & 4 | Affiliation Year | 2 digits | Two digits representing registration year | 98 |
| 5 & 6 | Birth Year | 2 digits | Two digits of insured person birth year | 80 |
| 7 to 10 | Administrative Serial | 4 digits | Unique administrative sequence number | 1234 |
| 11 | Check Digit | 1 digit | Control digit computed via Luhn Modulo 10 algorithm | 5 |
NSS Validation Algorithm (Luhn Modulo 10)
IMSS validates the 11th digit using the standard Luhn checksum:
Luhn: alternating weights [1, 2, 1, 2...]; if product >= 10 subtract 9; DV = (10 - (Sum % 10)) % 10
- 1. Multiply digits by alternating factors of 1 and 2.
- 2. If product >= 10, subtract 9.
- 3. Sum all resulting values.
- 4. Compute DV = (10 - (Sum % 10)) % 10.
- 5. Valid if 11th digit matches computed DV.