Updated 2026 · Published by e-residency (Happy Residence S.L.)

NIE vs NIF: What’s the Difference?

Key facts
  • 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

  • NIENúmero de Identificación de Extranjero. Identifies any foreigner in Spain.
  • NIFNú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/entityIdentification numberFiscal number (NIF)
ForeignerNIEThe NIE (same number)
Spanish citizenDNIThe DNI number
CompanyCompany 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?
For foreigners, yes — your NIE is used as your NIF for all tax purposes.
Do I need to apply for a NIF separately?
No. If you have a NIE, it already serves as your NIF.
What is a company’s NIF?
A company has its own fiscal number (historically the CIF, now also termed NIF), different from an individual’s NIE.

Related

Sources

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.