NIE vs NIF: What’s the Difference?
- NIE = foreigner identification number. NIF = fiscal (tax) identification number.
- For a foreigner, the NIF is the NIE — the same number used for tax.
- For Spanish citizens, the NIF is their DNI number.
- Companies have a different fiscal code (historically the CIF, now also called NIF).
For foreigners, the NIE and the NIF are the same number used in two roles. The NIE identifies you as a foreigner; the NIF is that same number acting as your tax ID. You do not apply for them separately. See the full picture in our Spanish IDs comparison.
Roles, not two numbers
- NIE — Número de Identificación de Extranjero. Identifies any foreigner in Spain.
- NIF — Número de Identificación Fiscal. Used for taxes, invoices and contracts.
When a foreigner pays tax, signs a deed or issues an invoice, the number used is their NIE acting as the NIF. There is no separate “NIF application” for someone who already holds a NIE.
Who has which?
| Person/entity | Identification number | Fiscal number (NIF) |
|---|---|---|
| Foreigner | NIE | The NIE (same number) |
| Spanish citizen | DNI | The DNI number |
| Company | — | Company NIF (formerly CIF) |
When does the NIF label appear separately?
Mostly in tax contexts — Hacienda forms, invoices, or registering as self-employed. The number itself is still your NIE. See also is the NIE a card? NIE vs TIE. No NIE yet? That single number covers both roles — get your NIE online.
Frequently asked questions
Is the NIE the same as the NIF?
Do I need to apply for a NIF separately?
What is a company’s NIF?
Related
Sources
- Ministerio de Asuntos Exteriores — NIE: exteriores.gob.es
- Dirección General de la Policía: sede.policia.gob.es
e-residency is operated by Happy Residence S.L. (Málaga, License 62802L). We are a private firm and not a public administration; we do not issue official documents. Accurate as of 2026.