Spanish NIF
How a foreign company gets a Spanish NIF
If you run a Dutch BV, German GmbH, French SARL or UK Ltd and you start selling into Spain, you need a Spanish NIF. Here is when it becomes mandatory, the difference between a type N and a type W NIF, how to get one, what it costs, and the mistakes that trigger tax problems.
4 Jul 2026 · 10 min read
If you run a Dutch BV, German GmbH, French SARL or UK Ltd and you start selling products, leasing premises or signing contracts in Spain, the question of a Spanish NIF for your company comes up fast. The rule underneath it is simple: the moment a foreign company carries out an economic operation on Spanish soil, it has to identify itself to the Agencia Tributaria with a NIF, even with no subsidiary or office there.
This guide covers when a NIF becomes mandatory, the two main variants (type N for a company without an establishment, type W for a permanent establishment), how the application works, what it costs, and the mistakes that turn a simple registration into a tax assessment. If your reason for needing one is Extended Producer Responsibility, our guide to the EPR requirements for selling in Spain is the companion piece to this article.
When does a foreign company need a Spanish NIF?
Almost any economic operation on Spanish territory can trigger the obligation. The common ones:
- Selling products in Spain. Holding stock in a Spanish warehouse, selling B2B with delivery in Spain, or running a marketplace with local fulfilment all point to a NIF. This is also the moment Extended Producer Responsibility starts to apply for packaging, electronics and other streams.
- Buying or selling property. A company that buys or sells a warehouse, office or building in Spain needs a NIF before the notarial deed, or the sale cannot be registered in its name.
- Renting commercial premises. A Spanish landlord cannot invoice a lease without the tenant company's NIF.
- Hiring an employee in Spain. Taking on a worker resident in Spain makes you an employer on the territory, which moves you toward a permanent establishment, and a type W NIF, rather than a simple type N.
The lightest and by far the most common case for a foreign seller is the first one: you place products on the Spanish market and you need to register for EPR and identify yourself to the tax agency, with no office, staff or establishment in Spain. That case maps cleanly onto a type N NIF, which is what most of this article is about.
Type N versus type W: which NIF applies?
The foreign-company NIF comes in two variants, and the difference is the degree of economic presence in Spain.
A type N NIF (the code starts with N, and the specific one issued to non-resident entities is the N98, sometimes written NIF-N) goes to a company that operates in Spain without a permanent establishment: no office, no employee, no local agent with signing authority. It covers selling products, EPR registration, occasional operations, and services invoiced from abroad. The company answers to Spain only for its specifically Spanish obligations, not its worldwide activity.
A type W NIF goes to a company that does have a permanent establishment in Spain: a fixed office, a branch, a warehouse with staff, or a dependent agent who can commit the company. A type W establishment is treated much like a Spanish company for the share of activity carried out in Spain, with the heavier filing calendar that implies. Whether your presence crosses into a permanent establishment is a tax-treaty question, and getting it wrong is one of the costliest mistakes in this area, so have it checked before you apply. Where the line sits is the subject of our guide to tax residency and permanent establishment in Spain.
For EPR and ordinary cross-border selling, the answer is almost always type N. EPRNIF issues the N98 for exactly this case. If your situation involves staff on the ground, a branch, or filing Spanish VAT, that is type W or an SL, and it is worth a quick question to us before ordering rather than buying the wrong ID.
NIF, NIE, CIF: which one do you need?
The terminology trips a lot of people up. A NIF is the tax ID for a company. An NIE is the equivalent for an individual foreigner. "CIF" is the old name for a company's tax ID and you still see it used, but it is the same thing as a NIF today. For a foreign company with no permanent establishment in Spain, the right variant is the N98 NIF. If any of that is still fuzzy, the difference between an NIE and a NIF and what a NIF number actually is are both worth two minutes before you order.
What an N98 NIF is for
The N98 is exactly what you need to:
- Register in the Spanish producer registry for EPR.
- Join a recycling scheme (a SCRAP) for packaging, electronics or other streams.
- Register for the plastic packaging tax if it applies to you.
- Identify your company in dealings with the AEAT, the Spanish tax agency.
It is worth knowing what the N98 is not for: it is not used to file Spanish VAT (IVA) returns, to hold shares in a Spanish company, or as a residency document. Those needs point to a type W NIF or a Spanish SL. For EPR compliance, though, the N98 is the correct and sufficient ID.
How you get the NIF
There are two very different routes, and which one you take depends on the type.
The traditional route, used for a type W establishment or when you set up an SL, is document-heavy. You gather the company's incorporation documents with a Hague apostille, a sworn translation into Spanish, and a certificate of good standing from your home registry (a Companies House extract for the UK, a KvK extract for the Netherlands, and so on). You appoint a fiscal representative in Spain, and you file the modelo 036 census declaration. The Agencia Tributaria issues a provisional NIF within a week or two and a definitive one after verification. Start to finish, count several weeks.
For a type N NIF for EPR, none of that heavy machinery is necessary when the application is handled digitally from end to end. With EPRNIF there is no notarisation and no apostille. You fill in a short form with company details you already have, and the application is submitted for you. Filling in the form takes about five minutes, and the N98 is typically issued within 12 to 24 hours. Once assigned, the number is permanent, with no renewals and no recurring fee for the NIF itself.
The details we ask for are the basics:
- Company name and legal form.
- Date of incorporation.
- Full registered address.
- Name of the legal representative.
- A contact email.
- Your EU VAT ID, if you have one (optional).
What it costs
The state does not charge a fee to issue a NIF, but the route around it does. The traditional type W or SL route stacks up an apostille, a sworn translation (commonly a few hundred euros), and a gestoría acting as fiscal representative, often 800 to 2,000 euros in the first year plus a recurring monthly fee to keep the tax calendar. Setting up a Spanish SL costs more still in year one, between the notarial deed, the share capital and the Registro Mercantil, though it can pay off for a large, sustained activity.
The type N NIF for EPR is deliberately the opposite: a single flat price, with no apostille, no translation and no ongoing representative fee. You can see the exact figure on the pricing page. For a foreign seller whose Spanish footprint is selling and EPR, this is both the correct identifier and by far the cheapest way to get compliant.
What you have to do once you have the NIF
The NIF is the key, not the destination. What follows depends on the type.
With a type N NIF, your Spanish obligations are limited to your Spanish operations. For a foreign seller that means registering as a producer, joining the relevant SCRAP, and reporting the volumes you place on the market. There is no worldwide-income filing and no Spanish VAT return attached to the N98 itself. Our guide to the EPR requirements in Spain walks through the streams and the reporting.
With a type W NIF, the obligations look like a Spanish company's for the share of activity attributed to the establishment: annual corporate income tax (modelo 200), quarterly IVA (modelo 303), payroll withholdings if you employ people, and the rest of the standard calendar. Either type may also need registration on the ROI (the register of intra-community operators) to obtain a valid intra-EU VAT number and apply the reverse charge correctly on B2B trade.
Mistakes that cost foreign companies
A handful of errors come up again and again:
- Underestimating the permanent establishment. A warehouse with Spanish staff, or an agent who negotiates in your name, can qualify as a permanent establishment even when you assumed it did not, which changes your tax regime and can lead to assessments over several years. Get the qualification checked before you apply.
- Confusing the NIE and the NIF. The NIE is an individual foreigner's number; your company needs a NIF. Ordering the wrong one wastes weeks, and the NIE versus NIF explainer settles it.
- Getting the NIF but skipping EPR. The NIF lets you register, but it is not registration. Selling without joining the producer registry and a SCRAP is exactly what triggers EPR penalties.
- Forgetting the ROI for intra-EU trade. Without it you invoice Spanish VAT on B2B sales that should carry a reverse charge, and your EU customers reject the invoices.
Type N NIF or a Spanish SL?
If you are weighing the two structures, the rule of thumb is about scale and permanence. A type N NIF fits an occasional or modest activity: you sell into Spain, you register for EPR, you are testing the market, and you are not hiring or holding local stock through your own staff. It is fast to obtain and cheap to maintain. A Spanish SL fits a sustained, significant activity: local hiring, a real establishment, larger volumes, or a wish to ring-fence liability in a separate Spanish entity. It costs more to create and run but brings limited liability and more commercial credibility. Many companies start with a type N to enter the market and move to an SL once the activity is proven.
Where to start
For most foreign companies selling into Spain, the Spanish activity begins and ends with a type N NIF and EPR registration, and the whole thing is a few minutes of form-filling plus a 12 to 24 hour wait. Qualify your presence honestly first (type N if you have no establishment, type W or an SL if you do), then get the NIF that matches. If that is the N98, you can start your application now; if you are unsure, ask us before you pay.