TOOLS/ID & MONEY

NIF Validator

NIF / Número de Contribuinte Validator

Paste a NIF (the Portuguese tax number) and confirm in seconds whether the check digit is correct. Everything runs in your browser. Nothing is sent anywhere.

·UPDATED JULY 2026·3 MIN·OFFICIAL SOURCES
KEY FACTS
Length
9 digits
Check digit
The 9th, computed with mod 11
First digit
1–3 individual, 5 company, 6 public sector
What it checks
Maths only, no AT lookup
Where it runs
In your browser, nothing is sent
EXPERIMENTE:
À espera de um número…
Formatado-
Dígito de controlo-
Tipo de titular-

How this works

A Portuguese NIF has nine digits and ends in a check digit. That digit comes from the first eight: multiply each by a weight from 9 down to 2, add them up, take the remainder of dividing by 11, then compute 11 minus that remainder (if it gives 10 or 11, the digit is 0). If it does not match the last digit, the number is wrong.

  1. 1
    Paste the number
    Type or paste the NIF. Only the 9 digits count. I group them in threes as you type.
  2. 2
    I identify the holder type
    The first digit (or first two) says who it is: 1, 2 and 3 are individuals; 45 non-residents; 5 companies; 6 public administration; 70–79 and 90–99 cover estates, funds and other cases.
  3. 3
    I verify the check digit
    I multiply the first eight digits by weights 9 down to 2, add them up and compute 11 minus the remainder of dividing by 11 (10 or 11 count as 0). Then I compare the result with the 9th digit.
  4. 4
    Read the result
    Green means the structure is right; red means there is a typo (I show the expected digit to help you find it). Passing the formula does not guarantee the NIF exists or is active.

Frequently asked

What is the NIF check digit?
A NIF has 9 digits. The first 8 identify the taxpayer and the 9th is a check digit derived from the others (a modulo-11 formula). If the last digit does not match, the number is mistyped.
Does this tell me who a NIF belongs to?
No. The check is purely mathematical and runs in your browser: we query no database and never contact the AT (Autoridade Tributária, the tax authority). It only confirms the number is well-formed and shows the type (individual, company, etc.) from the first digit.
What does the first digit mean?
It marks the holder type: 1, 2 and 3 are individuals; 5 is a company; 6 is public administration; 45 is a non-resident; 70–79 and 90–99 cover estates, funds and other cases.
Is a formula-valid NIF a real one?
Not necessarily. Passing the formula only means it is well-built. It may exist, belong to someone else, or never have been issued. To confirm a real NIF use the AT’s official channels.
How do I get a NIF if I do not have one?
You can get it free at any Finanças office or Loja do Cidadão, or remotely via a representante fiscal (fiscal representative). See the "How to get your NIF" guide here on howto.pt.
OFFICIAL SOURCES
DISCLAIMER
This tool only checks the number’s mathematics and identifies the type from the first digit. It does not confirm whether a NIF exists, is active or who it belongs to, and is no substitute for an official check with the AT. Not tax advice.