---
id: "pt_nif"
kind: "datatype"
status: "draft"
is_pii: true
categories: ["finances", "pii"]
country: ["PT"]
langs: ["pt"]
quality: 100
url: "http://registry.apicrafter.io/datatype/pt_nif"
---

# Portuguese tax identification number (NIF) (`pt_nif`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Número de identificação fiscal, the 9-digit tax number of individuals and legal persons in Portugal (for legal persons also called NIPC). The first digit is not 0 and the last is a check digit. With the PT prefix it is the VAT number.

- Parent datatype: `vatin`
- Personal data (PII): yes
- Categories: Finances and banking (finances), Personally identifiable information (pii)
- Countries: Portugal (PT)
- Languages: Portuguese (pt)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:PT[ -]?)?[1-9]\d{2} ?\d{3} ?\d{3}$
```

## Examples

- `301211760` — Synthetic number with a valid check digit
- `290048842` — Synthetic number with a valid check digit
- `3012117607` (invalid example) — One character too many

## Mappings

- orgid: `PT-NIPPC`
- purview: `Portugal tax identification number`, `EU Tax Identification Number (TIN)`, `EU Tax identification number`
- schema_org: `taxID`, `vatID`
- stdnum: `pt.nif`

## Supported by tools

- `awsglue`
- `azureailanguage`
- `dataprep`
- `microsoftpurview`
- `pythonstdnum`
- `snowflake`

## Translations

- pt: Número de identificação fiscal (NIF)

## Sources

- wikipedia: <https://pt.wikipedia.org/wiki/N%C3%BAmero_de_identifica%C3%A7%C3%A3o_fiscal>
- other: <https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.pt.nif.html>
- other: <https://docs.dataprep.ai/user_guide/clean/clean_pt_nif.html>

## Quality

Score 100/100.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/pt_nif.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/PT/finances/pt_nif.yaml>
