Spanish NIF
What is a NIF number, and why you need it
A plain-English guide to the Spanish NIF: what it means, the letters and types, how it differs from the NIE and CIF, and why no foreign company can trade or register for EPR in Spain without one.
24 Jun 2026 · 6 min read
If you sell into Spain, or plan to, you will run into three letters very quickly: NIF. It appears on invoices, on tax filings, and on every form the Spanish tax authorities put in front of you. This guide explains what a NIF number actually is, the different NIF types and the letters they carry, how it relates to the NIE and the CIF, and why a foreign business cannot trade formally in Spain without one.
What is a NIF number?
NIF stands for Numero de Identificacion Fiscal, the Spanish tax identification number. It is the single reference that identifies any taxpayer, whether a person or a company, to the Spanish tax agency (the AEAT, or Agencia Tributaria). In practice, the NIF meaning is simple: it is the fiscal identity Spain assigns to you so that your invoices, tax returns and registrations can all be tied back to one recognised entity.
Every taxable activity in Spain flows through this number. Without it, the tax authorities have no way to recognise you, which is why obtaining a NIF number in Spain is usually the very first step for any foreign seller who wants to operate legally in the market.
The format and the NIF letters
A NIF is not one fixed pattern. The structure and the leading NIF letters tell you what kind of taxpayer it belongs to. Here is how the main NIF types break down.
- Spanish individuals: their DNI (national identity number) doubles as their NIF, so the two are effectively the same number.
- Foreign individuals: they use their NIE (Numero de Identidad de Extranjero) as their tax number.
- Spanish companies: they receive a letter-prefixed NIF, where the first letter signals the legal form. A is for a sociedad anonima, B is for a sociedad limitada, and other letters cover cooperatives, associations and further entity types.
- Foreign entities without a permanent establishment in Spain: they are assigned a NIF that starts with N, commonly called the N98 or NIF-N.
- Foreign entities that do have a permanent establishment: these receive a NIF that starts with W.
So the leading character is doing real work. For a foreign company selling into Spain from abroad, the relevant identifier is almost always the N type, and the distinction between N and W matters a great deal for how you register and what you owe. We cover that split in detail in our guide to how a foreign company gets its Spanish NIF.
NIF vs NIE vs CIF
These three terms get mixed up constantly, so it helps to separate them. The NIF is the umbrella tax identification number for anyone dealing with the Spanish tax authorities. The NIE is the identity number for foreign individuals, and it functions as their NIF. The CIF (Codigo de Identificacion Fiscal) was the old company tax code, and while people still say CIF out of habit, it was folded into the NIF system years ago, so a company's tax number is now simply its NIF.
If you want the full breakdown of who gets what and why, read our dedicated explainer on NIE vs NIF. For now, the short version is this: a NIF for a company and a NIF for a person are both NIFs, they just start life from different sources.
Why you need a NIF
A NIF is the entry ticket to the Spanish market. There is very little you can do formally without one. You cannot register for Extended Producer Responsibility, you cannot issue compliant invoices with Spanish tax on them, you cannot pay tax, and you cannot open a proper channel of communication with the AEAT. Every one of those steps assumes you already hold a valid Spanish tax identification number.
For most foreign sellers, the pressing reason is compliance. If you place packaging, electronics or batteries on the Spanish market, you fall under EPR obligations, and you cannot even begin to register your producer responsibility without a NIF in hand. Our overview of what EPR is explains the framework, and our guide to selling in Spain and its EPR requirements walks through the obligations that follow. The NIF is what unlocks all of it.
Which NIF a foreign seller actually gets
For a company based outside Spain with no permanent establishment here, the correct identifier is the N type NIF, the N98. This is the number that lets a non-resident business register for EPR, appear correctly on documentation, and meet its Spanish obligations without setting up a local subsidiary or branch.
It is worth being clear about what the N98 is and is not. It is a fiscal identity that makes your foreign company recognisable to the AEAT and eligible to register for compliance schemes. It is not the same as creating a permanent establishment, and it does not, by itself, make you tax resident in Spain. Whether an activity creates a permanent establishment (which would point you towards the W type instead) is a separate question, and we explain the distinction in our note on tax residency and permanent establishment. This article is general information, not legal or tax advice for your specific situation.
How you get a NIF
The good news is that the N type NIF is the fast, light-touch route. At EPRNIF we issue the N98 for foreign companies digitally, typically within 12 to 24 hours, with no notary and no apostille required. You send the details, we handle the application with the Spanish tax authorities, and you receive your number. The heavier path is reserved for entities setting up a permanent establishment, which involves more paperwork and longer timelines.
If you want the step-by-step version, including the N versus W decision and the costs involved, our guide on getting a Spanish NIF as a foreign company covers it in full. When you are ready, you can start an application directly, and you will find the current price laid out plainly with no hidden extras.
Recap and next step
A NIF is the Spanish tax identification number that identifies you to the AEAT, and the letter it starts with tells you which kind of taxpayer you are. For a foreign company trading into Spain, that letter is almost always N, and the N98 is the identifier that opens the door to EPR registration, compliant invoicing and formal trade.
If your next move is compliance, the NIF comes first. You can begin your N98 application now, or browse our frequently asked questions if you would like to see how the process works before you commit.