Practical info: what is the NIF (Numéro d'Identification Fiscale) and how to obtain it? 

Table of Contents

Introduction

The NIF (Tax Identification Number) is the key tax number for all dealings with the Spanish Treasury (Agencia Tributaria). It should not be confused with the NIE (Identification Number for Foreigners) or the DNI (Spanish National Identity Document).

What is the NIF used for? 

Each country has its own tax identification system. In Spain, this system is based on the NIF. 

This unique identifier is assigned : 

  • Spanish and foreign individuals.
  • Legal entities and companies

For what types of activity do I need a NIF? 

You'll need a NIF for all your tax and financial activities in Spain

  • The tax return ;
  • Invoicing;
  • Banking and financial transactions ; 
  • Social security contributions ;
  • And all other tax procedures in Spain. 

Good to know: you can obtain a NIF without a DNI(Documento Nacional de Identidad) and without a NIE, the famous Identification Number for Foreigners

What are the general characteristics of NIF? 

Format 

The NIF is a 9-character alphanumeric code that differs according to the applicant's situation

  • For Spanish individuals: 8 digits + 1 letter.
  • For foreigners: 1 letter (X, Y, Z) + 7 digits + 1 letter.
  • For legal entities: 1 letter identifying the legal form + 7 digits + 1 control character (this can be a letter or a number).

What is the CIF? 

The CIF is the Tax Identification Code for Spanish companies. It was replaced by the NIF in 2008. 

The 3 types of NIF

1- NIF for individuals

  • For Spaniards with a DNI, the NIF corresponds to the DNI (but is used exclusively for tax purposes).
  • For foreigners with NIE, the NIF corresponds to the NIE.
  • There are some special cases: we have listed them in the table below. 
KMinors under the age of 14, Spaniards resident in Spain
LNon-resident Spaniards of any age, not required to have a DNI
MForeigners without an NIE

2 - NIF for legal entities

The NIF starts with a letter indicating the company's legal form + 7 digits + a control character (letter or number).

LetterStructure type
ASA (Société Anonyme)
BSL (Limited Liability Company)
CGroup companies
DLimited partnership 
ECommunity of property
FCooperatives
GAssociations
HCondominiums
JCivil companies
NNon-resident entities
PLocal entities
QPublic bodies
RReligious institutions
SAdministrations
UTemporary joint ventures 
VOther entities
WPermanent establishments of foreign companies

3 - Intra-Community NIF (NIF-IVA)

To carry out transactions within the European Union, you'll need to use the NIF-IVA, the intra-Community VAT number

  • It consists of the letters ES (for Spain) and your NIF.

It allows you to issue and receive VAT-exempt invoices. 

How to obtain a TIN

For non-commercial individuals: modelo 030

Two scenarios for individuals

  • If you already have a DNI or NIE, you don't need to do anything: your NIF is identical.
  • Otherwise, or if you need to change your tax situation, use form 030. 

Note that having a NIF is essential if you are buying a rental property in Spain, as you will have to declare taxes locally, even if you live abroad (IRNR).

How to proceed 

  1. Access the Agencia Tributaria website and complete the process online.
  2. Complete form 030 and provide the required documents.
  3. List of required documents
  • Valid passport or identity card.
  • Proof of residence.
  • Copy of family record book or birth certificate for minors, and parents' passport or identity card (same for guardians).
  • If the application is made by a representative: the representative's identity papers and power of attorney. It must be notarized, apostilled and translated by an official translator.

You can also generate the PDF, print it out in duplicate, sign it and send it by post to AEAT or the consulate. You can also make an appointment on site. 

  • Please note: the PDF version is considered a draft until it has been submitted to AEAT. It is valid for 1 month.
  • You will receive your NIF automatically by e-mail once your request has been validated by AEAT. There is no official deadline.

For legal entities, modelo 036

In 2025, the modelo 036 was thoroughly redesigned and simplified. 

Until now, there has been a slightly different version, modelo 037. Legal entities had to complete one or the other, depending on their situation. To simplify the process, the tax authorities have abolished modelo 037. 

Case scenarios for legal entities

  • If you're starting up a business, real estate company, association or any other type of structure, you'll need to register it with the tax authorities using form 036.
  • If you declare yourself self-employed(autónomo), your DNI or NIE automatically becomes your NIF. However, you must register with the tax authorities using the same form. 
  • If you are a foreigner without an NIE, you must first obtain an NIE

Please note the deadline : if you have just set up a company, you must apply to the Agencia Tributaria for your NIF within one month

How to proceed 

  1. If you have a certificado digital or the cl@ve digital identification system, you can apply directly online on the Agencia Tributaria website via the modelo 036 : "solicitud de asignacion de NIF de entidad, no presencial". 
  2. If you do not have digital identification :
  • An authorized representative can do this for you online (a gestor, for example).
  • You can also fill in the modelo 036 : "Cumplimentación, validación y obtención en PDF para su impresión". You will then need to generate a PDF and print it (in 2 copies) to present it in hard copy to the AEAT office along with the necessary documents.
  1. List of documents to be provided: they depend on the legal form of the entity you are registering, but as a general rule, you will be asked for : 
  • Signatory's passport or identity card.
  • Proof of representative's NIF or NIE.
  • Copy of the notarial deed of incorporation(escritura pública).
  • Company bylaws.
  • Certificate of registration in the public register.  
  • Proof of residence. 
  • Power of attorney, if required. 
  • Please note: the PDF remains a draft until submitted to AEAT. It is valid for 1 month. 
  • The NIF is sent to you by e-mail as soon as your request has been validated.

The legal entity will not be able to obtain a TIN if the legal representative or partners do not themselves have a TIN. 

Good to know: recently, a new process to easily fill in the modelo 036 with the help of AI has been introduced to obtain your NIF online. It's called Censos web

Watch the video here: https: //youtu.be/8d-KqZ9c3_g DIRECTLY ON OUR PAGE

In practice : 

  • For a face-to-face deposit, make an appointment online on the AEAT website via the heading Asistencia y Cita or by telephone: +34 91 290 13 40 or +34 901 200 351.
  • Foreign documents must be translated and apostilled.

Official resources 

Back to top