Skip to content
Buying processLast verified: 10 October 20269 min readChecked against the foreigners regulation and the Spanish land registry law, with our own experience in Málaga province

How to get an NIE in Spain as a foreigner: step by step (2026)

How to get your NIE, the Spanish foreigner number you need to buy a home: who needs one, consulate or police, documents, fee, appointment and timing.

Checklist

Summary

Before you can buy a home in Spain you need an NIE, the identity and tax number Spain gives to foreigners. It is a short procedure, but it has to be done in person, it needs an appointment that can be hard to get, and a wrong form or a missing paper sends you back to the start. This guide shows who needs one, where to apply, which documents to bring and how long it takes.

In short: every buyer needs their own NIE; apply in person at a Spanish consulate abroad or at a police station in Spain with an appointment, bring the EX-15 form, your passport and a document that shows why you need it, pay the fee on form 790 code 012 first, and start at least two months before you plan to sign.

Illustrative image: an NIE application form, a passport, passport photos, a paid fee form, a pen and a key on a stone table
Illustrative image

1. What the NIE is, and what it is not

The NIE (número de identidad de extranjero) is your personal number in Spain. It starts with X, Y or Z, followed by seven digits and a check letter, for example Y1234567X. Spain gives it to foreigners who have economic, professional or social dealings with Spain, and it is unique to you (Real Decreto 1155/2024 (Reglamento de extranjería), article 205).

Three things people mix up:

  • The NIE number. Unique to you. You keep the same number for every later procedure.
  • The NIE certificate. A sheet of paper from the police that shows your number. This is what non-residents get.
  • The TIE card. The plastic card that non-EU residents get with their residence permit. It shows the same NIE number.

For the tax agency, the NIE is also your tax identification number, so you use it for the purchase tax and your yearly non-resident tax return.

The NIE is not a residence permit. It is only a number. It gives you no right to live or work in Spain, and getting one does not start any residence procedure.

2. Who needs one

You need an NIE for almost anything with money or property in Spain:

  • Buying a home. The land registry will not register a purchase deed unless it shows the tax number of everyone who signs it, and of anyone they sign for (Ley Hipotecaria, article 254.2). For a foreigner, that number is the NIE. Registration is what protects you as the owner.
  • A mortgage, a Spanish bank account, and the utility contracts for your home.
  • Paying tax: the purchase tax, the yearly non-resident tax return and, one day, the tax when you sell.
  • Inheriting a Spanish property, or buying a car.

Every buyer needs their own NIE. A couple buying together needs two, even if only one of them pays.

3. Choose where to apply

The regulation gives two routes, and both are in person (article 205):

Spanish consulate abroad

  • Where: the consulate that covers where you live.
  • Appointment: the consulate’s own system.
  • Who decides: the police in Spain, through the consulate.
  • Time: longer, because the file goes to Spain and back.
  • Best if you are not travelling to Spain before the purchase.

Police in Spain

  • Where: a police station or foreigners’ office (oficina de extranjería).
  • Appointment: cita previa online (step 6).
  • Who decides: the police office.
  • Time: a decision within five days by law.
  • Best if you are in Spain anyway, for example for viewings.

If you are coming to Spain to view homes, applying here is usually faster. If not, start at the consulate early: the purchase can’t be registered without the number.

4. Gather your documents

Bring originals and a copy of everything:

  • Form EX-15, filled in and signed. It is the official application form for the NIE and the foreigner certificates.
  • Your passport, valid, with a copy of every page that has something on it.
  • A document that shows why you need it. For a purchase, the reservation or arras contract, a letter from your lawyer or a notary, or a mortgage offer. The regulation requires you to state the reason, and an office can refuse an application without one.
  • Proof that you paid the fee (step 5).

Your name exactly as in your passport, on every form and on the appointment. A missing middle name or a different spelling is a common reason to be turned away.

5. Pay the fee

The fee is paid on form 790, code 012:

  1. Fill it in on the national police website (sede.policia.gob.es/Tasa790_012) and choose the option for the assignment of an NIE (asignación de NIE). In 2026 the NIE fee is €12; the form fills in the amount for you.
  2. Print it and pay at a Spanish bank, or online where the form allows it.
  3. Bring the stamped copy or the payment receipt to your appointment.

Choose the right option: a fee paid for the wrong procedure is not refunded, and you pay again. If you apply through a consulate, ask it how it wants the fee paid.

6. Book the appointment in Spain

Appointments are booked on the government’s appointment website (icp.administracionelectronica.gob.es/icpplus):

  1. Choose the province (Málaga for the Costa del Sol).
  2. Choose the procedure for the NIE (the list differs from province to province).
  3. Enter your passport number and your name as in the passport, and pick an office and a time.

On the Costa del Sol, appointments are released at irregular times and go quickly. Check early in the morning and over several days.

Don’t pay for appointments. Some websites resell official appointments. Booking is free, and appointments booked under someone else’s details can be refused at the desk.

7. At the appointment and after

  • Arrive early with the documents from step 4. The officer checks them and takes the application.
  • Decision: the police must decide within five days. If you hear nothing in that time, the application counts as refused (article 205). Ask at the desk when and where to collect the certificate.
  • Check the certificate before you leave: your name, date of birth and nationality. A spelling mistake on it will follow you into the deed and the land registry.
  • Keep it safe with copies. You will show it at the bank, at the notary, to the tax agency and to the utility companies.

8. If you are moving to Spain

The steps above are for non-residents. If you plan to live in Spain, the route is different:

  • EU and EEA citizens who stay longer than three months must register in person at the foreigners’ office or police station of their province, within three months of arriving, in the Central Register of Foreigners. You need to show that you work in Spain, or that you have enough money and full health insurance, or that you study here. The registration certificate is issued on the spot and shows your NIE (Real Decreto 240/2007, article 7). If you already have an NIE from a purchase, you keep the same number.
  • Non-EU citizens need a visa or residence permit first. With it you get a TIE card, which shows your NIE.

Buying with someone else

Each buyer applies for their own NIE, with their own appointment and fee. If only one of you can travel, the other can apply at a consulate, but start early: the purchase can’t be registered until every buyer has a number.

9. Ukrainians with temporary protection

If you came to Spain under temporary protection, you already have an NIE: it was assigned with your protection, and you use the same number to buy a home. What you apply for next is the TIE card. This is how it works in Málaga province, from our own experience (checked May 2026). The process changes often, so check it with your local Ukrainian community or at the office before you go.

Your first TIE card

  • Valid until: temporary protection and TIE cards have been extended to March 2027, and first cards are issued until then.
  • Appointment: on the appointment website, choose the province where you are registered, then POLICÍA – TARJETA CONFLICTO UCRANIA. Every family member, children included, needs their own appointment and visit. New appointments appear at 9:00 for the following days.
  • SMS code: a Ukrainian phone number can’t receive it, so ask someone with a Spanish number. The website may not open from Ukraine.
  • Fee: on form 790 code 012, choose TIE que documenta la primera concesión de la autorización de residencia temporal: €16.08. Pay in cash at a bank counter, or at a bank machine that scans the form’s barcode.
  • Form: EX-17, filled in on screen or by hand, and a 32 × 26 mm photo.
  • Bring: the passport or document you applied for protection with, the protection resolution (the A4 sheet with your fingerprints), the paid fee form, the EX-17 and the photo.

Collecting and renewing the card

  • Collection: after you apply you get a letter with a lot number (LOTE; in 2024/054 the lot is 054). Ready lots are posted at the office and on the appointment website under Recogida de tarjeta. Printing takes up to 30 days, so you can book the collection appointment, at the office where you applied, straight away. Bring the lot letter, your document and the old TIE.
  • Renewal: renewing an old card is not compulsory, but it avoids problems at the border and at the bank. You can book anywhere in Málaga province, for a date at least one day after the card expires, and the fee option is TIE que documenta la renovación: €19.30. If you moved to another province, apply there with a registration certificate (certificado de empadronamiento).

10. Mistakes to avoid

  • Leaving it until the last weeks. Appointments can take weeks, and the purchase can’t be registered without it.
  • Applying without a reason document. A purchase contract or a letter from your lawyer is usually enough.
  • Paying the fee for the wrong procedure. The money is not refunded.
  • A different spelling of your name from your passport.
  • Buying an appointment. Booking is free.
  • Thinking the NIE lets you live in Spain. It is only a number.

After the NIE, the next steps are a bank account and your own lawyer. Our guide to buying property in Spain as a foreigner takes you from here to the keys, and the buying cost calculator shows what the purchase will cost.

Checklist

  • One NIE for every buyer
  • Route chosen: consulate abroad or police in Spain
  • EX-15 filled in and signed
  • Passport and copies
  • Reason document: reservation contract, arras or a lawyer’s letter
  • Fee paid on form 790 code 012, for the NIE option
  • Appointment booked with your name exactly as in your passport
  • Certificate checked for spelling before you leave
  • Copies kept for the bank, the notary and the tax agency

Questions and answers

Frequently asked questions

What is an NIE?

The NIE (número de identidad de extranjero) is the personal number Spain gives to foreigners who have economic, professional or social dealings with Spain. It starts with X, Y or Z, followed by seven digits and a check letter, and it is also your tax number. The number is unique to you, and you keep it for every later procedure.

Do I need an NIE to buy property in Spain?

Yes. The land registry will not register a purchase deed unless it shows the tax number of everyone who signs it, and for a foreigner that number is the NIE. You also need it to pay the purchase tax, open a bank account and pay your yearly taxes. Every buyer needs their own, so a couple buying together needs two.

Can I apply for an NIE from outside Spain?

Yes. You can apply at the Spanish consulate that covers where you live. The consulate sends the application to the police in Spain, which adds time. Ask your consulate about its appointment system and current waiting times.

Can someone else apply for my NIE?

The regulation says the application is made in person. Plan to go yourself, and be careful with services that promise an NIE without you being there.

How long does it take?

Once you have applied, the police must decide within five days; if they don't, the application counts as refused. Most of the waiting is in getting the appointment, which on the Costa del Sol can take weeks. Through a consulate the file also has to travel to Spain and back.

Does the NIE let me live or work in Spain?

No. The NIE is only a number. It gives you no right to live or work in Spain. Residence is a separate permit, and EU citizens who move to Spain register separately.

Can I apply for an NIE online?

No. You can book the appointment and fill in the fee form online, but the application itself is made in person at a consulate or a police office. Websites that sell an "online NIE" usually only book the appointment and fill in the forms for you, so check what you are paying for.

How much does an NIE cost?

The fee is €12 in 2026, paid on form 790 code 012 before your appointment in Spain. If you apply through a consulate, ask it what it charges and how.

Does my NIE certificate expire?

Your NIE number never changes. Some notaries, banks and offices ask for a recent certificate, so if yours is several years old, ask in advance whether they will accept it.

Laws and official sources

Official texts in the Spanish Official Gazette (BOE), in Spanish. Article numbers in this guide refer to these texts.

Rates change. We will tell you.

One short email when the Euríbor, tax rates or fees change, plus new guides. No spam, unsubscribe any time. Subscribers get our one-page before-you-sign checklist.

We'll send a confirmation email first.