Mallorca

Tax number (NIF) explained - the difference between NIE and NIF

Updated: March 20265 min reading time

Summary

The Spanish tax number (NIF - Numero de Identificacion Fiscal) is often confused with the NIE. This article explains what the NIF is, why it is identical to the NIE for foreigners, and when you need the NIF.

What is the NIF?

The NIF (Numero de Identificacion Fiscal) is the Spanish tax identification number. Every person and every company that is tax-relevant in Spain needs a NIF. It is the equivalent of the German tax ID and is used for all dealings with the Agencia Tributaria (Spanish tax authority / Hacienda).

For Spanish citizens the NIF is identical to the number on their DNI (Documento Nacional de Identidad). For foreigners the NIF is identical to the NIE number.

Important: NIE = NIF for foreigners

If you are a foreigner living in Spain and already have a NIE number, you automatically also have your NIF. You do not receive a separate tax number. Your NIE number (e.g. X1234567Z) is at the same time your NIF.

NIE vs. NIF - the difference

Confusing the NIE and NIF is one of the most common misunderstandings among German expats. Here is the clear distinction:

NIE (Numero de Identidad de Extranjero): Your personal identification number as a foreigner in Spain. It is issued by the Policia Nacional (Extranjeria) and serves as a general identifier for all official processes.

NIF (Numero de Identificacion Fiscal): The tax identification number. For Spanish citizens this is their DNI number, for foreigners it is their NIE number. The NIF is therefore not a separate number but a concept - the number under which you are recorded for tax purposes.

In practice this means: when a form, a bank or a landlord asks for your NIF, simply provide your NIE number.

Tip: CIF, NIF, NIE - the abbreviations

CIF was the old term for the tax number of companies (now also called NIF). NIF is the current term for the tax number of all persons and companies. NIE is specifically the foreigners identification number. As a foreigner your personal NIF is your NIE.

What do I need the NIF for?

You need your NIF (i.e. your NIE) in Spain for almost all official and commercial transactions:

Tax return (Renta/IRPF): Without a NIF you cannot file a tax return. Your entire tax profile at the Agencia Tributaria runs under this number.

Opening a bank account: Every Spanish bank requires your NIF when opening an account. Without a NIF/NIE there is no account.

Signing an employment contract: Your employer needs your NIF for payroll and tax remittance.

Buying property or renting: A NIF is required for rental contracts and purchase contracts. Without it no contract can be concluded.

Receiving and issuing invoices: Every official invoice (factura) in Spain must state the NIF of both buyer and seller.

Buying or registering a vehicle: The DGT (traffic authority) also requires your NIF for vehicle registration.

How do I get my NIF?

As an EU citizen you receive your NIF automatically when you apply for your NIE number. No additional step is required.

Step 1: apply for your NIE number. Follow our NIE number guide. Once you have your NIE, you also have your NIF.

Step 2: register with the Agencia Tributaria (optional). If you want to carry out tax-relevant activities (e.g. as a self-employed person), you need to register with the tax authority using Modelo 036 or 037. You need your Certificado Digital for this.

Step 3: provide your NIF for all transactions. Use your NIE number whenever the NIF is requested - at the bank, with your employer, on invoices and in contracts.

Tip: Certificado Digital for online access

With the Certificado Digital you can handle all tax matters online at the Agencia Tributaria - filing your tax return, downloading certificates and viewing your tax data. It is worth applying for it early.

Tips and common mistakes

Mistake: trying to apply for a separate NIF. Many Germans try to apply for an extra NIF in addition to their NIE. This is not necessary - your NIE is your NIF.

Mistake: confusing NIE and NIF

If a form says NIF and you enter your NIE number, that is correct. Do not be confused - for foreigners both numbers are identical.

Tip: check the NIF on invoices. For important invoices (rent, electricity, insurance), check that your NIF is recorded correctly. Incorrect numbers can cause problems when filing your tax return.

Tip: Modelo 036/037 for the self-employed

As an autonomo you need to register with the Agencia Tributaria using Modelo 036 or 037. This activates your NIF for business purposes. Your Gestor (tax advisor) can handle this for you.

Checkliste

Use this checklist to make sure you have taken care of everything to do with the NIF:

☐ NIE number applied for and received ☐ Understood: my NIF is my NIE number ☐ NIF/NIE registered with the bank ☐ NIF checked in employment contract and payslip ☐ Certificado Digital applied for (for online access to Hacienda) ☐ NIF correctly stated on invoices and contracts ☐ If self-employed: Modelo 036/037 submitted

Agencia Tributaria - official website of the Spanish tax authority with information on the NIF, tax returns and online services: sede.agenciatributaria.gob.es

Sede Electronica - Agencia Tributaria - here you can handle all tax matters online with your Certificado Digital: sede.agenciatributaria.gob.es

Applying for the NIE number - our detailed guide to applying for the NIE (and therefore your NIF): NIE number guide

Frequently asked questions

Is my NIE also my NIF?

Yes, exactly. For foreigners in Spain the NIE number is also the NIF. You do not receive a separate tax number. Whenever the NIF is requested anywhere, provide your NIE number.

Do I need the NIF to open a bank account?

Yes, every Spanish bank requires your NIF when opening an account. Since your NIF is your NIE, you need the NIE number. Some banks also accept your passport initially but will ask for the NIE shortly afterwards.

What do I do if an invoice asks for the NIF instead of the NIE?

Simply provide your NIE number. The terms are often used interchangeably. For foreigners both refer to the same number.

Can companies also have a NIF?

Yes, every company in Spain has its own NIF, which starts with a letter (e.g. B for Sociedades Limitadas). As a sole trader (Autonomo) you use your personal NIF, i.e. your NIE number.

Do I need the NIF for my tax return?

Yes, the NIF is the basis for all tax processes in Spain. Without a NIF you cannot file a tax return, pay taxes or receive certificates. You will find more about the tax return in our Renta guide.

Requirements

NIE number

For EU foreigners the NIE is also your NIF. So you need a NIE first.

Passport or ID card

A valid identity document (original and copy).

Certificado Digital (recommended)

For many tax-related online services at the Agencia Tributaria you need a digital certificate.

Costs & duration

PostenKostenDauer
NIF assignment (for EU citizens with NIE)FreeAutomatic
NIF for non-EU citizens without NIE~12 EUR (Tasa)1-2 weeks
Total (EU citizens)0 EURImmediate with NIE

Checklist

Progress

0 of 5

Frequently asked questions

Anzeige

Partner recommendation

Sending money to Spain?

With Wise you transfer money at real exchange rates and low fees. Perfect for tax payments or salary transfers.

Related articles

Spotted an error or something to add? Write to us - we appreciate your feedback.