Find and validate NIFs in documents
Looks for taxpayer numbers in a PDF or photo and checks the check digit (modulo 11).
Loading the tool…
Other tools
How it works
The Portuguese NIF has 9 digits and the last one is a check digit computed from the other eight. That catches typing and OCR errors without looking anything up online. The tool finds 9-digit sequences, validates the prefix and the check digit, and says whether the NIF belongs to a person, a company, a public body or other. It only lists numbers that pass or that appear next to the words “NIF” or “contribuinte”.
- Drop a file or paste text.
- Read the list of NIFs and their check.
- Copy or download the table.
Limits, stated plainly
A valid NIF does not say who it belongs to: for that you need the tax office or the justice portal. Some phone numbers pass by chance (which is why we want the word NIF nearby).
Frequently asked questions
How is the check digit computed?
Multiply the first 8 digits by 9, 8, 7, 6, 5, 4, 3 and 2, add them up and compute 11 minus the remainder of the division by 11. If that gives 10 or 11 the digit is 0.
Is NIF 999999990 valid?
It is the “final consumer” NIF used on invoices with no customer identified. It identifies nobody.