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:
- 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.
- Print it and pay at a Spanish bank, or online where the form allows it.
- 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):
- Choose the province (Málaga for the Costa del Sol).
- Choose the procedure for the NIE (the list differs from province to province).
- 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



