Home NIF / NIPC Portugal
Portugal NIF / NIPC validator
How the NIF / NIPC format works
- Format
- 9 digits
- Example
- 123456789
Things to watch for
- 9 digits total; the last one is a check digit computed from a weighted sum (9 down to 2) over the first eight, with a computed value of 10 or 11 mapped back to 0
- The first digit signals the taxpayer type (1–3 for individuals, 5 for companies, and more) but this tool only checks format and arithmetic, never registration status
- Checksum only — a NIF passing this test does not confirm it is currently active or assigned by the Autoridade Tributária
^[0-9]{9}$A NIF (Número de Identificação Fiscal) is Portugal’s 9-digit tax identification number — and unlike most personal ID numbers, the same format covers both people and businesses. Individuals are issued one from birth or on becoming a resident; companies receive the equivalent, commonly called a NIPC (Número de Identificação de Pessoa Coletiva), from the same numbering system. It’s required to open a bank account, sign a lease, receive a payslip, or issue an invoice anywhere in Portugal.
The number itself is a plain 9 digits, but it isn’t arbitrary. The final digit is a check digit computed from a weighted sum of the other eight — each multiplied by a weight running from 9 down to 2 — and the leading digit signals what kind of holder the number was issued to: typically 1 or 2 for an individual, 5 for a company, with other leading digits reserved for further registrant categories. That structure means a single mistyped digit is likely to break the checksum outright.
How this validator works
This tool confirms the input is 9 digits, then recomputes the mod-11 check digit from the first eight — treating a computed value of 10 or 11 as the digit 0, exactly as the underlying formula does. It runs entirely in your browser; nothing you type is sent anywhere.
What a pass doesn’t tell you
A passing checksum means the 9 digits are internally consistent — not that this specific NIF or NIPC was ever issued, or that it’s currently active. It also doesn’t confirm the leading digit matches a real registrant category; this tool checks arithmetic, not a lookup table. Only the Autoridade Tributária can confirm a number is genuinely on file.
Scope: this page covers NIF/NIPC format and mod-11 checksum validation only — not tax registration or activity status, for individuals or companies alike.
Content last reviewed 2026-07-23.
NIF / NIPC FAQ
What's the difference between a NIF and a NIPC?
Not much, structurally — NIF is the general term for Portugal's 9-digit tax number, and NIPC is simply what people call it when the number is assigned to a company (a pessoa coletiva) rather than an individual. Both use the identical 9-digit format and the same mod-11 check digit.
How does the first digit indicate who a number belongs to?
The leading digit is a category code: 1 or 2 typically marks an individual, 5 marks a company or other legal entity, and other leading digits cover public bodies and additional registrant types. This tool doesn't check that code against a lookup table — it only confirms the 9-digit format and the checksum arithmetic.
Does a valid NIF/NIPC mean it's actively registered with the Autoridade Tributária?
No. A pass here confirms the 9 digits are arithmetically consistent — it doesn't confirm that specific number was ever issued, is currently active, or belongs to the person or company presenting it. Only the Autoridade Tributária can confirm that.