Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1 & 2IMSS Subdelegation2 digitsRegional agency code where the worker was registered12
3 & 4Affiliation Year2 digitsTwo digits representing registration year98
5 & 6Birth Year2 digitsTwo digits of insured person birth year80
7 to 10Administrative Serial4 digitsUnique administrative sequence number1234
11Check Digit1 digitControl digit computed via Luhn Modulo 10 algorithm5

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. 1. Multiply digits by alternating factors of 1 and 2.
  2. 2. If product >= 10, subtract 9.
  3. 3. Sum all resulting values.
  4. 4. Compute DV = (10 - (Sum % 10)) % 10.
  5. 5. Valid if 11th digit matches computed DV.

Frequently Asked Questions about Validation