Generate random valid-format Numéro de Sécurité Sociale numbers for testing
Paste a Numéro de Sécurité Sociale below to check whether it has a valid format and correct checksum.
The Numéro de Sécurité Sociale (NSS), also called the numéro INSEE or numéro de sécu, is a 15-character identifier assigned to every person born in France or registered with the French social security system. Created in 1941 and administered by INSEE (Institut national de la statistique et des études économiques), it is embedded in the Carte Vitale health insurance card, tax returns, and pension records — making it France's primary citizen identifier across both public and private sector services.
The NSS encodes six pieces of information: sex (1 for male, 2 for female), year of birth (2 digits, 00–99), month of birth (01–12), department of birth (01–95 for metropolitan France, 97–99 for overseas territories), commune code within the department (001–999), and a birth order number within the commune and month (001–999). The final two digits are a control key, giving a total of 15 digits displayed in the format X XX XX XX XXX XXX XX for readability.
Unlike most European national IDs that use modulo-11, the French NSS uses modulo-97: the control key equals 97 minus (the first 13 digits treated as an integer, modulo 97). This is the same algorithm used in IBAN bank account numbers. The result is always between 01 and 97 and is zero-padded to two digits. Because computing modulo-97 on a 13-digit integer can cause floating-point precision issues in JavaScript and other languages, safe implementations must process the modulo digit by digit.
Healthcare applications, insurance platforms, France Connect government portals, and payroll systems all process INSEE numbers. The combination of demographic encoding (sex, birth year, department) with a strong control key makes validation both meaningful and cryptographically sound. Developers building Carte Vitale integrations or French HR software need structurally valid INSEE numbers to test field formatting, age derivation from the birth-year segment, and API schema compliance.
France Connect is the French government's federated identity platform, used by over 40 million citizens to authenticate with public services. The NSS is one of the core identifiers used in the France Connect identity federation. Developers building integrations with CPAM (health insurance), CAF (family allowances), or the Impôts.gouv.fr tax platform need valid fake INSEE numbers to test OAuth flows, identity assertion payloads, and service access in pre-production environments without exposing real citizen data protected under RGPD (France's GDPR implementation).