NIE vs NIF in Spain: what's the difference?
The difference between NIE and NIF in Spain is one of the most frequent sources of confusion for newcomers. Both acronyms designate administrative identifiers, they are used in similar steps (banks, taxes, contracts), and for foreign individuals they are even identical. But for Spaniards, for companies, and in some professional situations, the two numbers are fundamentally distinct.
This article explains exactly what separates the NIE from the NIF, who must hold which, how they fit together in everyday procedures (property purchase, company set-up, tax filing), and why the distinction becomes important as soon as you go beyond simple foreign individual status. We also cover legacy identifiers like the CIF that still appear on older documents.
What is the NIE and what is the NIF?
Before comparing, you have to understand what each acronym precisely refers to.
The NIE: an identifier for foreigners
The NIE (Número de Identidad de Extranjero) is allocated by the Dirección General de la Policía to any foreign individual interacting with the Spanish administration. Format: X1234567A, Y1234567A or Z1234567A depending on date of allocation. It identifies the individual for administrative, fiscal, banking and notarial steps. For the full picture, see the NIE in Spain and how long it takes to apply for an NIE.
The NIF: a fiscal identifier for everyone
The NIF (Número de Identificación Fiscal) is the general fiscal identifier in Spain. It exists for individuals (Spaniards and foreigners) and for legal entities (companies, associations, foundations). For Spaniards, the NIF is their DNI (national ID card) plus a check letter. For foreigners, the NIF is the NIE. For companies, it is a specific number starting with a letter according to legal type (A for SA, B for SL, etc.).
The simple rule to remember
For a foreign individual residing or having ties to Spain, NIE = NIF. The same number serves as administrative identifier (NIE) and fiscal identifier (NIF). You do not have two numbers: you have one that plays both roles depending on the context. For a company, NIE and NIF are different concepts: a company has a NIF, never an NIE.
When do you use NIE versus NIF?
Even though it is the same number for foreign individuals, the usage context differs and the term used is not neutral.
NIE for administrative and migration steps
You use the term NIE and present your NIE document (green A4 or TIE) in administrative and migration contexts: padrón municipal registration, TIE request, exchanges with the Policía Nacional, school file for foreign children, NUSS request with social security. In all those cases, your foreign status is at stake, and the NIE is the relevant identifier.
NIF for fiscal and banking steps
You use the term NIF (which is the same number as your NIE) in fiscal and financial steps: tax filing (modelo 100, 210, 720), invoicing as autónomo, bank account opening, signing commercial contracts, property sale. On invoices, contracts and returns, the field is called "NIF" even if you have an NIE.
In practice, it is interchangeable for a foreign individual
In daily life, no one will correct you if you say "here is my NIE" when asked for your NIF, or vice versa. Both terms are understood as referring to your 9-character number. The distinction matters mostly for companies and to grasp the consistency of the Spanish tax system.
What is the difference for companies?
For companies and other legal entities, NIE and NIF are radically different concepts. The NIE does not exist for companies; only the NIF applies.
The company NIF: a unique identifier
Every Spanish company has a specific NIF starting with a letter indicating its legal type: A for Sociedad Anónima, B for Sociedad Limitada, C for limited partnership, G for association, J for civil partnership, N for foreign entity without establishment in Spain, W for foreign permanent establishment. For the procedure to obtain it, see apply for NIF in Spain for foreign companies.
No NIE for companies
A company never has an NIE since the NIE is by definition an identifier for a foreign individual. If you are looking for the fiscal identifier of a Spanish company, it is solely its NIF (or formerly CIF, see below). On Kompass, on company directories, on notarial deeds, it is always the NIF that appears for companies.
Important distinction for directors
The foreign director of a Spanish SL has two distinct identifiers: their personal NIE (which also serves as their personal NIF) as a natural person, and the NIF of the SL they manage. The two do not merge: on official documents, you state one or the other depending on whether the signature is made in a personal capacity or as company representative. For how this fits into setting up an SL, see the step-by-step guide to setting up an SL.
And what is the CIF?
The CIF (Código de Identificación Fiscal) was the former fiscal identifier for companies in Spain, in force until 2008. The reform of that year unified the system by imposing the term NIF for everyone, including companies. Many Spanish companies nevertheless continue to talk about "CIF" out of habit, and some old documents still bear that term.
CIF and company NIF are the same thing
If asked for the "CIF" of an SL, that is in reality its current NIF. The number itself did not change in 2008, only the identifier name was harmonised. So if an old invoice indicates "CIF: B12345678", it is strictly the same as the "NIF: B12345678" on a recent invoice.
Why the legacy term persists
Many Spaniards and businesses keep using "CIF" to clearly distinguish the identifier of a company (CIF) from that of an individual (NIF/DNI). Although no longer officially correct, it is understood by everyone in professional circles.
What other identifiers should you know?
The Spanish identifier landscape for foreigners contains several distinct concepts you should not confuse.
The DNI
The DNI (Documento Nacional de Identidad) is the Spanish ID card, reserved for Spanish citizens. The number on the DNI also serves as NIF for the holder (8 digits + 1 check letter). No foreigner can obtain a DNI without Spanish nationality.
The TIE
The TIE (Tarjeta de Identidad de Extranjero) is the plastic card issued to non-EU citizens with a residence permit. It contains the person's NIE, photo, nationality, and type of stay (student, work, family reunification, etc.). For EU/EEA citizens, the equivalent is the green A4 Certificado de Registro de Ciudadano de la Unión.
The NUSS
The NUSS (Número de Usuario de la Seguridad Social) is the social security identifier, completely distinct from the NIE/NIF. You receive it when you contribute to Spanish social security as an employee, autónomo or SL director. For details, see everything about the NUSS number.
The número de soporte
The número de soporte is a security code printed on your NIE document (starting with E on the TIE or with IXESP on the green A4). It validates the authenticity of the NIE during certain online steps, notably the digital certificate request. Many applicants confuse it with the NIE itself: see where to find the número de soporte to identify both numbers correctly.
Which steps require NIE or NIF?
A few concrete examples to anchor practice.
Steps requiring the NIE (term used)
Padrón municipal registration, residence permit request, TIE request, NUSS request, foreign student register at a Spanish university, monthly resident transport card.
Steps requiring the NIF (term used)
Tax filing (IRPF, IRNR, IS), bank account opening, invoicing as autónomo, signing a commercial lease, setting up an SL or another company, buying or selling property at the notary, intra-EU VAT request, ROI registration.
Steps requiring both (depending on context)
A property purchase at the notary uses NIE and NIF in the same deed: NIE to identify foreign parties, NIF for their associated tax filings (IBI, modelo 600 for ITP/AJD, modelo 211 for the 3% withholding on sale). Likewise, setting up an SL requires the NIE of foreign partners and will then create a separate company NIF.
What mistakes should you avoid with NIE and NIF?
A few classic confusions can complicate procedures.
Listing your personal NIE as company NIF
Frequent mistake among foreign SL founders: listing their personal NIE on invoices issued by the company or on the SL's tax filings. The SL has its own NIF (starting with B), distinct from the director's personal NIE. On SL invoices, that company NIF is what must appear.
Believing NIE and NIF are two distinct numbers for yourself
For a foreign individual, NIE and NIF are the same number. There are no two procedures: obtaining an NIE is enough. Many newcomers ask how to "convert" their NIE into a NIF, when it is unnecessary. To understand the unique identifier, see the NIE in Spain and what is a NIF number and why you need it.
Confusing NIE and número de soporte
On the TIE or green A4, two numbers often appear: the NIE (X1234567A) and the número de soporte (E12345678). When requesting a digital certificate, many enter their NIE when the FNMT wants the soporte. Always check which field is requested before entering. The detail sits in the digital certificate and Cl@ve in Spain.
Using an obsolete CIF
Old documents still indicate "CIF" for companies. That is in reality the current NIF. If an administration asks for the CIF of a company, give its NIF: the number is the same.
Believing the NIE gives an automatic tax status
Holding an NIE/NIF does not make you a tax resident in Spain. Tax status depends on physical criteria (183 days, economic interests) detailed in how to become a tax resident and the impact of your NIE on your tax status.
Worked example: Sarah, French freelancer setting up an SL
Sarah, a French freelancer, moves to Madrid and decides to incorporate an SL for her consulting activity. She first obtains her NIE (Y1234567L), which immediately also serves as her personal NIF. When she incorporates the SL, the company is allocated a separate NIF (B98765432). On her personal IRPF return (modelo 100) she enters Y1234567L. On the SL's invoices, on its modelo 303 (IVA) and modelo 200 (IS), the identifier is B98765432. On the public deed of incorporation, both appear: her NIE as a partner and the SL's NIF as the new entity. Mixing them up on an invoice would invalidate the document for VAT purposes.
Key takeaways on NIE vs NIF
The difference between NIE and NIF in Spain boils down to one sentence: for a foreign individual, it is the same number, used under two names depending on context (administrative or fiscal); for a company, only the NIF exists and there is no NIE. The CIF is the legacy term for the company NIF, equivalent in the number itself.
For most everyday steps (buying, selling, renting, opening an account, paying taxes), you use the 9-character number called either NIE or NIF interchangeably. The distinction gains importance as soon as you structure an economic activity in a company: then the SL will have its own NIF, distinct from your personal NIE.
Preparing a project that involves both a personal NIE and a company NIF (SL set-up, branch opening, property purchase by a company)? At gestoraz, we coordinate both requests so they chain together without administrative blockage.
Official sources
- Agencia Tributaria, NIF and fiscal identifiers, sede.agenciatributaria.gob.es: rules of allocation and use of the NIF.
- Ministerio del Interior, Extranjería portal, extranjeros.inclusion.gob.es: NIE allocation rules.
- Real Decreto 1065/2007 (BOE), boe.es/buscar/act.php?id=BOE-A-2007-15984: reform that unified CIF and NIF in 2008.
- Real Decreto 557/2011 (BOE), boe.es/buscar/act.php?id=BOE-A-2011-7703: NIE implementing regulation.
- Policía Nacional, sede.policia.gob.es: sede for the NIE request and verification.
Obtain your Digital Certificate entirely remotely.
Request your Digital Certificate completely remotely.