DNI vs NIE vs NIF: The Main ID Documents in Spain for Foreigners

By Brenda Lins BritoUpdated 5 min read
EU model of Spain's foreigner identity card (TIE), with the card's expiry date field outlined

In a hurry? Summarise this article with the AI of your choice:

In short: the DNI is the ID card of Spanish citizens. As a foreigner, you get a NIE instead: a personal number that identifies you in Spain. Your NIF, the tax number, is simply your DNI or your NIE.

If you live in Spain, your NIE is printed on the document that proves it: the TIE card for non-EU residents, the EU registration certificate for EU citizens.

Spanish NIE

Your Spanish NIE, from abroad

  • Apply online in 5 minutes
  • We attend the appointment
  • Notary fees included

From€199

Get my NIE

4.8/51,500+ reviews

Delivery from 48 hours


What are the main Spain IDs?

Spain has one ID card for its citizens, and a set of numbers and documents for everyone else. Here is what each one is:

ID Who has it What it is Example
DNI Spanish citizens ID card 12345678Z: 8 digits and a letter
NIE Foreigners with ties to Spain Personal number Y1234567X: X, Y or Z, 7 digits and a letter
NIF Everyone who deals with the tax office Tax number Your DNI or your NIE; companies have their own
TIE Non-EU residents Residence card, with your NIE on it Plastic card with your photo
EU certificate EU, EEA and Swiss residents Proof of residence, with your NIE on it Green paper, no photo
NUSS People who work in Spain Social Security number Given by Social Security

A form asks for "DNI/NIE": what do I write?

Your NIE.

Spanish forms often have one box for both: Spaniards write their DNI, foreigners their NIE.

If you don't have a NIE yet, you may need one first to finish that step. See how to get each ID below.

Which IDs will I have as a foreigner?

It depends on whether you live in Spain, and where you're from:

  • You don't live in Spain (you buy a home, inherit or invest): a NIE only.
  • You're an EU, EEA or Swiss citizen living in Spain: a NIE and the EU certificate.
  • You're from outside the EU and stay more than six months: a NIE and a TIE card.
  • You work in Spain: a NUSS as well.

In every case, your NIE is your NIF: you don't need a separate tax number.

Check if you need a Spanish NIE

What's your Passport Issuing Country

Prefer to apply yourself? Find a verified NIE office
Your NIE delivered by email
Fast processing
Money-back guarantee

DNI: the ID card of Spanish citizens

The DNI is the ID card of Spanish citizens. It's compulsory from age 14 for Spaniards who live in Spain, and its number is 8 digits and a letter.

Foreigners don't get one.

You can only have a DNI once you become a Spanish citizen: until then, your NIE and your TIE or EU certificate do its job.

Everything else about the DNI is in our DNI guide.

What is the NIE?

The NIE ('Número de Identidad de Extranjero') is your personal number as a foreigner in Spain.

It's unique to you, and the same number appears on every document Spain gives you.

It starts with X, Y or Z, followed by 7 digits and a check letter: Y1234567X, for example.

You need one as soon as you have economic, professional or social ties to Spain: a job, a rental contract, a bank account, a home to buy, taxes to pay.

You can get it in Spain, at an immigration office or a police station, or from abroad, at a Spanish consulate. In Spain, the form is the EX-15. From abroad, AnchorLess can book and attend the NIE appointment for you.

The NIE guide has every step.

Your NIE also gets you a free digital certificate, to do a lot of your paperwork with Spain's administration online.

Can I live or work in Spain with just a NIE?

No.

The NIE only identifies you.

Your right to live or work in Spain comes from your visa or residence permit, which the TIE card or the EU certificate then proves.

Proof you live in Spain: TIE or EU certificate

Your NIE says who you are, not that you live here. Living in Spain takes one more document, with your NIE printed on it. Which one depends on your passport.

TIE: for non-EU residents

The TIE ('Tarjeta de Identidad de Extranjero') is a plastic card with your photo that proves your legal status in Spain.

You must get one if you have a visa or permit to stay more than six months. Apply in person within a month of arriving, or of your permit being granted.

The card is valid as long as your permit, so you renew it when you renew your permit.

More in our TIE guide, and on how the NIE and the TIE differ.

Hands holding a Spanish foreigner identity card (TIE) beside a passport and an application form

EU certificate: for EU, EEA and Swiss residents

EU citizens don't get a TIE. If you stay more than three months, you register as a resident in person within three months of arriving, and you get the EU registration certificate ('Certificado de Registro de Ciudadano de la Unión') on the spot.

People call it the 'green NIE': it's a green paper with your name, nationality, address and NIE, but no photo. So you show it with your passport or national ID.

After five years of legal residence, you can ask for the permanent version.

Everything about it is in our EU certificate guide.

Spanish EU registration certificate (Certificado de Registro de Ciudadano de la Unión), the green NIE

Tax and Social Security numbers: NIF and NUSS

Two more numbers come up once you pay taxes or start working. Only the NUSS is new: your NIF is a number you already have.

NIF: your tax number

The NIF ('Número de Identificación Fiscal') is the number the Spanish tax office uses to identify you. For a person, it's your DNI or your NIE: when a tax form asks for your NIF, you write your NIE.

Companies have their own NIF: a letter for the type of company, 7 digits and a check character. You may still hear it called CIF, its name before 2008.

The NIF guide covers both, and the rare case of a NIF without a NIE.

NUSS: your Social Security number

The NUSS ('Número de la Seguridad Social') is your Social Security number. It's separate from your NIE, and Social Security gives it to you.

You need one before you start working in Spain, as an employee or self-employed. You then use it for your contributions and benefits.

Our NUSS guide explains how to get it.

How do you get each ID?

Each ID has its own office and form. The guides linked below take you through every step:

ID Where Form Guide
NIE Police or immigration office in Spain, or a Spanish consulate abroad EX-15 NIE guide
TIE Police station in your province EX-17 TIE guide
EU certificate Immigration office or police station in your province EX-18 EU certificate guide
NIF Nothing to do: it's your NIE NIF guide
NUSS Social Security TA.1 NUSS guide

For the NIE, the TIE and the EU certificate, you book an appointment online (the 'cita previa') and pay the police fee with form 790, code 012, before you go.

Frequently asked questions

Does my NIE expire?

No.

The same NIE appears on every document Spain gives you.

What can expire is the TIE it's printed on: the card lasts as long as your permit.

Do I have to carry ID in Spain?

You have to keep your passport and the document that proves your status in Spain (your TIE or EU certificate) valid, and show them when the police ask.


Share this article

Share this article

Our readers also viewed

Spain's EX-15 application form, with the box to request a NIE (foreigner identity number) outlined
  • NIE Number Spain
  • How to Get NIE in Spain
15/08/2025

NIE Number Spain (2026): What It Is and How to Get It

What a NIE number is, who needs one and how to get it in Spain or from abroad in 2026: the EX-15 form, the €9.84 fee, the appointment and the waits.

BrendaContent and Social Media Manager
Spain's DNI decree (Real Decreto 255/2025) in the BOE, with the rule that the DNI is for Spanish nationals outlined
  • DNI Spain
  • Spanish ID card
15/06/2026

What is the DNI in Spain? The Spanish ID card explained

Spain's DNI is the national ID card of Spanish citizens, compulsory from 14 for those living in Spain. What's on it, and how new Spaniards get one.

BrendaContent and Social Media Manager
Join a community of 10,000+ expats
Get the weekly tips, success stories, and step-by-step guides we share with our members to make their move a success.
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
I love AnchorLess! They have been fantastic for my move to Portugal with the NIF, checking account, lawyer and tax consultation. I will be happy with when this process is over, but at least the journey has been smoother with them.
LD
Lisa D
From South Africa
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
Guilherme was the best! I had so many questions and moving parts and he was responsive, always professional, and went above and beyond to help me with everything! He is a PRO!!!!
DS
Debra Savage
From The United States
Our experts on the blog
Meet our diverse team of professionals.
Brenda.L
Content manager & expat in Portugal
Brenda knows all about the difficulties involved in obtaining a visa and shares her knowledge in our articles.
Lara.C
Spain Operations Coordinator

After years of living as an expat in over five countries and traveling extensively, Lara knows exactly what it feels like to start fresh in a new place.

Beach Portugal

Start your new life in Europe

Turn relocation stress into success with AnchorLess.

Relocating to Europe made simple.