NIF generatorGerador de NIF
Valid test Portuguese tax numbers (Número de Identificação Fiscal) for Portugal, with the correct structure and check digits. Generate up to 100 at once, copy them or download a CSV, and check any NIF against the rules. Everything runs in your browser.
- 325881995
- 391135104
- 315278218
- 126216096
- 269666826
- 264894804
- 371268613
- 167085344
- 128210540
- 373176902
Checked in your browser against the published rules. Nothing is sent anywhere, and a valid result does not mean the number was ever issued.
Synthetic test values for software testing. Not issued by any authority and not linked to any person or company.
How a NIF is built
Pattern: 123456789
Nine digits, first 1–3 for individuals (5 for companies); the last is a mod-11 check digit with weights 9 to 2.
Valid and invalid example
| Value | Result |
|---|---|
| 325881995 | Valid |
| 325881996 | Invalid last character changed |
About the NIF
Portugal’s tax authority issues a nine-digit NIF. The first digit shows the type (1–3 individuals, 5 companies, 6 public bodies) and the last is a mod-11 check digit.
Typical test cases: Portuguese invoices (fatura com NIF), checkout, banking and HR systems.
More sample NIF numbers
391135104 · 315278218 · 126216096 · 269666826 · 264894804 · 371268613 · 167085344 · 128210540 · 373176902
Common questions
- Are these real NIF numbers?
- They follow the published structure and pass the check-digit rule, so validators accept them. They are generated at random and are not taken from any register. A random value can still coincide with a number issued to someone, so use them only in test systems.
- Can I use a generated NIF on a real application?
- No. Using an identity or tax number that is not yours on a real application, tax return or bank form is fraud in most countries. These values are for developers and testers working on their own systems.
Related tools
- Portugal address generator: addresses with real cities and postcodes
- Fake Portugal profile: name, address, date of birth and ID numbers together
- Test data generator: export profiles with ID columns as CSV, JSON or SQL
Other personal ID formats
SSN (US) · ITIN (US) · DNI (ES) · NIE (ES) · NINO (GB) · SIN (CA) · CPF (BR) · CURP (MX) · RFC (MX) · NIR (FR) · Codice fiscale (IT) · Steuer-ID (DE) · BSN (NL) · Rijksregisternummer (BE) · all formats
Sample profiles with a NIF
Test people for Portugal, each with a generated NIF and a drawn profile picture.
- Tiago NunesMale, 37 · born 1989-05-10São Romão, Distrito da GuardaNIF 386235503tiago_nunes@example.net
- Pilar MatosFemale, 47 · born 1979-01-01Montijo, Distrito de SetúbalNIF 354798685pmatos@example.org
- Caetana GomesFemale, 65 · born 1961-05-25Mirandela, Distrito de BragançaNIF 204042178caetana_gomes@example.net
- Soraia BorgesFemale, 19 · born 2007-06-21Arada, Distrito de AveiroNIF 202685438soraiaborges@example.org
Synthetic people with drawn pictures: not real individuals. Generate more profiles.