# NIE vs NIF: What's the Difference and Which Do You Need?

*Written by [Marcos Aguilar Peña](https://spain-relocation.com/about/team-licenses/#marcos-aguilar-pena), reviewed by [Elena Ruiz Ferrer](https://spain-relocation.com/about/team-licenses/#elena-ruiz-ferrer)*  
*Published 2026-07-02 · Updated 2026-07-03*

Canonical: https://spain-relocation.com/guides/nie-vs-nif/

> 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. Nothing about this distinction changed in the 2026 regulatory cycle — everything below reflects the position as of 2026.

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.

What an NIE (and your NIF) actually looks like

**X 1234567 L**

Nine characters: a leading letter (**X**, **Y**, or **Z**, assigned by the era it was issued), then **seven digits**, then a final **check letter** calculated from those digits. For an individual foreigner, your NIF is this exact same code — the NIE and the NIF are one number, used for two purposes. (The example above is an illustration of the format, not a real number.)

## 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 |

**Expert note — Marcos Aguilar Peña · Gestor Administrativo:** Most of the confusion traces back to one fact: for individuals, your NIE literally becomes your NIF the moment you register for tax purposes — they're not two different numbers, just two different uses of the same one.

## 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](https://spain-relocation.com/tax-accounting/autonomo-registration/), 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](https://spain-relocation.com/residence-permits/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](https://spain-relocation.com/tax-accounting/autonomo-registration/) 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.

**Expert note — Marcos Aguilar Peña · Gestor Administrativo:** Book your NIE appointment through the police site directly rather than a third-party scheduler — duplicate or fraudulent booking services around cita previa slots are a real, recurring problem. [Official NIE appointment system → (opens in new tab)](https://sede.policia.gob.es)

## How the process actually works, step by step

1. **Apply for the NIE** — either at a Spanish consulate before you move (see our guide on the [consular NIE route](https://spain-relocation.com/guides/nie-from-abroad-consular/)) or in person once you're in Spain.

2. **Receive your NIE certificate** — a white A4 sheet from the police confirming your number. This is not a card and has no photo.

3. **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](https://spain-relocation.com/tax-accounting/autonomo-registration/) service.

4. **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](https://spain-relocation.com/documents/nie-number/) application, and coordinate the tax-side activation covered on our [NIF Number](https://spain-relocation.com/documents/nif-number/) page. For clients setting up as self-employed, this usually happens alongside [Autónomo Registration](https://spain-relocation.com/tax-accounting/autonomo-registration/), and for company formations we handle the separate corporate NIF process described under [Company Registration](https://spain-relocation.com/business-setup/company-registration/).

### Sources & Official Resources

1. [Policía Nacional — NIE (Sede Electrónica) (opens in new tab)](https://sede.policia.gob.es)

2. [Agencia Tributaria — Censos, NIF y domicilio fiscal (opens in new tab)](https://sede.agenciatributaria.gob.es)

3. [Boletín Oficial del Estado (opens in new tab)](https://www.boe.es)

## 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](https://spain-relocation.com/guides/tie-card-explained/), but the underlying NIE/NIF code itself stays the same for life.

---

Rules and fees change; this guide reflects the last update above. For advice on your specific case, [book a free consultation](https://spain-relocation.com/contact/) or see [current service pricing](https://spain-relocation.com/pricing/).
