CNS Validator

Validate CNS (National Health Card) numbers quickly and securely.

Need to generate a CNS for testing?

About the CNS Validator

The CNS Validator checks if a National Health Card number is mathematically valid. The CNS has 15 digits and can be definitive (starts with 1, 2, 7, 8, or 9) or provisional (starts with 3, 4, 5, or 6).

Each type uses a different algorithm: the definitive uses the Luhn algorithm, while the provisional uses weighted sum. Our tool automatically identifies the type and applies the correct validation.

Como Funciona a Validação do CNS?

O CNS possui 15 dígitos e pode ser definitivo ou provisório:

  • CNS Definitivo: Começa com 1, 2, 7, 8 ou 9. A validação usa o algoritmo de Luhn (módulo 11), similar ao de cartões de crédito.
  • CNS Provisório: Começa com 3, 4, 5 ou 6. A validação usa soma ponderada com pesos específicos.

Nossa ferramenta identifica automaticamente o tipo de CNS e aplica o algoritmo correto para validação.

Frequently Asked Questions (FAQ)