The CIF stopped existing on January 1, 2008. Since that day, companies, associations, and every other entity have had an NIF, exactly like individuals do. If a client, a bank, or a form asks you for “the company’s CIF,” what they’re asking for is its NIF.
The confusion isn’t unfounded, though. What changes depending on who you are isn’t the name of the number, but how it’s built, who issues it, and how you get it. A Spaniard with a DNI, a foreigner with a NIE, a foreigner without one, a Spanish company, a foreign company, and a permanent establishment follow six different paths, and only one of them is automatic.
In this guide you’ll see what each term meant and which rule ended the CIF. Then, which number applies to you, what each letter of a company’s NIF means, how to apply for it and within what deadlines, and what happens when the number on an invoice isn’t the right one.
In 30 Seconds
- The CIF disappeared on January 1, 2008, when Royal Decree 1065/2007 took effect. Spanish law now recognizes only the NIF, for people and entities alike.
- A Spaniard’s NIF is their DNI number plus its check letter; a foreigner’s is their NIE. Anyone with neither gets an NIF from the Spanish Tax Agency starting with K, L, or M.
- An entity’s NIF has nine characters beginning with a letter tied to its legal form: A for a corporation, B for a limited liability company, G for an association. Foreign entities start with N, and permanent establishments with W.
- You apply using Form 036 when a business activity or an entity is involved, and Form 030 if you’re an individual with no DNI or NIE.
What the NIF Is and What the CIF Was
The NIF (Número de Identificación Fiscal, or Tax Identification Number) is the code the Spanish tax authorities use to identify anyone with tax-relevant dealings in Spain. Individuals have one, legal entities have one, and so do entities without legal personality, such as jointly owned property or an undistributed estate. The CIF (Código de Identificación Fiscal) was its predecessor for companies and entities, and it no longer exists as a separate category.
When both coexisted, the split was clean: the CIF identified legal entities under Decree 2423/1975, and the NIF identified individuals under Royal Decree 338/1990. Both rules have been repealed. That’s the whole difference between CIF and NIF today: a historical one, not a practical one.
Two terms worth pinning down, since they come up constantly. A legal entity is the company or organization itself (a limited liability company, a cooperative, an association), separate from its shareholders. An entity without legal personality operates in business without being a company, such as a homeowners’ association. Both need an NIF.
CIF and NIF: What Changed in 2008 and Why People Still Say CIF
The change has a date and a rule behind it. Royal Decree 1065/2007 took effect on January 1, 2008, and expressly repealed Decree 2423/1975, which governed the identification code for legal entities, and Royal Decree 338/1990, which governed how the NIF was built. Since then, there’s been a single number for everyone.
One nuance worth knowing early, because it explains why some sources say January and others say July: both dates are correct and they don’t refer to the same thing. The CIF disappeared on January 1, 2008 under Royal Decree 1065/2007. The current structure of an entity’s NIF, with its letters, has applied since July 1, 2008, when Order EHA/451/2008 came into force.
So why does everyone still say CIF? Habit, mostly, plus the fact that the term is baked into invoicing software, contract templates, and forms nobody has revisited. In practice, “CIF” now works as a nickname for a company’s NIF. Nothing more.
Which Number Applies to You
This is the question almost nobody answers, and the one that actually matters. The name is the same for everyone, but the number you get and who issues it change with your situation.
| Who you are | Your NIF | Who issues it and how to apply |
|---|---|---|
| Spanish national with a DNI | Your DNI number plus its check letter | Ministry of the Interior. Nothing else to request |
| Spanish national under 14 living in Spain, no DNI | NIF starting with K | Spanish Tax Agency, Form 030 |
| Spanish national living abroad, no DNI | NIF starting with L | Spanish Tax Agency or a consulate, Form 030 |
| Foreign national with a NIE | Your NIE itself | Ministry of the Interior. Your NIE already is your NIF |
| Foreign national without a NIE | NIF starting with M | Spanish Tax Agency or a consulate, Form 030 |
| Self-employed worker, Spanish or foreign | The same DNI or NIE you already hold | No new number: you register with the tax census using Form 036 |
| Spanish company or entity | Nine characters, led by its legal-form letter | Spanish Tax Agency, Form 036 |
| Foreign company or entity | NIF starting with N | Spanish Tax Agency, Form 036 |
| Permanent establishment of a nonresident entity | NIF starting with W | Spanish Tax Agency, Form 036, one per establishment |
One nuance about the letter M causes a lot of confusion. According to the Spanish Tax Agency, an M number is permanent for foreign nationals who aren’t required to hold a NIE, such as a nonresident signing a one-off transaction in Spain. It’s temporary for those who are required to hold one, lasting only until the Ministry of the Interior issues it. If that’s your case, it helps to know how to obtain a NIE in Spain and why nonresidents are asked for a NIE too.
And watch out for a detail that comes up in nearly every conversation: a self-employed worker has no CIF, and no separate number either. Their NIF is their DNI or NIE. What changes when they register isn’t the number but the obligations they take on, which we cover in our guide to the obligations of self-employed workers in Spain.
The Letters of a Company’s NIF, One by One
An entity’s NIF has nine characters: a letter indicating its legal form, a random seven-digit number, and a check character. Since Order EHA/451/2008 took effect, the number no longer reveals anything about the province of the registered office, as the old CIF did.
| Letter | What it identifies |
|---|---|
| A | Corporations (sociedades anónimas) |
| B | Limited liability companies (sociedades limitadas) |
| C | General partnerships |
| D | Limited partnerships |
| E | Jointly owned property, undistributed estates, and other entities without legal personality |
| F | Cooperatives |
| G | Associations |
| H | Homeowners’ associations under horizontal property rules |
| J | Civil partnerships |
| N | Foreign entities |
| P | Local authorities |
| Q | Public bodies |
| R | Religious congregations and institutions |
| S | State and regional government bodies |
| U | Temporary business consortiums (UTEs) |
| V | Other types not covered by the remaining letters |
| W | Permanent establishments of nonresident entities in Spain |
In practical terms: the letter tells you what kind of counterparty you’re dealing with before you read a single document. If a supplier sends you a number starting with N, you’re contracting with a foreign entity, and the tax treatment of that transaction isn’t the same. That number, by the way, never changes unless the entity changes its legal form or its nationality.
How to Apply for an NIF and the Deadlines That Apply
For a company, the process happens in two stages: first a provisional NIF, then the permanent one. The number itself is the same; what changes is its status.
- File Form 036 before starting any activity or tax-relevant transaction, along with the deed of incorporation and the bylaws. If documents are missing, the NIF issued is provisional.
- Submit what’s still outstanding within one month of registration with the relevant registry, or from the date of the deed when no registration is required.
- Request the permanent NIF with an amending census return, Form 036 again, attaching the missing documents.
- Don’t let the clock run out. Once that deadline passes, or six months from the provisional NIF without the paperwork, the Spanish Tax Agency can formally request it and give you a maximum of ten days. Ignore that request and the provisional NIF can end up revoked.
If you’re an individual with no DNI or NIE, your process is different and shorter: Form 030. You file it with the Spanish Tax Agency or, if you’re outside Spain, at a consulate, with your passport and documents proving your situation.
One note that saves time: Form 037, the simplified census return, was abolished by Order HAC/1526/2024. Every registration, amendment, and deregistration now goes through Form 036 at the Spanish Tax Agency, even though plenty of guides and templates still mention 037. The full picture is in our guide on how to create a company in Spain.
Foreign Companies and Permanent Establishments: The NIF You Need to Operate in Spain
This is where generic guides fall short and where files get stuck most often. A foreign company needs a Spanish NIF as soon as it’s going to have tax-relevant dealings in Spain, even without opening an office or hiring anyone. The typical cases: setting up a subsidiary, becoming a shareholder in a Spanish company, buying real estate, receiving income, or invoicing Spanish clients.
That NIF is issued by the Spanish Tax Agency through Form 036, and it starts with the letter N. The entity itself applies through whoever represents it, and you want this settled before signing anything before a notary, not after.
If the nonresident entity operates in Spain through one or more permanent establishments with clearly distinct activities and separate management, each one must apply for its own NIF, different from the parent’s. That number starts with W. It’s a rule that catches many groups off guard: the parent may already hold its N and still need an additional W. We break this down in our analysis of what counts as a permanent establishment in Spain and when comparing a representative office, branch, or subsidiary.
The cost nobody budgets for is documentary. The entity’s incorporation papers and proof of its representative’s authority come from the home country, which means sworn translation and, depending on the country, an apostille. That prep work decides whether the NIF takes weeks or months. It’s the part we handle within our business immigration service, alongside what we explain about setting up a company in Spain from abroad.
VAT Number: When Your NIF Isn’t Enough to Invoice Within the EU
Holding an NIF identifies you before the tax authorities, but it doesn’t clear you to invoice a company in another EU country without VAT. That takes one more step: registering with the Register of Intra-Community Operators (ROI), requested on Form 036 by checking box 582 and entering the expected date of your first transaction in box 584.
The number you get, the NIF-IVA or intra-Community VAT number, is your same NIF with the prefix ES in front. Once it’s issued, you appear in the European VIES database, where any client can verify it. Watch the calendar, too: if the Spanish Tax Agency doesn’t decide within three months, the application may be deemed denied.
An example with numbers. A Spanish limited liability company invoices 4,000 euros in services to a German business. With both parties listed in VIES, the invoice goes out without VAT and the client accounts for the tax in its own country. Without that registration, the German company can refuse the invoice until the number shows up in the system, leaving payment on hold and a corrective invoice to issue. Your annual filings don’t change because of this, but the order does: registration first, first invoice second.
Costly Mistakes With the CIF and the NIF
- Getting stuck on the provisional NIF. It’s the most common slip when incorporating a company. The deed is signed, the provisional number comes through, and nobody goes back to Form 036 after registration. The result is a formal request and, at worst, a revoked number.
- Not reporting your new number. If you held an M number and then obtained your NIE, or held an L and obtained your DNI, you have two months to report it to the tax authorities and to anyone who needs it on record. The previous NIF stays valid only until the date you report the change.
- Mixing up the NIF and the VAT number. They’re the same digits, but they don’t do the same job. Invoicing an EU client without VAT while not registered in the ROI is the fastest route to a corrective invoice.
- Asking for “the CIF” on your own forms. If your website or contract only has a CIF field, you’re leaving out self-employed workers and individuals, who also have an NIF. It’s a small thing that creates daily friction, and a good one to fix when you review mandatory e-invoicing.
- Taking a number at face value. Any European operator’s VAT number can be checked in VIES, and the Spanish Tax Agency’s e-portal offers a third-party NIF verification service for users with a digital certificate. Before contracting with an entity you don’t know, it’s a minute well spent.
And one clarification that prevents trouble: the Spanish Tax Agency notes that failing to use your NIF in tax-relevant transactions is treated as a minor offense, carrying a fine of 150 euros. It won’t ruin anyone, but it signals that the wrong number carries consequences of its own, on top of whatever the transaction itself triggers.
Knowing the CIF no longer exists solves half the question. The other half is holding the right number, issued and active, before you sign the deed, send the first invoice, or open the bank account. And that depends on who you are and what you plan to do in Spain.
At ILLAY Legal we handle the full census registration: the NIF for a Spanish company, for a foreign entity, for a permanent establishment, and the ROI registration when EU transactions are involved. All of it 100% online and in your language. Tell us what you plan to do in Spain, through which entity, and which document identifies you, and we’ll tell you which number you need, who has to apply for it, and what paperwork to prepare. You can start with our company incorporation in Spain service or reach out directly to ILLAY Legal.
Keep reading: how to start a business in Spain as a foreigner · tax residency in Spain
Frequently Asked Questions About the CIF and the NIF
What Is My NIF and Where Do I Find It?
It depends on your document. If you’re a Spanish national, it’s your DNI number followed by its letter, printed on the card itself. If you’re a foreign national, it’s your NIE, which appears on your TIE (Foreigner Identity Card) or on the certificate that assigned the number. For a company, it’s the nine-character number in its deed of incorporation, on its tax identification card, and on any census certificate from the Spanish Tax Agency. If you hold none of those, you don’t have an NIF yet and you’ll need to apply.
Does a Homeowners’ Association Have a CIF or an NIF?
An NIF, like everyone else. Homeowners’ associations under horizontal property rules are entities without legal personality, and their NIF starts with the letter H, a dedicated code under Order EHA/451/2008. They need it to open the association’s bank account, sign service contracts, and apply withholdings where required. Jointly owned property and undistributed estates, by contrast, carry the letter E.
I Have an M Number and Just Received My NIE. Do I Need to Tell the Tax Agency?
Yes, and there’s a deadline: two months from the date you obtain it. You have to report it to the tax authorities and to any person or entity that needs your new number on file, such as your bank, your accountant, or your clients. The previous NIF remains valid only until the date you report the change, so the sooner you do it, the fewer documents will be left carrying the old number. The same applies if you held an L number and obtained a DNI.
Does a Self-Employed Worker Have a CIF?
No. A self-employed worker is an individual, so their tax number is their DNI or NIE, with no additional code. Registering as self-employed doesn’t generate a new number: it adds you to the census of business owners, professionals, and withholding agents, with the obligations that come with it. If someone asks for “the CIF of your business,” what they need is the NIF you already have.
How Do You Say CIF or NIF in English?
There’s no official translation, which is exactly why it’s worth explaining. In practice, NIF is rendered as tax identification number, often with the Spanish acronym in parentheses to avoid confusion. On international forms asking for the TIN (Taxpayer Identification Number) of a Spanish resident, the NIF is the correct entry. As for the CIF, the cleanest answer is that it was the old code for companies and has been replaced by the NIF.
Can I Check a Company’s NIF Before Working With It?
Yes, and it’s worth doing when you don’t know the counterparty. For intra-Community transactions, the VAT number is verified through the European Commission’s VIES system. For a Spanish NIF, the Spanish Tax Agency’s e-portal offers a third-party verification service that requires a digital certificate. And if you want to know who stands behind the company, who manages it, and whether its filings are current, that information comes from the Commercial Registry.


