ID Numbers in Spain: NIE, DNI, NIF, and Social Security Complete Guide 2026
Expat Life
Madrid

ID Numbers in Spain: NIE, DNI, NIF, and Social Security Complete Guide 2026

Emily Johnson
Emily Johnson
April 29, 2026 13 min read 3

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:

  • ID numbers in Spain
  • NIE numbers in SpainWhat information is included on the NIE/TIE card?Using your NIE numberWho needs an NIE number?How to apply for an NIE number in Spain
  • What information is included on the NIE/TIE card?
  • Using your NIE number
  • Who needs an NIE number?
  • How to apply for an NIE number in Spain
  • DNI numbers in Spain
  • NIF, VAT, and CIF: business ID numbers in Spain
  • Social security numbers in Spain
  • Useful resources

Gestoraz

Gestoraz is a one-stop online solution for all your Spanish residency services. They assist with applications for NIE numbers, autónomo registration, residence applications, and much more. Choose your package today then let Gestoraz guide you through the process and leave you with a big smile on your face.

ID numbers in Spain

Spain has ID numbers for both citizens and foreign residents that are used for tax and social security purposes. Also, 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.

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.

The tax system 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. Also, 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.

Managing your finances while waiting for your NIE number can be challenging for newcomers to Spain. Opening a local bank account typically requires an NIE, creating a difficult situation for many expats.

A multi-currency account can serve as a practical solution during this transition period. With a multi-currency account, you can hold and convert money in 40+ currencies, and receive funds through your own account details in different currencies, including euros.

This can give you financial flexibility while navigating the Spanish bureaucracy, allowing you to focus on settling in rather than worrying about accessing your money.

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

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:

  • Paying Spanish taxes
  • Starting a job in Spain
  • Registering a business or working self-employed as a freelancer
  • Opening a Spanish bank account
  • Registering for social services and receiving benefits
  • Buying or selling property in Spain
  • Getting a Spanish mortgage
  • Buying or selling motor vehicles
  • Studying in Spain
  • Arranging utilities in Spain
  • Getting a Spanish driving license
  • Dealing with Spanish inheritance
  • Getting a SIM card registered in Spain

While waiting for your NIE number to be processed, handling everyday expenses can be difficult without a local bank account. A multi-currency debit card can be a practical alternative for daily spending, allowing you to pay in euros without foreign transaction fees that typically come with using international bank cards.

You can use the multi-currency debit card for in-store purchases, online payments, and ATM withdrawals in Spain, making it easier to handle immediate expenses such as temporary accommodation, transportation, and meals.

You can create a euro account and card will automatically spend from that account when you make purchases in Spain. If you don’t have euros in your account, The card automatically converts your money at the mid-market exchange rate from another currency with lowest fees possible, helping you avoid the hidden fees and poor exchange rates that other providers often might charge.

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.

Spanish visas: how to immigrate to Spain

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:

  • Through making an appointment at your local immigration office (in Spanish) if you live in Spain
  • Via the Spanish embassy or consulate in your home country if you live abroad
  • Using services such as e-residence, Gestoraz, or NIE Express who can take care of the procedure for you

Immigration Consultant

Leonardo Ortíz

Insider Tip: Making an NIE appointment

Getting an NIE appointment can take weeks, even months in a big city. I learned this the hard way when trying to set up a bank account and rent a flat. Trust me, schedule it as early as possible. If navigating the system feels impossible, there are services that can help you secure an appointment.

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.

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.

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.

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. 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:

  • The Spanish Tax Agency if you live in Spain
  • The Spanish embassy or consulate of your home country if you live abroad

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.

Starting a business in Spain

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). 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

For freelancers and small business owners operating internationally in Spain, managing cross-border payments can be complicated and expensive.

business multi-currency service provides a solution specifically designed for global businesses, offering account details in multiple currencies. This means you can receive payments from clients worldwide without the high fees typically associated with international transfers.

business multi-currency service also allows you to pay suppliers, contractors, and employees abroad at lower costs than banks in Spain. For autónomos (self-employed workers) just starting out, this can significantly reduce operating costs while waiting for all Spanish business documentation to be processed.

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:

  • Access to public healthcare services
  • Unemployment benefits
  • State pension
  • Disability benefits
  • Maternity and paternity pay
  • Child benefits
  • Sick pay

Social security in Spain

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:

  • Valid ID
  • Your NIE or DNI number if you have one
  • TIE card or your visa/residence card if you are a non-EU national
  • Proof of your address, for example rental contract or utility bill
  • Proof of employment, for example employment contract

You should receive your SSN within 1-2 weeks.

Useful resources

  • Ministry of the Interior (Ministerio del Interior), responsible for NIE numbers in Spain
  • Spanish Tax Agency (Agencia Tributaria), deals with tax numbers and issues NIF numbers to businesses and Spanish nationals without ID cards
  • Spanish National Police, issues DNI cards in Spain

Frequently Asked Questions About Spanish ID Numbers

What is the difference between NIE and NIF in Spain?

NIE (Número de Identidad de Extranjero) is the foreigner identification number for non-Spanish citizens, required for buying property, opening bank accounts, starting businesses, or working. Format: Letter-7 digits-Letter (X1234567L). NIF (Número de Identificación Fiscal) is the tax identification number for Spanish citizens and sometimes used for business entities. DNI (Documento Nacional de Identidad) is the Spanish national ID card for citizens. Foreigners primarily use NIE for all official transactions.

How do I get an NIE number in Spain?

Apply for NIE at Spanish consulates abroad or immigration offices (Oficina de Extranjeros) or police stations in Spain with appointment (cita previa). Required documents include completed EX-15 form, passport copy, justification letter explaining why you need NIE (property purchase, work contract), and fee payment (€10-€12). Processing takes 2-4 weeks at consulates, often same-day at Spanish police stations if you have appointments. NIE is permanent and never expires, though the certificate paper may need renewal for certain transactions.

What is a Spanish social security number?

The Spanish social security number (Número de Afiliación a la Seguridad Social) is assigned when you start working in Spain. Employers handle registration automatically. Format: 12 digits (XX/XXXXXXXX/XX). This number tracks pension contributions, healthcare access, and unemployment benefits. Self-employed workers (autónomos) must register themselves at local social security offices (TGSS). The number is permanent and remains the same throughout your working life in Spain, even when changing jobs or becoming self-employed.

Can I use my NIE as a tax number?

Yes, NIE functions as your tax identification number in Spain for all tax-related matters including income tax returns, VAT registration, property taxes, and capital gains. You do not need a separate tax number. When asked for NIF on forms as a foreigner, provide your NIE. Businesses may also have separate company NIF numbers, but individual foreigners use NIE for all personal and business tax obligations. Keep your NIE certificate safe as you will need it for tax filings and official procedures.

Moving to Spain? Find legal services and read Spain immigration guides on ExpatsList.

gov-law-admin Spain

Frequently Asked Questions

What's the difference between NIE, DNI, and NIF?
NIE (Número de Identidad de Extranjero) is for foreigners to identify themselves for tax and legal purposes. DNI (Documento Nacional de Identidad) is the national ID for Spanish citizens. NIF (Número de Identificación Fiscal) is a tax number - your NIE or DNI serves as your NIF for individuals. Companies get a separate NIF called CIF.
How long does it take to get a NIE?
Processing time varies. At a police station in Spain, you might get it same-day or within 1-2 weeks. Applying from abroad through a Spanish consulate typically takes 2-4 weeks. Appointments can be hard to get, so book as early as possible.
Do I need a NIE to buy property in Spain?
Yes, you must have a NIE to purchase property in Spain. Even if you're not a resident, you'll need a NIE for the transaction. You can apply for a non-resident NIE specifically for property purchase.
Written by:
Emily Johnson
Emily Johnson
United Kingdom From London, United Kingdom | Spain Living in Barcelona, Spain

Escaped London for Barcelona and discovered that "mañana" is more lifestyle than timeframe. Five years of learning Spanish, defending my accent, and accepting that dinner at 10pm is normal. I write about surviving Spanish bureaucracy with your sanity intact.

View Full Profile

Found this helpful?

Join the conversation. Share your own tips, experiences, or questions with the community.

Write Your Own Blog
3
People Read This

Your blog could reach thousands too

Back to All Blogs