NIE vs NIF in Spain
- @mtcspain
- 20 hours ago
- 4 min read
If you’re a foreigner in Spain, your NIE (Número de Identificación de Extranjero) is also your NIF (Número de Identificación Fiscal). Same number, different labels depending on the context: NIE in immigration/identity contexts and NIF in tax/financial contexts.
What is the NIE?
The NIE is the unique identification number Spain assigns to foreigners who have dealings in the country—working, studying, buying property, paying taxes, opening a bank account, registering utilities, etc.
Format: A leading letter (X, Y, or Z), 7 digits, and a trailing control letter.
Example: Y1234567A.
Who gets it: Any non-Spanish national who needs to interact with Spanish public bodies or businesses.
Does it expire? The number itself does not expire. Documents where it appears (like a residence card) can expire, but the NIE number remains the same.
Think of the NIE as your personal ID number in Spain—if you’re not a Spanish citizen.
What is the NIF?
The NIF is Spain’s tax identification number—the number used for fiscal purposes.
For Spanish citizens, the NIF matches their DNI (national ID).
For foreigners, the NIF is your NIE. Same string of characters; it’s just called NIF when the context is tax, invoices, payroll, banking, or social security.
If a tax form, invoice, or payroll system asks for your NIF, enter your NIE exactly as it appears.
So… are NIE and NIF the same?
Yes—functionally, for foreigners.
NIE = your identity number as a foreigner in Spain.
NIF = the tax label used on that same number.
You might see both terms used in the same process (e.g., a notary asks for your NIE while the bank system needs your NIF). Enter the same number.
Where you’ll use your NIE/NIF
Opening a bank account
Employment (contracts, payroll/withholding)
Self-employment (autónomos) registration and invoicing
Taxes (income tax, VAT, property tax)
Buying or selling property (at the notary, land registry)
Signing a rental contract
Registering utilities (electricity, water, internet)
Importing a vehicle or getting a driver’s license exchange
University enrollment and scholarships
Healthcare and Social Security affiliation
How to get an NIE (high-level guide)
You can obtain an NIE in Spain or through a Spanish consulate abroad. The exact procedure can vary by city/consulate, but the basics are:
Justify the need (e.g., job offer, property purchase, studies).
Fill out the form (commonly EX-15) and bring ID (passport).
Book an appointment (Spain often uses an online “cita previa” system).
Pay the fee (modelo 790 code 012).
Submit your paperwork at the police/immigration office or consulate.
Collect the resolution with your assigned NIE number.
Tip: The NIE number is not a residence permit. It’s an identifier. If you also get a TIE (Tarjeta de Identidad de Extranjero—your physical residence card), your NIE will appear on it, but the TIE card can expire while your NIE number remains.
Format & validation tips
Structure: X/Y/Z + 7 digits + letter (e.g., Z1234567K).
The final letter is a control character used for validation in Spanish systems.
Always copy it exactly (including the initial letter). Many forms reject it if you omit that first letter.
Common pitfalls (and how to avoid them)
“My bank asks for NIF but I only have NIE.”
Enter your NIE—that is your NIF for tax/banking.
Leaving out the first letter (X/Y/Z) on forms.
Don’t! It’s part of the number.
Confusing NIE with TIE.
The NIE is the number, the TIE is the physical residence card. Your NIE persists even if your TIE expires and is renewed.
Assuming it expires.
The NIE number does not expire. Documents may, the number doesn’t.
Invoicing without NIF.
Your NIF on invoices = your NIE. If you’re autónomo, make sure your name + NIE appear exactly and consistently.
For students, employees, and autónomos
Students: Many universities, banks, and landlords will ask for the NIE early on. Start the process as soon as you have an admission or housing commitment.
Employees: Your employer will need your NIF (NIE) for payroll and Social Security registration.
Autónomos (self-employed): You’ll use your NIE as NIF to register for tax (and Social Security), issue invoices, and file returns. If you register for VAT (IVA), it’s still the same number.
Digital identity and online services
Spain’s e-government services (tax agency, social security, health) often require secure login via Cl@ve or a digital certificate.
Your NIE is the identifier behind those credentials when you’re a foreigner.
Companies and other entity numbers (quick note)
Individuals (Spanish or foreign): use DNI/NIE as NIF.
Companies and other legal entities: have separate entity NIFs (starting with letters like B, C, G, etc.). This is different from personal NIE/NIF.
FAQs
1) I’m a foreigner who only needs to buy a property—do I still need an NIE?
Yes. Notaries and registries will require it, and you’ll need it for taxes and utilities.
2) Can I work without an NIE?
In practice, no—employers need your NIF (NIE) for payroll and social security.
3) My TIE expired. Is my NIE still valid?
Yes, the number is still valid. Renew your TIE if required for your status.
4) The form only shows “NIF” with no “NIE” option. What do I put?
Enter your NIE. For foreigners, NIF = NIE.
5) Does the initial letter (X/Y/Z) matter?
Absolutely. It’s part of the number and required for validation.
Bottom line
If you’re not a Spanish citizen, your NIE is your NIF. Use the same number:
NIE when dealing with identity/immigration matters.
NIF when dealing with taxes, banks, invoices, payroll, and most official forms.
Keep the format intact (including the first letter), and you’ll be set for virtually all administrative and financial procedures in Spain.
Comments