NIF generator (Portugal)
A Portuguese NIF is a nine-digit tax number with a MOD-11 check digit. These test values are synthetic but carry a valid check digit.
Synthetic · not collision-guaranteed Validate a number →
605 992 673
Synthetic NIF with a valid check digit. Not a real issued number.
Format specification
| Identifier | Número de Identificação Fiscal (NIF) |
|---|---|
| Country | 🇵🇹 Portugal |
| Format | 000 000 000 |
| Length | 9 characters |
| Checksum | MOD 11 |
| Example | 629 136 335 |
| Safe strategy | Synthetic |
| Data quality | Verified against sources |
Número de Identificação Fiscal: what each part means
| 0 | Holder type: 1–3 individuals, 5 public entities, 6 government bodies, 8 sole traders, 9 other legal persons and special ranges. |
|---|---|
| 0000000 | Sequential registration number. |
| 0 | MOD-11 check digit (weights 9 down to 2 over the first eight digits). |
Validation regex
Matches the canonical value — strip separators and uppercase first: value.replace(/[^A-Za-z0-9]/g, '').toUpperCase()
^\d{9}$ References
Common questions
Will these pass my validation?
Yes — they are well-formed Número de Identificação Fiscal values (000 000 000) and pass standard format checks, including the MOD 11 checksum.
Could one belong to a real person?
These are synthetic values. They are format-valid but not drawn from a guaranteed reserved range, so use them only for testing.
Can I generate many at once?
Increase the count, or use the free API and CSV/JSON export for large datasets.
For software testing only. These numbers are synthetic and must never be used
for real-world identification, applications, or to impersonate anyone.