Skip to content
Menu

NIE vs NIF in Spain: What Is the Difference? (2026)

Jules

Editor

Updated: July 2026 | Found helpful by 5 others

Updated July 2026. The NIE (Numero de Identidad de Extranjero) is the identity number Spain issues to foreigners, while the NIF (Numero de Identificacion Fiscal) is the general tax number used by the Agencia Tributaria (AEAT). For a foreigner, these are not two different numbers: your NIE number doubles as your NIF once you use it for tax, banking, or property purposes. Spanish nationals use their DNI as their NIF instead. You need a NIF before you can open a bank account, buy property, work legally, or apply for a mortgage in Spain.

What Is the Difference Between the NIE and the NIF in Spain?

The NIE (Numero de Identidad de Extranjero) is a foreigner's identity number, issued by the Policia Nacional (Oficina de Extranjeros) inside Spain or by a Spanish consulate abroad. The NIF (Numero de Identificacion Fiscal) is the general tax identification number that the Agencia Tributaria (AEAT) uses for every tax, banking, and property transaction in Spain.

For a foreigner who holds a NIE, the two are the same number used for two different purposes: the NIE identifies you as a foreign resident or non-resident, and that identical number functions as your NIF the moment AEAT, a bank, or a notary needs your tax identification. There is no separate application step to convert one into the other.

For a Spanish national, the picture is different: the DNI (Documento Nacional de Identidad), the national identity card issued to citizens, doubles as the NIF instead of the NIE. A common point of confusion is assuming the NIE and NIF are always distinct numbers requiring separate applications; for most foreigners in Spain, they are not.

Illustration of a bank, a padlock, and a euro coin, for proof of funds and blocked accounts for Spanish permits.
Bank, lock, funds: proof of funds in Spain.

Who Needs a NIF in Spain?

Anyone doing anything with a fiscal footprint in Spain needs a NIF: opening a bank account, buying or selling property, working under a Spanish contract or as an autonomo (self-employed), filing a tax return, or registering a vehicle. Banks, notaries, and AEAT all request it as the anchor identifier tying a transaction to a specific person.

This applies equally to non-residents with financial ties to Spain, for example someone who owns a holiday property but does not live there full time. A non-resident still needs a NIF (via their NIE) to pay the applicable non-resident property taxes and to hold a linked bank account.

How Do You Get a NIE as a Foreigner?

You can apply for a NIE either inside Spain, at a Policia Nacional Oficina de Extranjeros, or before arrival, at a Spanish consulate in your home country. Both routes require an appointment (cita previa), the relevant application form, your passport, and a stated reason for the request (for example, opening a bank account, buying property, or starting work).

While the NIE application is being processed, many bank branches accept the resguardo, the receipt issued when the application is filed, as a supporting document, though acceptance is set branch by branch and can change, so confirm with your chosen branch first. See our bank account guide for how this interacts with account opening.

Do You Need a NIF Before Opening a Bank Account or Applying for a Mortgage?

Yes, on both counts. A Spanish bank cannot open a full resident current account without a NIF (your NIE number for foreigners), since it must report the account to AEAT. The same applies to a mortgage application: the lender needs your NIF to run affordability and identity checks and to register the loan and property with the Registro de la Propiedad.

In practice, most foreigners sequence it as NIE first, then bank account, then mortgage application, since each later step depends on the identity and tax number the NIE provides. See how to open a bank account in Spain and our mortgages guide for the full document checklists.

Illustration of a bank card, a euro coin, and a bank building, for opening an account and choosing a bank or card in Spain.
Account, card, bank: the Spanish banking essentials.

What Is the Agencia Tributaria (AEAT)?

The Agencia Tributaria (AEAT) is Spain's national tax authority. It assigns and administers the NIF, processes income tax (IRPF) and other filings, and is the body banks and notaries ultimately report NIF-linked transactions to. For foreigners, AEAT does not issue a separate NIF card: the NIE issued by the Policia Nacional or a consulate is the number AEAT uses.

Frequently Asked Questions

Is my NIE the same number as my NIF in Spain?

Yes, if you are a foreigner. Once the Policia Nacional (Oficina de Extranjeros) or a Spanish consulate issues your NIE (Numero de Identidad de Extranjero), that same number is used by the Agencia Tributaria (AEAT) as your NIF (Numero de Identificacion Fiscal) for every tax, banking, and property purpose. You do not receive a separate tax number: the NIE simply starts doing double duty the moment you need it for anything fiscal.

What is the difference between a NIE and a DNI?

The NIE (Numero de Identidad de Extranjero) identifies foreigners; the DNI (Documento Nacional de Identidad) identifies Spanish nationals. Both function as a NIF for tax purposes. A foreigner who later naturalizes as a Spanish citizen is issued a DNI, and the DNI number then replaces the NIE as their NIF automatically, since Spanish nationals' NIF always matches their DNI number. The newly naturalized citizen is still responsible for notifying the Agencia Tributaria (AEAT), their bank, and their employer of the new document so tax and account records are updated correctly.

Can I open a bank account or apply for a mortgage without a NIF?

No. Spanish banks require a NIF (which for a foreigner is the NIE number) before opening any account or processing a mortgage application, since the bank must report account and loan data to AEAT. See our guides on opening a bank account and on mortgages in Spain for the full document lists.

How long does it take to get a NIE in Spain?

Processing times vary by province and by whether you apply in Spain or at a consulate abroad. As of July 2026, the wait just to get a cita previa appointment at an Oficina de Extranjeros commonly runs 2 to 4 weeks in Madrid and Barcelona, and up to about 3 months in high-demand periods, and the file review after your appointment typically takes another 20 to 90 business days, so budget several weeks to a few months overall. These timelines fluctuate with appointment availability and vary by province, so treat them as a planning range rather than a guarantee.