ES - NIF vs NIE: What's the Difference?

ES - NIF vs NIE: What's the Difference?

Overview

NIF is the umbrella term for Spain's tax identification number — everyone who has tax dealings in Spain needs one, whether they're a Spanish citizen, a foreign individual, or a company.

NIE is a specific type of number issued only to foreign individuals. For a foreign individual, the NIE simply becomes their NIF — there's no separate application. Companies never have an NIE; they're issued their own distinct NIF.

Think of NIF as the category, and NIE as one of the ways an individual can arrive at their personal tax number.

Quick comparison

 

NIE

NIF

What it is

Foreigner Identity Number — a unique ID for non-Spanish individuals

Tax Identification Number — the general fiscal ID for tax-relevant activity

Who it's for

Foreign individuals only — never companies

Everyone: Spanish citizens, foreign individuals, and companies

Issued by

The National Police (or Spanish consulates abroad)

The Spanish Tax Agency (AEAT)

Format

A letter (X, Y, or Z) + 7 digits + a check letter, e.g. X1234567A

Varies by holder type — see below

 

How they fit together by holder type

      Spanish citizens: their NIF is simply their DNI number (national ID card) — no separate application needed

      Foreign individuals: their NIE automatically serves as their NIF — again, no separate NIF application. There are not two processes to go through, just the one NIE application

      Companies (Spanish or foreign): issued their own distinct NIF, unrelated to any individual's NIE. Spanish companies get an NIF starting with a letter denoting legal form (e.g. B for a private limited company). Foreign companies are issued an NIF starting with the letter N

How each is obtained

NIE (individuals only)

      In Spain: applied for at a foreigners' office or National Police station, in person or through a legal representative

      From abroad: applied for at a Spanish consulate or embassy in the applicant's country of residence

      Requires Form EX-15, a valid passport, and a stated reason for the application (e.g. property purchase, job offer)

NIF

      Spanish citizens: automatic — it's their existing DNI number

      Foreign individuals: automatic once they have an NIE — no extra step required

      Companies: applied for directly with the Spanish Tax Agency (AEAT) using Form Modelo 036, typically submitted by a representative under a notarised, apostilled Power of Attorney — no need for a director to travel to Spain

A provisional NIF starting with the letter "M" can also be issued quickly by the Tax Agency for urgent tax filings if an individual's NIE application is delayed. This is a temporary stopgap for individuals only, not something a company would use.

Why this matters for foreign companies

If your business is registering in Spain for something like VAT or EPR (Extended Producer Responsibility), you'll be dealing with the company NIF route through the AEAT — not the NIE route. An NIE is only relevant if an individual (for example, a director buying Spanish property personally, or relocating to Spain) needs to be identified in their own right.

The two shouldn't be mixed up on official paperwork: a company's invoices and tax filings must show the company's own NIF, not the personal NIE of a director or representative.