Check a Portuguese or Spanish NIF
Runs in your browser: nothing you type is sent or saved.
An individual's NIF is personal data. This page keeps nothing and sends nothing, and it has no ads, but do not check other people's numbers without a reason.
Portugal
Nine digits, the last being a check digit. For individuals, Decree-Law 14/2013, article 4, says the first digit runs from 1 to 4, and that the initial digits 45 are for non-residents with only income taxed by final withholding.
Spain
Nine characters. Individuals: 8 digits and a letter; foreigners (NIE): X, Y or Z, 7 digits and a letter. The Ministry of the Interior gives the rule: divide the number by 23 and look up the letter, as in its example 12345678Z. For a NIE, X counts as 0, Y as 1, Z as 2. Companies: a letter for the legal form, 7 digits and a check character, under Order EHA/451/2008.
From the team behind this site: Portuguese invoices for online stores, with InvoiceXpress. See Caravel Invoice PT