If you’re a foreign individual in Spain, your NIE and NIF are almost always the same number. The Agencia Tributaria (AEAT) treats your NIE as your fiscal identifier for tax filings, property transactions, and banking. You do not need to apply for a separate NIF. The confusion comes from the fact that “NIF” is a functional label, not a separate document, and the same number gets called different things depending on whether you’re at a notary’s office, a tax form, or a police station.
When does the distinction actually matter? Primarily for companies, which receive a corporate NIF (formerly called a CIF) that looks nothing like an individual NIE. And for the rare case where an employer needs to run payroll before your NIE arrives, in which case a provisional NIF starting with “M” can be issued as a stopgap.
- For foreign individuals: your NIE is your NIF. One number, two labels.
- For Spanish citizens: their DNI number serves as their NIF.
- For companies: a separate corporate NIF (formerly CIF) is required.
- Provisional NIFs exist for urgent tax or payroll situations before a permanent number is assigned.
Pro Tip: Before booking any appointment or paying any fee to “get a NIF,” check whether you already have an NIE. If you do, open AEAT’s website and confirm your NIE is registered there. In most cases, it already is, and you’re done.
Key Takeaways
For foreign individuals in Spain, the NIE and NIF are the same number used in different contexts, and the distinction only becomes structurally significant for companies or urgent provisional payroll situations.
| Point | Details |
|---|---|
| NIE equals NIF for individuals | Foreign individuals do not need a separate NIF; the NIE serves as the fiscal identifier at AEAT. |
| Companies need a separate NIF | Corporate NIFs (formerly CIF) follow a different format and are obtained through the Mercantile Registry. |
| Apply for NIE early for property | Book the NIE appointment as soon as you decide to buy; allow at least two months before your target closing date. |
| Provisional NIFs cover urgent gaps | If an NIE is delayed, AEAT can issue a provisional NIF (starting with “M”) for payroll or urgent tax filings. |
| Steramflats coordinates the paperwork | Steramflats supports international buyers with document collection, notary scheduling, and NIE/NIF coordination in southern Spain. |
Table of Contents
- NIE vs NIF: how the two identifiers compare
- What is the NIE and when do you need it?
- What is the NIF and how does it work as a tax identifier?
- How DNI, TIE, and other IDs relate to NIE and NIF
- Who needs which number, and when?
- How to get an NIE in Spain or from abroad
- How to get a NIF: AEAT routes and provisional numbers
- Validity, renewals, lost documents, and common problems
- Why NIE and NIF matter for buying property in Spain
- What newcomers consistently get wrong about NIE and NIF
- Steramflats handles the document coordination so you don’t have to
- Sources
NIE vs NIF: how the two identifiers compare
As La Moncloa’s official explainer confirms, the NIE functions as the tax identification number (NIF) for foreign individuals in Spain. The table below maps the key differences across the dimensions that matter most.
| Dimension | NIE | NIF |
|---|---|---|
| Full name | Número de Identidad de Extranjero | Número de Identificación Fiscal |
| Primary purpose | Administrative identity number for foreigners | Tax identifier used on fiscal forms and invoices |
| Who holds it | Foreign nationals (residents and non-residents) | All individuals and entities with tax obligations in Spain |
| Issuing authority | Ministerio del Interior / National Police | Agencia Tributaria (AEAT) |
| Number format | X1234567A / Y1234567A / Z1234567A | Same format for foreign individuals; DNI format for Spaniards; letter-prefix format for companies |
| Main uses | Property purchase, banking, employment, padrón, utilities | Tax returns, invoices, contracts, notary deeds |
| How to obtain | Police station (Oficina de Extranjería) or Spanish consulate abroad | AEAT office or consulate; Form 030 for registration |
| Validity | The number is permanent; physical documents have renewal cycles | Permanent once assigned |
For foreign individuals, the NIE and NIF are the same identifier used in different administrative contexts. The distinction becomes structurally significant only for companies, which hold a corporate NIF that follows a different format entirely.
What is the NIE and when do you need it?
The NIE (Número de Identidad de Extranjero) is Spain’s administrative identity number for foreign nationals. The Ministerio del Interior issues it through the Dirección General de la Policía, and it follows you for life once assigned.
The format is a letter prefix followed by seven digits and a check letter: X1234567A, Y1234567A, or Z1234567A. The prefix letter reflects the period in which the number was allocated. X-series numbers were issued first; Spain moved to Y when the X series was exhausted, and Z is the current allocation series.
Where you’ll encounter your NIE:
- Property purchase: Every notary deed for a real estate transaction requires the buyer’s and seller’s NIE. No NIE, no closing.
- Banking: Most Spanish banks require an NIE to open a resident account. Some branches accept a passport plus a certificado de no residente as a temporary workaround while the NIE is pending.
- Employment: Employers need your NIE to register you with Social Security and process payroll.
- Padrón registration: Registering at your local town hall (empadronamiento) requires an NIE.
- Utilities and contracts: Phone companies, energy providers, and landlords routinely ask for it.
The NIE appears on a green paper certificate (the original assignment document) or, for non-EU residents with long-term residency, on the TIE card. EU citizens receive a separate certificate of registration that also contains the NIE number but is not a TIE.
What is the NIF and how does it work as a tax identifier?
The NIF (Número de Identificación Fiscal) is Spain’s tax identifier, administered by the Agencia Tributaria (AEAT). Every person or entity with a tax obligation in Spain holds one. The NIF appears on tax returns, invoices, contracts, and notary deeds wherever a fiscal identifier is required.
How the NIF label maps to different groups:
- Spanish citizens: Their DNI number, plus the check letter, is their NIF. The two are identical in practice.
- Foreign individuals: The NIE serves as the personal NIF. AEAT recognizes the NIE format directly on Form 030 and all standard tax filings.
- Companies: They hold a corporate NIF (formerly called a CIF) in a different format, starting with a letter that identifies the entity type (A for S.A., B for S.L., etc.) followed by seven digits and a check character.
Form 030 is the standard AEAT registration form for individuals who need to formally register a tax identification or update their fiscal census data. Most foreigners who already have an NIE do not need to file Form 030 separately, but it becomes relevant when registering as autónomo (self-employed), when an employer needs to verify your fiscal status, or when you need to update your tax address.
How DNI, TIE, and other IDs relate to NIE and NIF
Spain’s identification system has several overlapping documents, and mixing them up is easy.
- DNI (Documento Nacional de Identidad): The national ID card for Spanish citizens. The DNI number is also the citizen’s NIF. Foreigners do not hold a DNI.
- TIE (Tarjeta de Identidad de Extranjero): The physical residency card issued to non-EU nationals with long-term residency permits. The TIE contains the NIE number printed on it. The NIE is the number; the TIE is the card that carries it. EU citizens get a different document, a certificate of registration (certificado de registro), which also shows the NIE but is not a TIE. This distinction matters when a bank or notary asks for your “TIE” and you’re an EU citizen — your registration certificate serves the same purpose.
- CIF (Código de Identificación Fiscal): The old label for company tax identifiers. Spain harmonized this into the NIF system, so what was once called a CIF is now formally a company NIF. You’ll still see “CIF” on older contracts and invoices; it refers to the same number.
- NUSS (Número de la Seguridad Social): Spain’s social security number. Completely separate from the NIE and NIF. It’s assigned when you register with the Social Security system for employment or healthcare, and it cannot be used in place of an NIE or NIF on any fiscal or notarial document.
Who needs which number, and when?
The answer depends on what you’re doing in Spain, not on whether you’re a resident.
Tourists and short-stay visitors generally don’t need an NIE unless they’re making a significant financial transaction, like buying property or opening a bank account.
Non-resident property buyers need an NIE before the notary will complete the deed. This is the single most common reason foreigners apply for an NIE without being residents. The NIE then doubles as their NIF for the associated property taxes (ITP/AJD).
New employees need an NIE so their employer can register them with Social Security. If the NIE hasn’t arrived yet, an employer can request a provisional NIF starting with “M” from AEAT to process urgent payroll. That provisional number should be replaced with the permanent NIE/NIF as soon as it’s available.
Self-employed individuals (autónomos) need both an NIE and AEAT registration. The NIE serves as the NIF on invoices and tax returns, but you’ll need to formally register your economic activity with AEAT, typically using Form 036 or 037.
Company founders need a separate corporate NIF for the company itself, even if the individual founders already have personal NIEs. The company NIF is obtained through the Mercantile Registry process and is distinct from any individual’s NIE.
Opening a non-resident bank account (cuenta bancaria no residente) usually requires an NIE. Some banks will accept a passport plus a certificado de no residente while the NIE is being processed, but acceptance varies by branch. BBVA’s guidance notes that branch-level policies differ, so it’s worth confirming directly with your specific branch before assuming the workaround applies.
How to get an NIE in Spain or from abroad
Applying in Spain
- Book a cita previa (appointment) through the official government portal at Sede or the Interior Ministry’s appointment system. Appointments at busy offices in Madrid, Barcelona, and coastal areas fill weeks in advance, especially in summer.
- Go to the Oficina de Extranjería or designated police station on your appointment date. Bring every document — offices rarely accept partial submissions.
- Submit your documents and pay the tasa (fee) at a bank using the official payment form (Modelo 790, Código 012). The fee is modest, but you must pay before the appointment, not at the office.
- Collect your NIE certificate. Processing is usually same-day or within a few days for non-resident applications. Resident applications tied to a TIE involve fingerprinting and a longer wait.
Documents typically required:
- Valid passport (original plus photocopy of the photo page)
- Completed application form (EX-15 for non-residents requesting an NIE for economic reasons)
- Proof of the reason for the NIE (purchase agreement, job offer letter, or similar)
- Payment receipt for the tasa
- Two passport-sized photos (check current requirements, as some offices no longer require them for the NIE certificate)
Applying via consulate abroad
Spanish consulates can process NIE applications for applicants outside Spain. The required documents are largely the same, but processing times vary by consulate and can run several weeks. Consular guidance from Exteriores confirms that consulates can also handle NIF-related queries for foreigners who need to establish their fiscal identity before arriving.
Pro Tip: The most common rejection reason is a missing or incorrect proof-of-reason document. A preliminary purchase agreement (contrato de arras) signed by both parties is widely accepted as proof for property buyers. Get it notarized if possible.
How to get a NIF: AEAT routes and provisional numbers
For most foreign individuals, there’s nothing to “get.” Your NIE is already your NIF, and AEAT recognizes it automatically. The steps below apply to specific situations where formal AEAT registration is needed.
When you need to register with AEAT
- Registering as autónomo: File Form 036 or 037 with AEAT to register your economic activity. Your NIE is the NIF on those forms.
- Filing a tax return as a non-resident: Non-residents with income from Spanish sources (rental income, property sales) file using their NIE as the NIF on Form 210.
- Updating fiscal census data: Use Form 030 to notify AEAT of address changes, new tax obligations, or corrections to your registered data.
Provisional NIFs
If your NIE hasn’t been issued yet and an employer or bank needs a fiscal identifier urgently, AEAT can assign a provisional NIF, typically starting with the letter “M.” This is a temporary measure. Once your NIE is issued, the provisional NIF should be replaced, and your employer’s HR or payroll team needs to update their records.
Documents typically required at AEAT:
- Passport or national ID
- Proof of address in Spain (or proof of economic activity)
- Completed Form 030 (for census registration or updates)
Company NIF process
A Spanish company needs its own NIF, separate from the founders’ personal NIEs. The process runs through the Mercantile Registry: draft the company statutes, notarize them, register with the Registry, and AEAT assigns the corporate NIF. A provisional company NIF is available immediately after the notarial deed, allowing the company to open a bank account and begin operations before the final registration is complete.
Pro Tip: For payroll timing, coordinate with your HR team before your first pay date. A provisional NIF starting with “M” buys time, but Social Security registration still requires your permanent NIE. Don’t let the provisional number sit unresolved past your first full month of employment.
Validity, renewals, lost documents, and common problems
Is the NIE permanent? Yes. The number itself is assigned for life and never changes. What expires is the physical document: the TIE card for non-EU residents has a validity period tied to the residency permit (typically one to five years), and renewal requires a new appointment and updated documents. The green paper NIE certificate for non-residents doesn’t expire as a number, but some institutions may ask for a recently issued one.
Lost certificate or TIE: Report the loss to the police (denuncia) immediately. Then book a replacement appointment at the same type of office where the original was issued. Bring your passport, the police report, and any supporting documents. The NIE number stays the same; you’re just getting a new physical document.
Common problems and fixes:
- Name spelling mismatch: Spanish systems sometimes transliterate foreign names differently from your passport. If your NIE certificate shows a different spelling than your passport, get it corrected before signing any notary deed. A mismatch can freeze a property closing.
- Wrong number on official papers: If a bank or employer has recorded an incorrect NIE, request a correction in writing with a copy of your original certificate. Don’t let it sit.
- Appointment no-shows: Missing a cita previa without canceling can affect your ability to rebook quickly at some offices. Cancel online if your plans change.
- Provisional receipt as proof: If your appointment is complete but the certificate hasn’t been issued yet, the resguardo (receipt) from the police office is generally accepted as interim proof that the NIE has been applied for. Notaries and banks usually accept it for preliminary steps.
The TIE vs NIE distinction is worth keeping clear: EU citizens who move to Spain get a certificate of registration, not a TIE. Both contain the NIE number, but they’re different documents with different renewal processes.
Why NIE and NIF matter for buying property in Spain
Property transactions in Spain are where the NIE/NIF requirement becomes most urgent. The notary cannot complete the deed without a valid NIE for every buyer and seller. Banks won’t release mortgage funds without it. And the tax forms filed after closing, specifically ITP (Impuesto de Transmisiones Patrimoniales) for resale properties or AJD (Actos Jurídicos Documentados) for new builds, require the NIE/NIF on every line where a fiscal identifier appears.

As practitioner guidance confirms, property transactions are the most common context where a missing or delayed NIE causes a closing to fall apart at the last minute. The fix is simple but requires lead time: apply for the NIE as soon as you decide to buy, not after you’ve signed the arras agreement.
Buyer checklist for property transactions:
- Apply for your NIE as early as possible, ideally before or immediately after signing the preliminary purchase agreement.
- Confirm with your bank that your NIE is registered in their system before the mortgage approval stage.
- Check that your NIE appears consistently on all contracts, tax forms, and the notary deed. One digit wrong causes delays.
- If you’re a non-resident buyer, you may need a certificado de no residente for certain banking steps. Processing typically takes about one week and the certificate has a limited validity period.
- Coordinate with your notary on the exact format they require for your identification documents.
For more on what the notary expects at closing, the role of the notary in Spanish property transactions is worth reading before your appointment date. And for the full picture on taxes tied to the purchase, the property taxes guide for buyers covers ITP, AJD, and where your NIF appears on each form.
Steramflats works directly with buyers to coordinate document collection, schedule notary appointments, and flag NIE/NIF issues before they become closing problems. If a provisional NIF is needed because the NIE hasn’t arrived, the team knows which AEAT route to use and how to keep the transaction moving.
Pro Tip: Book your NIE appointment the same week you sign the arras. Appointment slots at coastal offices near Torremolinos and Málaga fill fast in spring and summer. A six-week wait for an appointment plus a one-week processing time means you need at least two months of runway before your target closing date.
What newcomers consistently get wrong about NIE and NIF
The single most expensive mistake is paying a gestoría or online service to “obtain a NIF” when the NIE you already have is already your NIF. As industry advisors note, this confusion is widespread and entirely avoidable. Before paying anyone for NIF-related services, log into the AEAT website and check whether your NIE is already registered in their system. It usually is.
The second most common error is confusing the NIE number with the TIE card. If someone asks for your “TIE” and you’re an EU citizen, your certificate of registration serves the same purpose. Don’t apply for a TIE you’re not entitled to.
Third: treating “CIF” on an old document as a different type of number requiring a separate application. CIF is just the old name for the company NIF. If you see it on a contract from 2010, it’s the same number the company uses today, now labeled NIF.
If you’re unsure whether your NIE is registered with AEAT, call the AEAT helpline or visit a local tax office with your NIE certificate and passport. They can confirm your fiscal status in minutes. For consular questions about NIF registration from abroad, the relevant consulate’s website (exteriores.gob.es) lists the specific documents and contact details for each country.
Steramflats has guided many international clients through exactly these steps, catching documentation issues before they delay a property closing.
Steramflats handles the document coordination so you don’t have to
Getting your NIE sorted, confirming it’s registered with AEAT, and making sure it appears correctly on every contract and deed is straightforward in theory. In practice, it’s the kind of task that stalls property transactions when left to the last minute or handled without local knowledge.

Steramflats offers hands-on support for international buyers and sellers in southern Spain: document collection and review, notary scheduling, bank introductions, and coordination with tax advisors when a provisional NIF or AEAT registration is needed. The team knows which offices move fastest, which documents each notary requires, and how to keep a closing on track when an NIE is still in process.
This is not legal or tax advice, and Steramflats works alongside qualified lawyers and gestores rather than replacing them. What the agency provides is the coordination layer that keeps all parties aligned and the paperwork moving.
Ready to buy or sell property in southern Spain without the documentation headaches? Explore Steramflats’ real estate services or check the foreign buyer guide to see exactly what the process looks like from offer to deed.
Sources
Use these official pages to act immediately, depending on your situation:
- Differences between the DNI, the NIE and the NIF
- Tax Identification Number (NIF)
- Interior
- Tax Identification Number (NIF)
- NIE vs NIF in Spain: what’s the difference?
This article is general information, not a substitute for advice from a qualified lawyer. Consult a qualified legal professional about your own circumstances before acting on anything here.

