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 OCTOBER 2026·5 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
Who it belongs to
Individual: no public lookup · Company: VIES, Portal das Finanças
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.

Looking up who a NIF belongs to: what is possible

For an individual there is no public lookup: the AT does not reveal who a NIF belongs to, because it is bound by tax secrecy (art. 64 of the Lei Geral Tributária). For a company or a sole trader with an open activity there are three official routes: the Portal das Finanças service “Identificação de Clientes/Fornecedores” (login required), the European Commission’s VIES and the publications search of the Portal da Justiça.

NIF of an individual (starts with 1, 2 or 3)

AT staff must keep taxpayer data confidential (LGT, art. 64, no. 1). The only “confirm a NIF” the law provides for is to the registries, for commercial, land and vehicle registration (no. 2, point e), not to the public. So there is no page on the Portal das Finanças, or on any other official site, where you type a NIF and see the holder’s name. The AT’s own “Identificação de Clientes/Fornecedores” service sits behind a Portal login and exists for business relations.

What this validator tells you: whether the number is well written (check digit) and which holder type the first digit points to. What it cannot tell you: who it belongs to, whether it exists or whether it is active. A NIF that passes the formula may never have been issued: 123 456 789 passes it, and in VIES it comes up as invalid; the test NIFs from our generator pass it too.

If someone asks you to “confirm” an individual’s NIF, ask that person for a document showing it, rather than guessing from the number. If the question is an invoice issued with your own NIF, check it in e-Fatura: once logged in you see the invoices and documents reported under your taxpayer number. If the invoice comes from a supplier, check the issuer’s NIF through the company routes below.

NIF of a company or of a sole trader with activity

WhereWhat it showsLimit
Portal das Finanças
Serviços → Identificação de Clientes/Fornecedores → Consultar
Confirmation of a client’s or supplier’s identification from the NIF.Login with your own Portal das Finanças credentials; the AT publishes nothing without one.
VIES
ec.europa.eu/taxation_customs/vies
Whether the VAT number is valid; for Portugal it returns the company’s name and address. Type PT followed by the 9 digits: PT503504564 returns EDP Comercial, Lisboa.Covers VAT registrations only: “invalid” means invalid for intra-EU transactions, not that the company does not exist. No search by name.
Portal da Justiça
publicacoes.mj.pt
Company acts published since July 2010 (incorporation, changes, accounts), searchable by NIF/NIPC or entity name.Earlier acts are in the Diário da República; only entities with published acts appear.

Company-information websites that show up in searches compile these same public records, partly for a fee; they are not an official source and do not replace the three routes above.

Confirming a NIF someone gave me: checklist

  1. Run the number through the validator above. If the check digit fails, it is a typo; there is no point going further.
  2. Compare the first digit with who claims to be the holder: 1, 2 or 3 is an individual, 5 a company, 6 public administration. A “company” whose NIF starts with 1 or a person whose NIF starts with 5 does not add up.
  3. Company: confirm it in VIES (PT plus the 9 digits) and, if you need the legal name and registered office, in the Portal da Justiça publications. Logged in to the Portal das Finanças, use “Identificação de Clientes/Fornecedores”.
  4. Individual: ask for a document showing the NIF. There is no way to confirm it remotely, and a sole trader without activity is not in VIES either. If the person has no NIF yet, the guide How to get your NIF explains how it is issued.
  5. Invoice: if it was issued with your NIF, it should appear in e-Fatura once the issuer has reported it to the AT; if it never appears, the issuer did not report it.

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). What can be looked up (nothing for individuals; Portal das Finanças, VIES and Portal da Justiça for companies) is in the section “Looking up who a NIF belongs to” above.
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.