NIE vs NIF: What's the Difference and Which Do You Need?
Almost every American or Briton relocating to Spain hears both terms in the same conversation and assumes they're interchangeable. They're related, but not identical — and mixing them up can cost you a trip to the notary or a rejected bank application.
The short answer
The NIE (Número de Identidad de Extranjero) is your foreigner identification number, issued by the Spanish National Police. The NIF (Número de Identificación Fiscal) is your tax identification number, issued by the Agencia Tributaria. For almost every foreign resident, these end up being the same nine-character code — your NIE simply starts functioning as your NIF the moment you're registered in the tax system. So in practice, most people never apply for a "different" NIF number; they apply for an NIE, and that number does double duty once it's linked to a tax file.
Where people get confused is assuming the two documents are interchangeable in every context. They're not: a bank, notary, or the tax office may ask for one specifically, and knowing which is which saves a wasted appointment.
NIE and NIF side by side
| NIE | NIF | |
|---|---|---|
| Full name | Número de Identidad de Extranjero | Número de Identificación Fiscal |
| Issued by | Spanish National Police (Cuerpo Nacional de Policía) | Agencia Tributaria (AEAT), Spain's tax agency |
| What it is | Foreigner ID number for administrative and legal purposes | Tax ID number used for any transaction with fiscal implications |
| Who needs it | Any non-Spanish national with economic, professional, or social interests in Spain | Anyone — resident or non-resident, individual or company — who needs to file taxes or appear in a Spanish tax transaction |
| Format | Letter + 7 digits + letter (e.g. X1234567L) | For foreigners, identical to the NIE once activated in the tax system |
| Typical first use | Property purchase, opening a bank account, signing a lease | Filing a tax return, invoicing as autónomo, registering a company |
Why the confusion happens
For a Spanish national, the DNI (national ID card) number and the NIF are the same number — no separate application is needed. Foreigners don't have a DNI, so the system uses the NIE as the base identifier and then "activates" it as a NIF when you first interact with the tax authorities, for example by filing a Modelo 030 census declaration, registering as autónomo, or buying property. Until that activation happens, your NIE exists but isn't yet functioning as a tax ID in AEAT's system — which is why some gestores and banks will occasionally still refer to "getting your NIF" as a distinct next step even though no new number is created.
Companies are the other source of confusion: a Spanish company has its own NIF (starting with a letter that identifies the company type), which is entirely separate from the personal NIE/NIF of its foreign directors or shareholders.
When you'll be asked for each
Situations where "NIE" is the term used
- Applying for a Digital Nomad Visa or other residence permit
- Buying a car or property before you're tax-registered
- Signing a rental lease or requesting utility connections
- Initial appointments at the Comisaría or consulate
Situations where "NIF" is the term used
- Filing an annual Spanish income tax return (Declaración de la Renta)
- Registering as autónomo and issuing invoices
- VAT/IVA registration for a business activity
- Any AEAT-facing form, including Modelo 030 or Modelo 720
In both cases, you'll typically write the same code — the number simply changes "hats" depending on which authority is asking.
How the process actually works, step by step
- Apply for the NIE — either at a Spanish consulate before you move (see our guide on the consular NIE route) or in person once you're in Spain.
- Receive your NIE certificate — a white A4 sheet from the police confirming your number. This is not a card and has no photo.
- Activate the number for tax purposes — typically via a Modelo 030 filing with the AEAT, often triggered automatically the first time you're involved in a taxable transaction, such as registering as autónomo through our Autónomo Registration service.
- Use the same number going forward — from that point on, your NIE and NIF references point to the same code.
What we help with
We help determine which stage of this process you're at, prepare and submit your NIE Number application, and coordinate the tax-side activation covered on our NIF Number page. For clients setting up as self-employed, this usually happens alongside Autónomo Registration, and for company formations we handle the separate corporate NIF process described under Company Registration.
FAQ
USAs a US citizen, do I need to apply for the NIE and NIF separately?
No — you apply once for the NIE. Once you're involved in a transaction that has tax implications (buying property, registering as autónomo, opening certain accounts), that same number is activated in the AEAT system and starts functioning as your NIF. You generally don't file a second, separate "NIF application" the way you might expect coming from a US system with distinct SSN and ITIN processes.
UKSince Brexit, do British citizens get a different NIE/NIF process than EU citizens?
Yes. UK citizens are now treated as non-EU nationals for NIE purposes, following the same "extranjero" application track as Americans, rather than the lighter-touch EU citizen registration certificate process used before 2021. The NIE-to-NIF relationship itself, however, works identically regardless of nationality.
Can I open a Spanish bank account with only an NIE, before it's activated as a NIF?
In most cases, yes — banks generally accept the NIE certificate as sufficient identification to open a non-resident or resident account. Some banks may ask questions that effectively require the tax activation step to have occurred, particularly if you're depositing income or setting up a business account, so it's worth checking with the specific bank in advance.
Does the NIE or NIF expire?
Neither expires or changes once assigned — it's a permanent number tied to you. What can expire is a related physical document, such as your TIE residence card, but the underlying NIE/NIF code itself stays the same for life.
Not sure which number you need right now?
Tell us where you are in the process and we'll confirm the exact next step — NIE application, tax activation, or both.
See document & registration support →