Moving to a new country is always going to fill you with excitement, however, this may be short-lived once you find out you have to deal with a completely new form of bureaucracy.
When you first move to Spain, you not only have to learn a new language but also familiarise yourself with a whole host of abbreviations.
This is especially the case when it comes to taxes and dealing with the Spanish financial system.
Below we are going to help you navigate your way through Spain’s tax codes and their abbreviations and describe what they are and who may need to use them.
You will learn:
NIE - Número de Identificación de Extranjero
As the name implies, the NIE is a foreigner’s tax identification number. It is the equivalent of the NIF number (see below) which is assigned to Spanish nationals.
Spaniards do not have an NIE number as these are only associated with foreign nationals. If you ever apply for Spanish citizenship, your NIE number will be revoked and replaced with an NIF.
NIE numbers usually begin with the letter X, Y, or Z, followed by seven digits, and ending in a letter — for example: X-1234567-Y.
If you’re planning to purchase a property in Spain, start a business, or even get a mobile phone contract, you’ll need an NIE number first.
Your NIE is unique to you and used by the Spanish tax authorities to track your fiscal activities and obligations.
You'll need it to:
If you're not yet in Spain, you can apply for your NIE at the Spanish consulate in your home country (e.g., London, Manchester, or Edinburgh if you're in the UK). Processing times are usually around two weeks.
Read our full guide on how to apply for an NIE.
NIF - Número de Identificación Fiscal
The NIF is the standard tax ID number for Spanish citizens and legal entities. It’s used for tax declarations, customs processes, and general communication with Spain’s tax authorities.
Spanish nationals get their NIF from their DNI (national identity document), while foreigners may be assigned a temporary NIF in some cases.
There are different categories of NIF:
To apply for an NIF, visit your local provincial tax office or apply online.
Foreign applicants should complete Modelo 030 and may need to visit a consulate or embassy.
More info is available from the Spanish consulate.
CIF - Código de Identificación Fiscal
The CIF was once the official tax ID for Spanish businesses. Though it’s technically obsolete (replaced by NIF in 2008), many people and institutions still refer to it colloquially.
The CIF consists of a letter followed by eight digits. The first letter identifies the business type — for example:
So, for example, a limited company might have CIF B12345678.
If you're setting up a limited company (S.L.), you’ll need to apply for a new NIF for your business by submitting Modelo 036 or 037.
Who Needs a Tax Identification Number in Spain?
If you plan to:
…you will need a tax ID number (NIE or NIF). This includes both EU and non-EU nationals.
How to Apply for a Spanish Tax Number
You can apply for a Spanish tax ID in one of three ways:
Also check our guide on getting an NIE number for full details.
If you’ll be working in Spain, remember to apply for a social security number too.
Already living in Spain and working as self-employed? Our Sanitas Professional Plus Plan offers affordable health coverage with co-payments, ideal for autónomos who need reliable protection while handling life and work in Spain.