Portugal Utente SNS Validator
Online Portugal Utente SNS validator. Verify format and check digits. QA.
How is the Utente SNS validated?
The National Health User Number is a unique 9-digit code assigned to citizens registered in the National Health Service (SNS) of Portugal.
This tool generates and validates health card numbers, calculating check digits using the standard weighted Modulo 11 formula over the first 8 digits.
Anatomy & Structure of Portuguese SNS Health ID
The National Health Service (SNS) User ID comprises 9 digits regulated by ACSS/SPMS:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 8 | RNU Healthcare ID | 8 digits | Sequential user number assigned in the National Health Registry | 12345678 |
| 9 | Control Digit | 1 digit | Weighted checksum digit calculated using Modulo 11 with weights 9 to 2 | 5 |
SNS Health ID Validation Algorithm (Weighted Modulo 11)
The National Health Service calculates the check digit with weights 9 down to 2:
DV = (11 - (sum(d_i * [9, 8, 7, 6, 5, 4, 3, 2]) % 11)) % 11
- 1. Multiply each of the first 8 digits by weights [9, 8, 7, 6, 5, 4, 3, 2].
- 2. Compute sum of products.
- 3. Calculate remainder modulo 11: Remainder = Sum % 11.
- 4. Compute check digit: DV = (11 - Remainder) % 11.
- 5. If the resulting value is 10, the base ID is discarded; otherwise compare with the 9th digit.