What is a CIF in Spain and how to obtain it?

Lucy Paterson

Are you planning on setting up a business or buying property in Spain through a legal entity? If so, one of your first steps is to become legally recognised by Hacienda, Spain’s tax office – and that means applying for a CIF number.

 

Spain’s Código de Identificación Fiscal (CIF) is the tax identification number traditionally assigned to companies and other legal entities. Although the CIF has now been administratively merged into the NIF (Número de Identificación Fiscal), the term still appears frequently on forms, invoices, and legal paperwork – leading to confusion for many international buyers and business owners.

 

Drawing on my two decades of experience advising international clients on Spanish property purchases and commercial matters, this guide explains exactly what a CIF is, who needs one, and how to get it – step by step. Whether you're forming a company, setting up a branch office, or buying a property through a corporate structure, this no-nonsense explainer will help you navigate the bureaucracy with confidence.

Share this:

 

Alex Radford of My Spanish Lawyer explains more about the CIF number in Spain and how to obtain it. 

What is a CIF in Spain and why does it matter?

Businessman on his phone cnfirming a job interview.jpg

The CIF, or Código de Identificación Fiscal, was historically the VAT/tax ID issued to Spanish companies and legal entities. While the term is still commonly used, it has officially been rolled into the NIF – Spain’s all-encompassing Fiscal Identification Number. So, when someone talks about a “CIF number in Spain,” they’re really referring to a company’s NIF.

 

All the Spanish tax and legal related abbreviations can get confusing. Here’s something to help you remember:

 

NIF: Número de Identificación Fiscal for individuals and legal entities
NIE: Número de Identidad de Extranjero for foreign residents and non-residents
DNI: Documento Nacional de Identidad for Spanish citizens
CIF: Código de Identificación Fiscal is the old term for a company’s NIF (you’ll sometimes still hear it used though so it's good to know both.)

Why you need a CIF (NIF) number in Spain

Long work lunch.jpg

Think of the CIF (or company NIF) as your business’s passport in Spain. Without it, your company is effectively invisible to the tax authorities (Hacienda) – and locked out of essential operations.

 

Here’s what your business can’t do without a CIF/NIF:

 

  • Issue legally compliant invoices
  • Pay VAT (IVA) or corporate taxes
  • Open a business bank account or sign utility contracts
  • Hire employees or register for social security
  • Buy, sell, or rent out property in Spain
  • Register as a legal entity with Spanish authorities

 

Getting a CIF isn’t something you can put off, it’s the foundation of your business's legal identity in Spain.
 

CIF numbers for foreign companies

How-to-find-a-property-lawyer.jpg.png

Many international entrepreneurs want to trade with Spanish companies, open a local office, or buy property through a business. If that’s your goal, you’ll likely need a CIF number.

 

In my experience advising international businesses entering the Spanish market, obtaining a CIF is a necessary and often time-sensitive step. If your company intends to trade regularly, open a branch, or employ staff in Spain, you must register with the Spanish tax system using a CIF.

CIF/NIF in everyday financial transactions

In the world of business finance, CIF and NIF numbers act like digital fingerprints. You’ll use them for:

 

  • Invoicing clients and deducting or applying VAT
  • Opening and managing business bank accounts
  • Signing rental or purchase agreements
  • Filing quarterly and annual tax returns
  • Tracking intra-EU transactions through the VIES VAT registry

 

They also help you avoid fraud, detect fake companies, and verify your counterparties – especially when dealing with large transfers or international clients.
 

CIF benefits: Why you should be registered

Lawyer/legal.jpg

Getting a CIF opens doors and protects your business in the long run. With it, you can:

 

  • Operate transparently and legally in Spain
  • Access Spanish government services and contracts
  • Register employees with Seguridad Social
  • Prove legitimacy to investors, partners, and clients
  • Ensure all business activity is properly accounted for

 

And if you're buying property through a Spanish company – something many international investors do – having a CIF is an essential part of the process.
 

Who needs a CIF in Spain?

nomad_main.webp

You’ll need a CIF number if you’re forming or operating any of the following:

 

  • Spanish Limited Companies (SL/S.A.)
  • Civil Societies (Sociedad Civil)
  • Foreign companies with a permanent establishment (establecimiento permanente) in Spain
  • Foundations, NGOs, and other non-profits
  • Communities of property owners (e.g. for apartment buildings)

 

Note for freelancers: If you’re self-employed (autónomo), you don’t need a CIF. Your personal NIF or NIE will suffice.
 

CIF structure: What do the letters and numbers mean?

A CIF (now company NIF) looks like this: B12345678

 

  • Prefix letter – indicates the type of legal entity
    (e.g. B for SLs, A for SAs, N for NGOs, W for permanent establishments)
  • Seven digits – unique ID
  • Final character – control digit (number or letter to verify authenticity)

What paperwork do you need to get a CIF?

Contract, sign, paperwork.jpg

To apply for a CIF (technically a company NIF), you’ll need:

 

  • Model 036 or 037 (tax forms to register the entity)
  • Deed of incorporation (signed at a notary)
  • Proof of company name reservation from the Central Mercantile Register
  • Director(s)’ NIE or DNI (foreigners must already hold NIEs – here’s how to get one)
  • Proof of address in Spain (empadronamiento)
  • Power of attorney if using a gestor
  • Proof of tax office appointment

 

Be aware that incorrect or incomplete documentation is one of the most common reasons applications are delayed. I often advise clients to double-check that director NIEs are active, power of attorney documents are correctly notarised, and company name certificates are still valid (they expire after three months). If in doubt, seek legal support before submitting your application.
 

How much does the CIF cost and where to pay the fees?

There are various fees along the way – notary, registry, and tax forms – usually paid via Spanish banks. Expect to pay:

 

  • €16–€100 at the Central Mercantile Register (for name reservation)
  • Notary fees from €300–€800+
  • CIF application itself is free, but gestor/legal assistance adds cost.

Step-by-step: How to get a CIF number in Spain

Female digital nomad with laptop overlooking the sea

Below is a typical sequence I guide clients through when setting up a company and obtaining a CIF in Spain. While every case has its nuances, this outline gives you a solid framework to understand the process and what’s required at each stage.

 

Reserve your company name
Do this online with the Central Mercantile Register (RMC). You'll receive a certificate of uniqueness.

 

Sign the deed of incorporation
Before a Spanish notary, with all shareholders/directors present or represented.

 

Apply for the provisional CIF
Known as a NIF-V (V for provisional), this lets you get started. Submit forms and documents to the Agencia Tributaria (AEAT) or your nearest Spanish Consulate abroad.

 

Register your company
You must register with the Mercantile Register (Registro Mercantil Central) within 2 months of signing the deed.

 

Get the definitive CIF/NIF
Once registered, exchange the provisional code for a permanent one – within 6 months.

 

Optional but helpful: Register for VAT, IAE tax & social security.

Online tip: If you have a digital certificate, you may be able to do some steps online at www.agenciatributaria.es.

How to check a CIF Number in Spain

To verify or check a CIF number in Spain, use:

 

Agencia Tributaria – “Consulta de terceros” tool
Confirms if a CIF is valid for tax purposes.

 

VIES VAT registry
Confirms intra-EU VAT registration (for businesses trading across Europe).

 

Always check before entering into contracts to avoid fraud. Scammers sometimes use fake CIF numbers that look real at first glance.
 

FAQs about CIF numbers in Spain

What’s the difference between NIF and CIF?
They’re now the same. “CIF” was the older company term. Today, the NIF is the official tax ID for all.

 

Do freelancers need a CIF?
No. Autónomos use their personal NIF (or NIE if they’re foreign residents).

 

Can I trade with a provisional CIF (NIF-V)?
Yes – you can begin business operations, invoice, and sign contracts. But you must switch to the definitive code within 6 months.

 

Does the CIF change if I update my company name or legal form?
No, the NIF stays the same unless you dissolve and re-register a new entity.

 

How long does it take to get a CIF number in Spain?
2–5 business days for the provisional CIF. The full company setup can take 2–4 weeks depending on notary, registry and regional admin timelines.

 

Do foreign e-commerce sellers, crypto companies or property-owning SPVs need a CIF?
Yes – if your business intends to trade regularly, employ staff, own assets, or generate income in Spain, a CIF is essential.

 

E-commerce sellers selling to Spanish customers may need a CIF to register for VAT or establish a local tax presence.

 

Crypto businesses operating platforms or services in Spain must register and obtain a CIF like any other legal entity.

 

Special Purpose Vehicles (SPVs) created to hold property in Spain must have a CIF to buy, own, rent, or sell the asset legally.

 

If you’re unsure whether your situation qualifies, I strongly recommend consulting a gestor or cross-border legal specialist. At My Lawyer in Spain, we regularly guide international clients through this process to ensure full compliance.

 

What happens if I lose my CIF certificate or need a duplicate? Are there fines for late registration?
If you lose your CIF certificate, don’t panic – you can request a duplicate from the Agencia Tributaria or via your gestor.

 

You'll need to provide proof of identity and company documentation.

Certificates can often be downloaded online if you have a digital certificate or access to the AEAT portal.

 

Late registration or failure to update company information (like a change of legal address) can result in fines or delays – especially if it affects tax filings or invoicing. Always notify authorities within the required timeframe, and keep digital and physical copies of your CIF certificate safely stored.
 

Your CIF application checklist:

  • Reserve company name at Mercantile Registry
  • Notarise deed of incorporation
  • Apply for provisional CIF (NIF-V) at Agencia Tributaria
  • Submit Model 036/037
  • Register company in Mercantile Registry
  • Collect definitive NIF/CIF within 6 months
  • Register for VAT, social security, and IAE if needed
     

Getting a CIF number final thoughts


As a dual-qualified English solicitor and Spanish abogado, I understand how overwhelming Spanish bureaucracy can feel at first. But the CIF application process is a manageable one, and with the right documentation—and the right advice—it’s entirely possible to handle confidently, even from abroad. Whether you're planning to open a business or buy property through a Spanish company, obtaining your CIF is your essential first step.

 

Once you have it, you’re ready to open a bank account, register for tax, and officially do business in Spain!
 

Next up:

Working visas for Spain

Finding the right visa to work in Spain can be challenging, but it's essential for anyone looking to start a career or business there. Spain offers several types of work visas, each designed for different professional needs and goals...

See the article

Be the first to comment!

    Add your voice