ID and tax ID numbers

Government & Law

ID numbers in Spain: NIE, DNI, NIF, and social security

Whether you’re moving or want to do business in Spain, you’ll need an NIE or NIF number. Find out all about the Spanish identity numbers.

NIE number
writer

Updated 5-8-2024

If you are moving to Spain and want to access the social security system, or you are simply buying property as a foreigner, you’ll need one of the country’s ID numbers. Which one depends on your residence status and what transaction you’re carrying out.

Here’s what you need to know about sorting out your Spanish NIE number, social security number and more, with sections including:

e-residence

Skip the queues and let e-residence take care of your moving admin. Use their online services for your tax numbers, bank account, social security, company creation, apostille, and more in your new country – all without having to fly out for appointments. Cross off your top moving priorities today with e-residence.

ID numbers in Spain

Spain has ID numbers for both citizens and foreign residents that are used for tax and social security purposes. Furthermore, ID numbers are also used for non-residents who conduct any kind of financial or legal activity in the country. This is so that the Spanish Tax Agency (Agencia Tributaria) can accurately calculate the fiscal responsibilities of everyone paying tax in Spain, so you’ll need an ID number for everything from opening a Spanish bank account to getting a driving license.

The Ministry of Finance in Spain

There are three types of tax ID number (Número de Identificación Fiscal – NIF) in Spain. These are:

  • NIE number (Número de Identidad de Extranjero) – this is the ID number for all foreign residents and non-residents living or conducting tax-related business in Spain
  • DNI number (Documento Nacional de Identidad) – this is the ID number for Spanish nationals
  • Business NIF number – this is the tax ID number for limited companies in Spain

In addition to this, there is the Spanish social security number (Numéro de Seguridad Social – SSN) which is used if you work or want to access social security in Spain.

NIE numbers in Spain

The NIE number is the ID number for foreigners in Spain. It is used as an NIF number for tax purposes and you need to apply for one if you move to Spain and live there for more than three months. Moreover, you will also need to get an NIE number if you live outside the country and carry out any financial or legal transactions in Spain.

The Ministry of the Interior (Ministerio del Interior) issues NIE numbers in Spain. They consist of a letter, followed by seven digits, followed by another letter. European Union (EU) and European Free Trade Association (EFTA – Iceland, Liechtenstein, Norway and Switzerland) nationals receive their NIE number on an NIE card, which is a laminated green paper card. Non-EU/EFTA citizens received their number on a TIE (Tarjeta de Identidad de Extranjero) card, which is in plastic credit card format.

What information is included on the NIE/TIE card?

In addition to the NIE number, NIE/TIE cards also include the following information about the card holder:

  • Full name
  • Gender
  • Date of birth
  • Nationality
  • Address
  • Registration date
Sample NIE card in Spain

TIE cards also include the holder’s photo, biometric information, their residence permit type, and the card expiry date.

Using your NIE number

You need an NIE number in Spain to do most things as a foreign resident or non-resident. This includes:

Who needs an NIE number?

All foreign nationals planning to live in Spain for longer than three months are required to obtain an NIE number. In addition to this, anyone planning to carry out any of the transactions listed above in Spain will also need to get an NIE number. This includes both short-term visitors and those living outside Spain. So, for example, if you live abroad and want to buy property in Spain, you should apply for this ID number.

Non-EU/EFTA nationals living in Spain for longer than six months will need to apply for a TIE card that includes their NIE number.

How to apply for an NIE number in Spain

You can apply for your NIE number in one of the following ways:

You will need to fill out an EX-15 application form (in Spanish) for your NIE number, along with the annex Form 790 Code 12 (link to both the online and PDF versions of the form, in Spanish). If you are a non-EU/EFTA national requiring a TIE card, you need to complete the EX-17 form. Since Brexit, UK nationals need to fill in an EX-23 form instead to obtain their TIE card.

Along with completed application forms, you should provide:

  • Your passport or valid photo ID
  • Two passport photos
  • Proof of your address
  • Proof of power of attorney, if someone else is applying for your NIE number on your behalf
  • Payment of administration fee, which is currently around €12

All documentation provided should be translated into Spanish. See this guide to preparing official translations in Spain for more information.

You should receive your NIE number within around two weeks, although sometimes the process can take up to two months. NIE numbers in Spain don’t have an expiry date, however TIE cards are usually valid for one year. You should renew them around 30-60 days before expiration.

If you are a foreign resident in Spain living there for more than three months, you will also need to enroll in el padrón, Spain’s population register.

DNI numbers in Spain

The Spanish DNI number is the national ID number and NIF tax number for Spanish citizens. It functions the same as the NIE number and you need it as a citizen when engaging in financial and legal transactions. The number is printed on the national DNI card, and consists of eight numbers plus one letter.

Sample DNI card in Spain

DNI cards are in credit card format and include the same personal and biometric information as the TIE card for third country nationals. The DNI number lasts for life, although you need to renew the card every five to ten years. You can apply for this card from your nearest Spanish police station if you are a Spanish citizen aged 14 or over. In order to do so, you will need to provide:

  • Spanish passport or proof of Spanish nationality
  • Birth certificate
  • One recent passport photo
  • Proof of address
  • Proof of power of attorney, if someone else is applying on your behalf
  • Payment of fee, which is currently €12

If you are a Spanish citizen and you don’t have a DNI – for example, if you are a Spanish national living abroad or are aged under 14 – then you can apply for a Temporary NIF number if you want to carry out financial or legal activities in Spain. You can do this through:

You need to provide:

  • Completed Form 030
  • Passport or valid photo ID
  • Proof of address
  • Proof of power of attorney, if someone else is applying for your NIF on your behalf

Temporary NIF numbers are only valid for a single transaction so you will need to apply for a new number for any future transactions. They consist of a letter plus seven numbers.

NIF, VAT, and CIF: business ID numbers in Spain

Up until 2008, all businesses in Spain had a separate tax number known as a CIF number that also functioned as a VAT number. However, the CIF number was scrapped, and you can now use your individual DNI or NIE number as a business tax ID if you set up in Spain as a sole trader or unincorporated partnership. If you set up a limited company that exists as a separate legal entity, you need to apply for an NIF number for your business.

You should apply for your NIF number from the Spanish Tax Agency if you need one. This should be done within one month of the company creation. The number consists of one letter (linked to the type of your business), followed by seven numbers and a final digit (letter or number). In order to apply, you will need to provide:

  • Completed Form 036 or Form 037
  • Certificate from the registry of companies stating that the company is legally a corporation
  • Proof of company’s legal name, address, nationality, registration date, names and NIE/DNI numbers of company representatives
  • Valid ID of the company representative making the application

Social security numbers in Spain

You will need a social security number, or SSN, in Spain if you work and plan to access any of the country’s social security benefits. This is so that the Spanish authorities can track your payments and entitlements. Benefits include:

You can apply for your Spanish social security number through your local Social Security (Seguridad Social) office. Once you’ve made an appointment, you can download and complete the TA-1 form. Take this along with the following documents:

You should receive your SSN within 1-2 weeks.

Useful resources

Author

Gary Buswell

About the author

Based in London, Gary has been freelancing for Expatica since 2016. An expert writer with experience in social research and community development, he focuses on topics such as politics and current affairs, healthcare, recruitment, human rights and migration.

Editor's picks