Documents

NIF and NIE: What's the difference and what's NIF

NIF and NIE differ in purpose: NIF (número de identificación fiscal) - tax number, NIE - alien number. They are identical, so if NIE is available, a separate NIF is not needed.

Information material, not individual legal opinion: Prepared using IE; checked by a subject matter specialist before publication has not yet been completed; conditions apply to a particular situation and may change.
Short
  • The alien's NIF and NIE match.:: The tax number is NIE (art. 20 of RD 1065/2007). [1].
  • NIF The obligation to have it is set out in article 18 of the same regulations. [1].
  • If a tax transaction is needed and NIE is not available, AEAT assigns a temporary NIF of nine signs with the letter M. It operates until the receipt of the NIE, the new number is reported within two months. [1].
  • NIE is automatically assigned in the migration procedure or on application (EX15 form, modelo 790 código 012, 5 days, silence means refusal) [2][3].
  • NIE is the number, TIE is the card, permission is the agency's own decision, and the receipt of NIE does not give you the right to live or work in Spain. [2][4].

What is NIF?

The NIF (número de identificación fiscal) is the number by which the Spanish tax administration sees a person or company. It is needed in all tax matters: declaration, tax records, transactions. The duty to have NIF and how to confirm it is set out in article 18 of the Tax Regulations (Real Decreto 1065/2007): it is supported by a tax service document, DNI document or a document in which the tax authority has the right to a tax certificate. NIE [1].

How does NIF differ from NIE and TIE?

These are three different things: tax number, alien identity number, and card.

WhatWhat is it?What for?
NIFTax number; foreign national is NIE [1]Taxes and transactions
NIEnúmero de identidad de extranjero: the only alien's personal number, assigned to the Dirección General de la Policía [2]Identification in all procedures and documents
TIETarjeta de identidad de extranjero: card documenting the authorization issued; application shall be submitted in person within one month if the permit is valid for more than six months [2]confirmation of status in Spain

The number of NIE is listed on all documents issued to the alien, but neither NIE nor NIF confirm the right to reside and work [2]I. More detailed information on the card and authorization: NIE, TIE and residence permit: What's the differenceThe procedure for obtaining a number in Barcelona is described in the article NIE in Barcelona.

What's the NIF for a foreigner?

The NIF is the number of the NIE that was assigned to him or given under the Aliens Act. [1]If the NIE is not yet available and the tax operation is needed, the person asks for a tax number, which consists of nine characters: letter M, seven alphanumeric marks and a control letter. [1].

This number works until you get the NIE. Then you have to give the new number to the tax office and to those you've given the old one within two months. [1]A separate NIF does not need to be "just in case": it is not required if there is a NIE.

How do you get a NIE?

In two ways: automatically or by application: automatically, the NIE assigns the Dirección General de la Policia to those whose application for a stay document has been initiated and to those who are subject to the Aliens Act, only for visas that allow for more than 90 days in Spain. [2].

According to the NIE application, those who are in Spain are asking for economic, professional or social interests, and the conditions are: you are not in Spain illegally and explain the reasons why. (EX15) the applicant himself submits the application to the police, through the ocina de extrandjería or the police station, and from abroad through the consulate. [2][3]The decision period of five days from entry into the register, if silent, is considered rejected; appeal can be made within a month or in court within two months [3]The amount of the duty is not called here: it is indexed, you can see the form on the police website (detail: What a modelo 790The figures are summarized in the article How much is Nie).

What's the NIF company?

The NIF is separate from the NIF: the tax assigns it to companies and it does not change when the statutes change until the legal form or nationality has changed. [1]The company number and the NIE owner are different numbers, they can't be set up instead.

If you move and you choose the basis for the residence permit, the number NIE will appear during the procedure: the procedure for different grounds is collected on the page Residence permit in Barcelonaand the preparation of documents describes Document services.

Frequent issues

How does the NIF differ from the NIE?
The NIF is a tax number, the NIE is a foreign national number for migration and other procedures, and the alien has a match: the NIF is equal to NIE (art. 20 RD 1065/2007). The difference in assignment is not in numbers: NIE also indicates in the permit and in TIE, while the NIF needs the tax service for declarations and transactions. [1][2]
Do you need a separate NIF if I already have a NIE?
No, the tax number for an alien is NIE. A separate temporary number with the letter M is given only to those who do not have NIE and who need a tax operation. When the NIE comes, the new number is reported to the tax office and to those who are referred to by the old one within two months. [1]
What is NIF with the letter M?
Temporary tax number for a foreigner without NIE: 9 digits, first letter M. It operates until the person receives NIE; the new number is then communicated to the tax service within two months (arts. 20 and 21 RD 1065/2007). If both numbers have been issued, the priority is with NIE. [1]
Can you get a NIE without a residence permit?
Yes, if you are connected with Spain by economic, professional or social interests, you are not in the country illegally and you give reasons (art. 205 of Regulation 1155/2024). [2][3]
How many days are the applications for NIE?
At least five days from the receipt of the application to the register. If no reply is received, the application is rejected: silence means refusal, not consent. Appeal: reposición within a month or court within two days. How many applications are processed in practice depends on the police, and the department's page does not promise them. [3]

Based on source

  1. BOE · Real Decreto 1065/2007, articles 18 - 22 (número de identificación fiscal)
  2. BOE · Real Decreto 1155/2024, articles 205 and 209 (NIE and tarjeta de identidad de extranjero) ♪
  3. Policía Nacional, sede electrónica · Asignación de NIE a instancia de interesado (formulario EX15) ↗
  4. Policía Nacional, sede electrónica · Tarjeta inicial o renovación de residencia (formulario EX17) ↗

Sources are viewed on 02.10.2026. Consolidated texts and departmental reference pages are informative: legal application takes into account official publications, changes and specific circumstances. Material has not been personally checked by counsel.

Turn the information into questions.

The navigator will help to gather topics for individual review; it does not define the right to residence or submit an application.

Collect a memo

The NEXO working conditions: 30 minutes free of charge, full consultation 121 I in 45 minutes; maintenance costs are charged separately, fees and transfers. about the team..

You want to go on your own? Barcelona residence permit: from Empadronamiento to TIE and Formulas based on grounds.

How does this apply to your situation?

Choose a first step in the short quiz or discuss your questions with the NEXO team.