Moving in Spain
OUR EXPERT
Brenda L.

Written by

Brenda.L

After completing her higher education, Brenda joined AnchorLess in 2023. She is an expert on relocation issues in Europe.
WHY YOU CAN TRUST ANCHORLESS
+10,000
Expats guided
1194

reviews noted 4.9/5

NIF
Spain
24/04/2026

NIF Spain: Application Guide & Differences

NIF Spain document guide

The NIF in Spain is the tax identification number used for tax purposes and official dealings with the Spanish tax administration. For Spanish citizens, the NIF usually matches the DNI. For most foreign individuals, it usually matches the NIE. If a foreigner needs a tax ID before having a NIE, Spain may assign a temporary NIF M. Companies and other legal entities also need a NIF to operate and comply with tax rules in Spain.

If you are moving to Spain, buying property, starting a business, signing certain contracts, or handling other tax-related formalities, understanding the NIF number in Spain is one of the first practical steps. And it is also one of the most misunderstood.

A lot of people search for “how to apply for a NIF” when what they actually need is a NIE, or they hear the old term CIF and assume it still works as a separate number. In reality, Spain’s system is more specific than that. The right route depends on whether you are a natural person or a legal person, whether you are Spanish or foreign, and whether you are acting as an individual, a company, or a representative.

This guide breaks it down clearly.

What is the NIF in Spain?

The NIF, or Número de Identificación Fiscal, is Spain’s official tax identification number. It is the number used by the tax authorities to identify individuals and entities for tax purposes.

In simple terms, the NIF is the number that connects you to the Spanish tax administration. It appears in tax filings, official registrations, and many procedures that have tax significance.

For most people, the NIF is not an extra number issued on top of everything else.

For Spanish citizens

For Spanish citizens, the NIF usually corresponds to the DNI.

For foreign individuals

For most foreign individuals, the NIF usually corresponds to the NIE, which is the foreign identity number used in Spain.

For special cases

If a foreigner needs to carry out a tax-related operation in Spain but does not yet have a NIE, the Spanish Tax Agency may assign a NIF M.

For companies and entities

If the applicant is a legal person, such as a company or another entity, the NIF is the tax number assigned to that entity for its official and tax-related activity in Spain.

Who needs a NIF in Spain?

Anyone who will be involved in a transaction or relationship with tax relevance in Spain may need a NIF.

That includes:

Spanish citizens

A Spanish citizen usually uses their DNI as their tax identification number.

Foreign individuals

Foreign individuals may need a NIF in Spain when they buy property, receive income, invest, act as legal representatives, or carry out another operation with tax implications. In many of these cases, the practical route is through the NIE.

Legal persons

A legal person, such as a company, foundation, or certain other entities, needs a NIF to operate before the tax authorities and complete tax registrations and filings.

Foreign companies

Foreign companies that will carry out operations with tax significance in Spain may also need a Spanish NIF.

So when people ask who needs a NIF in Spain, the answer is broad: natural persons, legal persons, Spanish citizens, foreign individuals, and foreign companies can all need one depending on the activity they plan to carry out.

NIF vs CIF: what is the difference?

This is one of the most common questions.

The difference between NIF and CIF is mostly a matter of terminology.

Years ago, CIF was the term commonly used for the tax identification code of companies. Today, the official term used in current Spanish tax procedures is NIF.

So if you see searches for:

  • difference between NIF and CIF
  • NIF vs CIF
  • CIF number
  • NIF number

the practical answer is this:

  • NIF is the current official term
  • CIF is an older term that many people still use informally when talking about a company tax number

In current official practice, both individuals and entities use the concept of NIF, even though many people still say “CIF” in everyday conversation.

NIF Spain model document

How to apply for a NIF in Spain

The answer depends on who is applying and why.

There is no single route for every case. The right NIF application path changes based on whether the applicant is an individual, a foreigner, a company, or a representative.

How to apply as an individual

For an individual who does not have a DNI or NIE and needs a tax ID, the Spanish Tax Agency uses Form 030 in certain cases.

This usually applies to individuals who need the number for tax purposes but are not supposed to register as business owners, professionals, or withholding agents.

How to apply as a company or entity

For a company or other legal entity, the standard application form is Form 036.

This is the form generally used when a legal person or entity needs to request a NIF or register in the relevant tax census.

Who can submit the application

In some cases, the application can be submitted by the interested party directly. In other cases, a representative may do it. For some entity filings, a presenter can also file the form.

That is why the question is not only how to apply for a NIF, but also who can do it. The person who files may be the applicant, a legal representative, or another presenter allowed by the procedure.

How to obtain a NIF for foreigners

If you are trying to obtain a NIF in Spain as a foreigner, the first thing to understand is that many foreigners do not apply for a separate “general NIF” first.

Instead, they usually end up using the NIE as their tax identification number in Spain.

This is why so many international applicants get confused. They search how to obtain a nif, but in practice, the route often starts with the NIE.

When a foreigner may receive a NIF M

A foreigner may be assigned a NIF M when they need to carry out a tax-related operation in Spain but do not yet have a NIE.

This can happen, for example, when a person needs to appear in a tax procedure, property process, or another transaction with tax significance before their NIE is available.

For foreign companies

The route is different for foreign companies. They may need a Spanish NIF as a non-resident entity, and the application normally goes through the Tax Agency with the appropriate entity documentation.

What documents are needed for NIF?

The documents you need depend on the type of applicant.

Still, the most common supporting documents usually fall into a few clear categories.

Proof of identity

You will generally need proof of identity, such as a valid passport or another valid identification document.

Supporting civil documentation in some cases

For some special individual applications, a birth certificate or family record may be required, especially in cases involving minors or specific personal-status situations.

Proof tied to the reason for the request

You may also need documents showing why the NIF is needed. That can include paperwork connected to a property purchase, a contract, an incorporation, an investment, or another tax-relevant operation.

Entity documents for companies

If the applicant is a company or other legal entity, the file usually includes incorporation documents, bylaws, registration records where applicable, and representative details.

Foreign documents

If the documents come from abroad, they may need official translation into Spanish or another official language of Spain, plus legalization or Hague apostille depending on the country and the document.

Where to apply for a NIF?

This is another area where the answer depends on the case.

If you are wondering where to apply for a NIF, you may need a cita previa and the most common places are:

Agencia Tributaria

The Agencia Tributaria is the central authority for most NIF procedures involving tax registration and assignment.

Tax office

A local tax office may be involved depending on the procedure and the filing channel available.

Consular office

A Spanish consular office abroad can handle some NIF assignments, especially for certain individuals and foreign entities applying from outside Spain.

Police station

A police station is usually more relevant for the NIE route than for standard NIF assignment. For many foreigners, that is where the practical identity process begins.

Local office

Depending on the procedure, the application may pass through a local administrative office linked to the Tax Agency or the foreigner identification process.

What are the tax obligations with NIF?

The NIF itself is not a tax. It is the identifier that allows the tax administration to connect the taxpayer or entity to the correct obligations.

Those tax obligations depend on the person or company’s actual situation.

That may include:

  • registration with the tax administration
  • filing tax returns
  • acting for tax purposes as a resident or non-resident taxpayer
  • registering business activity
  • fulfilling corporate tax, income tax, VAT, or withholding obligations where applicable

In other words, the NIF does not create the obligation by itself. But without it, Spain’s tax authorities cannot properly identify the person or entity responsible for those obligations.

Step by step: how to get a NIF in Spain

Here is the cleanest way to think about the process.

Step 1: identify the right type of applicant

Start by identifying whether the applicant is:

  • a Spanish citizen
  • a foreign individual
  • a company or other legal person
  • a foreign company
  • a representative acting on behalf of another person or entity

This matters because the route is different for each one.

Step 2: check whether you really need a NIF or a NIE

For many foreigners, the practical answer is that the NIE becomes the relevant identifier. Do not assume that every foreign applicant needs a separate standalone NIF first.

Step 3: gather the documents you need

Prepare your proof of identity, valid passport, identification document, and any supporting documents connected to the transaction or registration you are carrying out.

If the case involves a company, prepare the corporate documentation as well.

Step 4: choose the right form

Use the correct application form for the situation.

  • Form 030 is used for certain individual applications
  • Form 036 is the key form for companies, entities, and many tax census procedures

Step 5: submit through the correct authority

Depending on the case, submit through:

  • the Agencia Tributaria
  • a local tax office
  • a Spanish consular office
  • or, if the identity route is through the foreigner process, the relevant police station or foreigner office for NIE matters

Step 6: keep the confirmation and update data later if needed

If your number later changes because you obtain a DNI or NIE after first receiving another tax identifier, you may need to update that information with the tax administration.

Key Takeaways

The NIF number in Spain is simple once you strip away the jargon.

It is the Spanish tax identification number used by the tax administration to identify individuals and entities. For Spanish citizens, it usually matches the DNI. For most foreign individuals, it usually matches the NIE. For special foreign cases, a NIF M may be assigned. For companies and other entities, the NIF is obtained through the entity registration route, usually using Form 036.

So if you are asking what the NIF is, who can apply, what documents are needed, how to apply, where to apply, and what the difference is between NIF and CIF, the most important thing is this: the right path depends on whether you are an individual or an entity, and whether you are dealing with Spain as a citizen, a foreign resident, a non-resident, or a company.

Share this article

Share this article

Join a community of 10,000+ expats
Get the weekly tips, success stories, and step-by-step guides we share with our members to make their move a success.
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
I love AnchorLess! They have been fantastic for my move to Portugal with the NIF, checking account, lawyer and tax consultation. I will be happy with when this process is over, but at least the journey has been smoother with them.
LD
Lisa D
From South Africa
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
Star Trustpilot
Guilherme was the best! I had so many questions and moving parts and he was responsive, always professional, and went above and beyond to help me with everything! He is a PRO!!!!
DS
Debra Savage
From The United States

Our readers also viewed

psain dni expat support number
Spain
NIE Documents
24/04/2026
Confused by Spain’s número de soporte? Learn what it is, where to find it on a TIE, EU registration ...
Brenda
Brenda
Content Manager
eu family member card
Tarjeta
Residencia
01/04/2026
Get your EU Family Member Residence Card in Spain. Step-by-step application guide: documentation, fi...
Brenda
Brenda
Content Manager

More than a blog, an ecosystem

AnchorLess team
Webinars Hub

Join our free webinars and get concrete answers to your most pressing relocation questions.

conversation

Community

Connect with thousands of current and future expats. You're not alone on this journey.

AnchorLess partner

Partners

Insurance, housing: we've hand-picked and vetted the best services, so you don't have to.

Beach Portugal

Start your new life in Europe

Turn relocation stress into success with AnchorLess.

Relocating to Europe made simple.

Start to relocate now

Arrow icon
Talk to us for free
AnchorLess support team
4.9/5 Excellent
Star
Star
Star
Star
Star
Logo AnchorLess

AnchorLess is not a bank, accountant, tax advisor, investment advisor, or law firm, nor are we a government or official government website. We act as an intermediary, helping connect you with accredited professionals and streamlining administrative processes for your relocation in Europe.

Instagram icon
Facebook icon
Reddit icon
Linkedin icon
Amex logo
Visa logo
Mastercard logo
& more
Pay 4X free of charge with
Klarna logo

🇵🇹 MOVE TO PORTUGAL

Arrow

🇪🇸 MOVE TO SPAIN

Arrow

Resources

Terms and conditions

Privacy Policy

Disclaimer Policy

© 2022 - 2026 anchorless.io, all rights reserved.