Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1 to 8RNU Healthcare ID8 digitsSequential user number assigned in the National Health Registry12345678
9Control Digit1 digitWeighted checksum digit calculated using Modulo 11 with weights 9 to 25

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. 1. Multiply each of the first 8 digits by weights [9, 8, 7, 6, 5, 4, 3, 2].
  2. 2. Compute sum of products.
  3. 3. Calculate remainder modulo 11: Remainder = Sum % 11.
  4. 4. Compute check digit: DV = (11 - Remainder) % 11.
  5. 5. If the resulting value is 10, the base ID is discarded; otherwise compare with the 9th digit.

Frequently Asked Questions about Validation