Portugal · Validation
Portugal NIF validator.
Verify a Portuguese NIF's real modulo 11 check digit. The same 9 digits are the PT VAT number. Everything runs in your browser: nothing you type is transmitted anywhere.
Inputs
Result
Enter a NIF and press Validate.
How the Portuguese NIF check digit works
A NIF (Número de identificação fiscal; for companies, NIPC) is 9 digits. The 9th is a modulo 11 check digit computed from the first 8. With a PT prefix, the same number is the Portuguese VAT number.
- Multiply the first 8 digits by descending weights 9, 8, 7 … 2.
- Sum the products and take the result mod 11.
- If the remainder is 0 or 1, the check digit is 0. Otherwise it is 11 minus the remainder.
- A NIF cannot start with 0.
Worked example: 50196484 gives 45 + 0 + 7 + 54 + 30 + 16 + 24 + 8 = 184; 184 mod 11 = 8; 11 − 8 = 3, so 501 964 843 is consistent.
Sources
The algorithm and the 501964843 example come from the open-source python-stdnum pt/nif.py module, and match the modulo 11 description on the Portuguese Wikipedia NIF article. The Portal das Finanças was not consulted, so treat this as a consistency check, not an official confirmation.
What a passing checksum does and doesn’t tell you
A valid check digit only proves the 9 digits are internally consistent — it does not confirm the NIF was ever issued, is active, or is registered for VAT. This tool does no lookup; for VAT registration use the EU VIES service. Runs entirely in your browser: nothing you type is transmitted, stored, or logged.