What is the NIF for foreigners and how to get it?
Patrick Gordinne Perez2025-02-16T10:36:20+00:00The Tax Identification Number (TNIF) for foreigners is a fundamental code to identify non-national persons and entities in Spain.
This number is necessary to carry out tax and administrative procedures in the country. There are different types of NIF, depending on the applicant’s situation.
Knowing the difference between the NIF and the NIE is key to understanding their importance in commercial transactions and tax obligations in Spain.
Definition and Purpose of the NIF for Foreigners
The NIF for foreigners is a key element in the Spanish tax system.
Its main purpose is to identify those individuals and non-national entities that carry out economic activities in Spain.
Difference between NIF and NIE
The NIF and the NIE are different identifiers, although they are often confused by their functions in the tax field. But in individuals the NIE and the NIF are the same number.
The main differences include:
NIE (Foreigner Identity Number):
It is a personal number that identifies foreigners who reside in the country.
It is mandatory for those who have economic, professional or social interests.
NIF (Tax Identification Number):
This number identifies persons and entities for tax purposes.
It may be required by foreigners who do not reside in Spain to carry out operations that generate tax obligations.
Importance of the NIF for Foreigners
The relevance of the NIF lies in its essential function in the fulfilment of tax obligations.
For foreigners operating in Spain, the NIF allows you to carry out various economic activities, including:
- Submit tax returns.
- Have an economic activity
- Open bank accounts.
- Make labour contracts.
- Carry out commercial transactions.
- Go to college
Without this number, foreigners would face difficulties accessing services and fulfilling their tax responsibility in the country.
Thus, the NIF becomes a bridge that allows them to integrate into the Spanish economic system.
When the foreign natural person has an NIE, that number is also their NIF.
That is, the NIE is equal to the NIF.
The NIE number usually starts with X, Y or Z.
Types of NIF for Foreigners
As we have said before, if the person has NIE is the NIE number is his NIF number or VAT number if he has any economic activity.
But what happens if the foreigner does not have an NIE?
There are times that for reasons of urgency, and because you can’t get appointments at the police to get the NIE, it is necessary to go to the treasury and request the NIF.
This measure is temporary, because individuals need a NIE early.
In fact, later it can give rise to confusion.
The same does not happen for foreign companies, these companies need to ask for a NIF yes or yes.
The NIF types for foreigners are classified according to certain criteria that reflect the situation of each applicant.
These codes allow the correct identification of individuals and entities for tax purposes in Spain.
NIF type ‘L’
The NIF type ‘L’ is granted to Spaniards who live abroad and who are not required to have an ID. This type of NIF is necessary so that they can carry out tax activities in Spain, such as filing tax returns, buying houses or making investments. Logically, if they have an ID, that ID serves as a NIF as it happens with Spanish residents.
NIF type ‘M’
The NIF type ‘M’ is intended for individuals without Spanish nationality who do not have the NIE. It is considered transitional for those who are obliged to obtain an NIE and definitive for those who are not subject to this obligation. This ensures that these people can fulfil their tax responsibilities.
NIF type ‘N’
The NIF type ‘N’ is assigned to legal entities or companies not established or incorporated in Spain and non-resident entities in Spain that do not have a permanent establishment in the country. This number allows them to operate and fulfil their tax obligations in Spain, facilitating the identification of entities that carry out economic activities on Spanish soil
NIF type ‘W’
The NIF type ‘N’ is assigned to legal entities and non-resident entities in Spain that have a permanent establishment in the country. This number allows them to operate and fulfil their tax obligations in Spain, facilitating the identification of entities that carry out economic activities on Spanish soil
Remember that the NIF number is the VAT number
You may be interested in this article about the NIE

EVERYTHING you need to know about the NIE number : (Foreigners’ Identification Number)
Patrick Gordinne Perez2025-02-16T05:22:34+00:00The Foreigner Identification Number, known as NIE number, is an identification document required for foreigners...
NIF Application Procedure
The procedure to apply for the NIF is essential to be able to carry out tax activities in Spain.
Obtaining this number may vary depending on whether the applicant is a natural or legal person, and whether or not he has an NIE.
Required Documentation
To carry out the request, it is essential to present the corresponding documentation depending on the type of applicant.
Documents for Individuals
- Form 030, duly completed.
- Photocopy of the passport or identity document of the country of origin.
- Proof that accredits the tax operation that is going to be carried out.
Documents for Legal Entities
- Certification of the existence of the entity, issued by the tax or registration authority of the country of origin.
- Information about the company name, tax address and other relevant data.
Steps to Apply for the NIF
The application process can be done in person or online, depending on the case.
Application with NIE
If the applicant already has an NIE, the NIF will be automatically assigned as the same number.
I always say that the tax agency is almost like Google that knows, almost everything but it is not a fortune teller and you have to report that NIE so that it is enabled as a NIF.
How do you inform the NIE tax agency?
Through the link Registration in census of natural persons with DNI or NIE by Collaborators
We repeat once again, if you do not have a digital certificate these links will not work
Request without NIE
For those who are not required to have an NIE, they must present the Model 030 and the documentation that justifies their status. This step is crucial to ensure the correct identification of the applicant in the Spanish tax system.
Online NIF request
A long time ago you could only apply for and obtain the NIF by going in person to the offices of the tax agency, but now it can be done online and without travelling.
Of course, it is necessary to have a digital certificate, and logically if you do not have a NIF you will not have a digital certificate.
That is why companies like Asesoria Orihuela Costa is authorised by the Spanish tax agency as a social partner to request your NIF and request it on your behalf.
This is the general link to submit the 030 form of the tax agency.
This link allows you to have access to all the modalities of the 030.
To apply for the NIF in any of its modalities, first you have to make a zero 30 in PDF AND present it along with all the documentation in the link of the tax agency Application for NIF of natural person, without DNI / NIE, not in person.
Use and Applications of the NIF
The NIF is a key document in the tax and administrative interactions of foreigners in Spain.
Its use covers various obligations and procedures necessary to ensure compliance with tax regulations.
Associated Tax Obligations
Having a NIF implies complying with several tax obligations that are essential to avoid legal complications.
Some important aspects include:
- Tax return:
All taxpayers must submit their tax returns associated with the NIF.
- Tax withholdings:
Entities have the responsibility to apply withholdings when appropriate.
- Communication of operations:
It will be necessary to inform the Tax Agency about certain transactions.
Relevant Administrative Procedures
The NIF facilitates the realisation of various administrative procedures. Some of the most common are:
- Opening bank accounts: It is an indispensable requirement to access financial services.
- Labour contract: Every foreigner who wishes to work in Spain needs their NIF to formalise contracts.
- Start of business activities: Those who wish to undertake must have a NIF to legally register.
- Buy a house
- Buy a car
Consequences of NOT Obtaining a NIF
Not having a NIF can lead to various complications for foreigners in Spain.
The lack of this tax identification number prevents numerous financial transactions and can lead to significant legal and tax problems.
Limitations on Financial Services
The absence of a NIF restricts access to several essential financial services. Some of the inconveniences include:
- Impossibility to open bank accounts.
- Difficulties in obtaining credits or loans.
- Limitations in the contracting of insurance.
- Lack of access to investment services.
These restrictions can affect both individuals and entities, making it difficult to manage their finances on Spanish soil.
Possible Tax Sanctions
Failure to obtain a NIF may also result in administrative penalties. The consequences can be severe, including:
- Financial fines for tax non-compliance.
- Attachments of goods or bank accounts.
- Legal problems that may arise due to the lack of proper identification.
This situation can have long-term consequences, affecting the reputation and ability to operate legally in the country.
In the sale of real estate it is mandatory to have a NIF if for any circumstance it has not been possible to obtain the NIE or the NIF in the tax agency the notary usually allows signing the sale with the request of the appointment for the NIE.