Who uses what
| Who you are | Your tax number |
|---|---|
| Spanish individual | The DNI, which acts as NIF |
| Foreign individual | The NIE, which acts as NIF |
| Legal person, company or entity | An entity's own NIF, formerly called CIF |
The CIF no longer exists as a separate category. It was merged into the entity NIF. If someone asks for «the company's CIF», they are asking for its NIF.
Why the question comes up so often
Because each body uses the name that suits it. Immigration talks about NIE, the Tax Agency about NIF, the bank asks for «your tax number» and the notary for «the NIE or NIF». In practice, if you are a foreign individual, you write the same number in all three cases.
The confusion grows when someone buys a home through a company: then there really are two different numbers, the director's NIE and the entity's NIF, and they are separate things.
When you have to request it expressly
- Non-residents with transactions in Spain: buying or selling property, inheritance, setting up a company, opening certain financial products.
- Foreign entities that will operate or own assets in Spain: they need an entity NIF, requested from the Tax Agency.
- Self-employed and companies: census registration with forms 036 or 037 uses the number you already have, it does not create a new one. See Tax Agency appointment.
If you do not have a NIE yet, the starting point is NIE: what it is and how to get it.
Why the confusion exists
The root of the muddle is that NIF and NIE are not parallel categories. The NIF is the tax identification number every person or entity needs to deal with the Tax Agency. What changes is where that number comes from:
- For a Spanish person, the NIF is the DNI number with its letter.
- For a foreign person, the NIF is precisely the NIE. In other words, your NIE acts as NIF.
- For a company or entity, the NIF is assigned separately and starts with a letter.
So when a form asks for «NIF» and you have a NIE, the answer is to write the NIE. No document is missing.
When you do need something different
There are two situations where the question stops being rhetorical.
You are going to set up a company. The entity needs its own NIF, first provisional and then definitive after registration in the Companies Register. The partners and the director continue to identify themselves with their NIE.
You do not live in Spain and have no NIE. If your link with Spain is through economic, professional or social interests, the NIE must be requested expressly: it is not assigned by itself. The requirements and the five-day deadline are in the NIE guide.
Which document proves what
The NIE is proved with the assignment certificate issued by the Police, a paper document of limited validity for proof purposes, or with the TIE if you are resident, where the number is printed. A company's NIF is proved with the Tax Agency's tax identification card.
And the error that sends files back most often: writing the number without the final letter or with the wrong initial letter. The NIE has a letter at the start and a check letter at the end, and both are part of the number.
Need a tax number for a transaction in Spain?
We obtain NIEs for non-residents and NIFs for foreign entities, with representation if you cannot travel.
Frequently asked questions
Do I need a NIF as well as the NIE?
No, if you are a foreign individual. Your NIE performs the role of NIF.
Does the CIF still exist?
Not as a separate name. Entities have a NIF; the term CIF is still used colloquially.
Can a non-resident have a NIE?
Yes. You do not need to live in Spain to be assigned the number.
Does a foreign company need a NIE or a NIF?
An entity NIF, requested from the Tax Agency. The NIE is for individuals.
Where does my NIF appear if I am foreign?
On your TIE, on your registration certificate and in the decisions and tax documents showing your NIE.
Legal basis
- Organic Law 4/2000 on the rights and freedoms of foreign nationals in Spain
- Royal Decree 1155/2024, Regulation implementing Organic Law 4/2000 (consolidated text)
- Royal Decree 316/2026 amending the immigration Regulation
- Order PJC/617/2025 setting immigration and foreigners' fees
- Law 39/2015 on Common Administrative Procedure, art. 14 on electronic dealings with the administration