{"inline_business":{"portugal-nif-validator":{"validate_title":"Number to check","input_label":"NIF (9 digits)","input_hint":"With or without spaces; the VAT prefix \"PT\" is accepted.","empty":"Enter a NIF to start the check.","valid":"Valid NIF (check digit is correct)","invalid":"Invalid NIF","formatted":"Formatted:","type_label":"Prefix {{prefix}}:","reason_chars":"A NIF contains digits only: remove letters and symbols.","reason_length":"Wrong length: {{n}} digits entered, 9 expected.","reason_prefix":"Prefix not assigned: a NIF does not start with \"{{first}}\" (see the list of prefixes).","reason_dv":"Wrong check digit: {{expected}} expected, {{entered}} entered.","steps":"Weighted sum of the first 8 digits: {{sum}}; remainder modulo 11: {{rest}}; check digit: {{dv}}.","rule":"Rule: digits 1 to 8 multiplied by 9, 8, 7, 6, 5, 4, 3, 2; check digit = 11 − (sum mod 11), or 0 when the remainder is 0 or 1.","prefixes_title":"Leading digits of a NIF","col_prefix":"Starts with","col_meaning":"Taxpayer type","prefix_1":"Resident individual","prefix_2":"Resident individual","prefix_3":"Resident individual (range opened in 2019)","prefix_45":"Non-resident individual with income taxed by final withholding","prefix_5":"Legal entity registered with the RNPC (companies)","prefix_6":"Public body (central, regional or local administration)","prefix_70":"Undivided estate (herança indivisa)","prefix_71":"Non-resident legal entity, final withholding","prefix_72":"Investment fund","prefix_74":"Undivided estate (herança indivisa)","prefix_75":"Undivided estate (herança indivisa)","prefix_77":"Assigned ex officio (entity not registered with the RNPC)","prefix_78":"Assigned ex officio to a non-resident (VAT refund)","prefix_79":"Special regime (Expo 98)","prefix_8":"Former prefix for sole traders, no longer assigned","prefix_8_warning":"The check digit is right, but this prefix is no longer assigned: the number is probably old or wrong.","prefix_90":"Condominium, irregular company or estate of a sole trader","prefix_91":"Condominium, irregular company or estate of a sole trader","prefix_98":"Non-resident without a permanent establishment","prefix_99":"Civil partnership without legal personality","note":"The check only proves the number is consistent: a valid NIF is not necessarily assigned. Only the Autoridade Tributária (Portal das Finanças) confirms that a taxpayer exists; for an EU VAT number, use VIES."}},"docs_business":{"tools":{"portugal-nif-validator":{"content":{"title":"How a NIF is checked in Portugal: check digit and prefixes","intro":"In Portugal, the NIF (número de identificação fiscal) has 9 digits and the last one is a modulo 11 check digit: multiply the first 8 digits by 9, 8, 7, 6, 5, 4, 3 and 2, add them up, and the check digit is 11 minus the remainder of the sum divided by 11 (0 when that remainder is 0 or 1). The first one or two digits give the taxpayer type: 1, 2 or 3 for a resident individual, 5 for a company, 45 for a non-resident.","details":"
The tool strips spaces, dots and the \"PT\" VAT prefix, checks that 9 digits remain, then tests the prefix and the check digit. Sum = digit 1 × 9 + digit 2 × 8 + … + digit 8 × 2; remainder = sum mod 11; check digit = 0 when the remainder is 0 or 1, otherwise 11 − remainder.
1, 2 and 3: resident individuals (range 3 opened in 2019); 45: non-resident individuals under final withholding; 5: legal entities registered with the RNPC; 6: public bodies; 70, 74 and 75: undivided estates; 71: non-resident legal entities; 72: investment funds; 77 and 78: assigned ex officio; 79: Expo 98 regime; 90 and 91: condominiums and irregular companies; 98: non-residents without a permanent establishment; 99: civil partnerships without legal personality. Prefix 8 (former sole traders) is no longer assigned: the tool accepts the check digit but flags it.
A valid NIF is not necessarily assigned. Only the Autoridade Tributária confirms that a taxpayer exists, and the European Commission's VIES service checks an EU VAT number.
Sources and dates: Decreto-Lei n.º 14/2013 of 28 January 2013 (articles 2, 4 and 11, definition of the NIF and of the 45 and 5 ranges); list of prefixes from public documentation (encyclopedia citing DL 14/2013 and the Portal das Finanças manual), not confirmed on the primary source; modulo 11 rule recomputed on the examples above (checked on 15/10/2026).
"},"faqs":[{"question":"How do I check whether a Portuguese NIF is valid?","answer":"Multiply the first 8 digits by 9, 8, 7, 6, 5, 4, 3 and 2, add them up and take the remainder of the sum divided by 11. The check digit (9th digit) is 11 minus that remainder, or 0 when the remainder is 0 or 1. For 123 456 789 the sum is 156, the remainder 2 and the check digit 9."},{"question":"What does a NIF starting with 45 mean?","answer":"Prefix 45 is reserved for non-resident individuals whose only Portuguese income is taxed by final withholding. Residents get a NIF starting with 1, 2 or 3, and companies one starting with 5."},{"question":"Does a valid NIF always belong to someone?","answer":"No. The check digit only proves the number is consistent: roughly one 9-digit number in eleven passes with an allowed prefix. Only the Autoridade Tributária confirms that a taxpayer exists."},{"question":"Is the Portuguese NIF the same as the VAT number?","answer":"For a business, the EU VAT number is the NIF preceded by \"PT\". The tool accepts that form and ignores the prefix; the VIES service confirms whether the number is active for VAT."}]}}}}