- 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.
| What | What is it? | What for? |
|---|---|---|
| NIF | Tax number; foreign national is NIE [1] | Taxes and transactions |
| NIE | nú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 |
| TIE | Tarjeta 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?
Do you need a separate NIF if I already have a NIE?
What is NIF with the letter M?
Can you get a NIE without a residence permit?
How many days are the applications for NIE?
Based on source
- BOE · Real Decreto 1065/2007, articles 18 - 22 (número de identificación fiscal)
- BOE · Real Decreto 1155/2024, articles 205 and 209 (NIE and tarjeta de identidad de extranjero) ♪
- Policía Nacional, sede electrónica · Asignación de NIE a instancia de interesado (formulario EX15) ↗
- 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 memoThe 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.
Related materials
The source is viewed on 02.10.2026 · NEXO · Drafting Draft · Sources do not replace individual legal advice.

