NIF (Número de Identificación Fiscal)

Editorial transparency and use of artificial intelligence

This article forms part of the CostaLuz Lawyers blog and is published for general informational and educational purposes only. It was prepared with the assistance of artificial intelligence tools and, before publication, was substantively reviewed and editorially approved by Maria de Castro, a Spanish-qualified lawyer registered with the Cádiz Bar Association under number 2745, founder of CostaLuz Lawyers and the person responsible for the editorial review of the published content.

This article does not constitute legal, tax, immigration, employment, estate-planning or investment advice and does not replace an individual assessment and the professional work of the appropriate CostaLuz Lawyers specialist. No action or omission should be based solely on this information.

NIF (Número de Identificación Fiscal)

NIF (Número de Identificación Fiscal) — The NIF (Número de Identificación Fiscal) is Spain’s universal tax identification number, assigned to every individual and legal entity that has tax obligations in Spain. For Spanish nationals, the NIF is their DNI number. For foreign individuals, the NIF is their NIE number. For companies, the NIF (formerly called CIF) is a unique alphanumeric code.

The NIF is essentially the Spanish tax system’s way of tracking every taxpayer. If you are a foreigner, your NIF is the same as your NIE — the terms are sometimes used interchangeably in informal conversation, though technically the NIF refers to the tax function and the NIE to the identification function. Companies receive a separate NIF that begins with a letter indicating the company type (B for SL, A for SA, etc.).

NIF for Companies

When you incorporate a company in Spain, the Agencia Tributaria issues a provisional NIF on the day of application, which becomes definitive once the company is registered at the Registro Mercantil. The company NIF format is: a letter (identifying the entity type) + 8 digits. For example, B-12345678 indicates a Sociedad Limitada. This number is used on all invoices, tax returns, contracts, and official documentation.

Key Facts About the NIF

  • For Spanish nationals: NIF = DNI number
  • For foreign individuals: NIF = NIE number
  • For companies: NIF = former CIF (the terms are now officially unified)
  • Required for: filing taxes, issuing invoices, opening business bank accounts, signing contracts
  • Non-resident foreigners without an NIE can obtain a NIF specifically for tax purposes
  • Companies receive a provisional NIF at incorporation and a definitive one after registry
  • The first letter of a company NIF indicates its type: A (SA), B (SL), E (joint ownership), etc.

Related Legal Terms


Need Help with NIF?

Our bilingual legal team assists expats across Spain with every aspect of nif. We handle the paperwork, liaise with Spanish authorities on your behalf, and make sure nothing falls through the cracks.

This entry is part of our Legal Encyclopedia for Expats in Spain. Browse the full A-Z guide for more terms.

Disclaimer: This information is provided for general guidance purposes only and does not constitute personalised tax or legal advice. Each case must be assessed individually according to the client’s specific circumstances. It is essential to consult a qualified specialist before taking any action or making any decision.

Legal Notice: The content on this page is provided for general informational and educational purposes only. It does not constitute legal advice and should not be relied upon as such. No action should be taken based solely on this content without first seeking independent professional legal counsel. Each case requires individual assessment based on its specific circumstances. CostaLuz Lawyers accepts no liability for actions taken or not taken based on this content.