Spanish company registration number: the CIF (NIF) explained

When a form asks for the “company registration number” of a Spanish company, it almost always means its tax ID: the NIF, still widely called CIF. It looks like B12345678. Type the company name below to find it, or a CIF to check who it belongs to.

Try:
  • +4.7 M Spanish companies
  • Data from the BORME (Commercial Registry Gazette)
  • 5 free searches a day

The short answer

Which number is the Spanish company registration number?

Spain has no single “company number” like the UK Companies House number. A Spanish company has four identifiers you may come across. The first one is the one forms, invoices and contracts ask for.

IdentifierWhat it isFormatWhen you need it
NIF (CIF)Tax identification number, assigned by the Spanish Tax Agency. Identifies the company everywhere.Letter + 7 digits + control character: B12345678Invoices, contracts, onboarding, KYB, supplier forms. This is the one.
VAT number (NIF-IVA)The NIF with the country prefix, for intra-EU trade.ES + NIF: ESB12345678EU B2B invoices without VAT (reverse charge). Check it in VIES.
Commercial Registry entryWhere the company is recorded in the provincial Registro Mercantil.Registry, volume (tomo), page (folio), sheet (hoja, e.g. M-123456) and entryLegal documents, notarial deeds, the company’s legal notice.
LEIGlobal Legal Entity Identifier. Only companies that need it (financial operations) have one.20 charactersBanks, securities and regulatory reporting.

Inside the number

How a Spanish CIF is built

Nine characters: a letter for the legal form, seven digits and a control character (a digit or a letter, depending on the type of entity) that catches typos. Since 2008 the official name is NIF (Royal Decree 1065/2007); “CIF” is the old name and the number did not change.

  • APublic limited company (SA)
  • BPrivate limited company (SL)
  • CGeneral partnership
  • DLimited partnership
  • EJoint ownership (comunidad de bienes)
  • FCooperative
  • GAssociation or foundation
  • HOwners’ association
  • JCivil partnership
  • NForeign entity
  • PLocal authority
  • QPublic body
  • RReligious entity
  • SGovernment body
  • UTemporary business association (UTE)
  • VOther types
  • WPermanent establishment of a non-resident

Check the format and control character of any Spanish tax ID with the Spanish NIF validator (unlimited and free).

Not a company number

  • DNI: the ID number of a Spanish citizen (8 digits + letter). Sole traders (autónomos) use it as their tax ID.
  • NIE: the ID number of a foreign resident (X, Y or Z + 7 digits + letter).
  • CNAE: the activity code (like a SIC or NACE code), not an identifier.
  • Company name: it can change; the NIF does not.

Guide

How to find the registration number of a Spanish company

  1. 1

    Search it here

    Type the company name above: we return the CIF of the closest match, with its town and status so you can be sure it is the right company.

  2. 2

    Look at an invoice

    Spanish invoicing rules require the issuer’s NIF on every invoice, including simplified ones.

  3. 3

    Check its website

    Spanish company websites must show the legal name, address, NIF and registry details in the legal notice (“aviso legal”), under Law 34/2002.

  4. 4

    Ask the Commercial Registry

    For an official document with the registry entry, directors and registered office, request a “nota simple” from the Registro Mercantil. See how to search the Spanish Company Register.

Before you sign or invoice

How to verify a Spanish company registration number

CheckWhereWhat it tells you
Format and control characterNIF validatorWhether the number is well formed (catches typos)
Company exists and is activeThe search on this page, or the APILegal name, status (active, dissolved, struck off…), town and latest BORME entries
Valid for EU VATEU VIES serviceWhether ES + NIF is registered for intra-EU operations
Directors and registered officeThe API (Pro plan) or a nota simpleWho can sign for the company and its official address
Official proofNota simple from the Registro MercantilAn extract issued by the registry, for legal or due-diligence files

Our status is worked out from the publications in the BORME: it is a reference, not a certificate from the Commercial Registry. How the data is built: data sources.

FAQ

Frequently asked questions

What is the company registration number in Spain?

In practice it is the company’s tax identification number: the NIF, still widely called CIF. It has 9 characters (a letter, 7 digits and a control character, for example B12345678) and it is what Spanish companies print on invoices and contracts and what forms ask for. Spain has no separate "company number" like the UK Companies House number.

Is the CIF the same as the NIF?

Yes. Since 2008 the official name for a company’s tax ID is NIF (número de identificación fiscal); CIF (código de identificación fiscal) is the older name and is still used everywhere. The number itself did not change.

Is the Spanish VAT number the same as the CIF?

Almost: the Spanish VAT number is "ES" followed by the NIF (ES B12345678 → ESB12345678). It is only valid for intra-EU transactions if the company is registered in the Spanish register of intra-community operators, which you can check in the EU VIES service.

Where can I find the registration number of a Spanish company?

On its invoices, in the legal notice (aviso legal) of its website, in its contracts, or by searching its name on this page. The details of its entry in the Commercial Registry (registry, volume, page and sheet) usually appear on its letterhead or website legal notice, and in a "nota simple" from the Registro Mercantil.

Is a Spanish company’s CIF public?

Yes. A company’s tax ID is not personal data: it must appear on invoices and on the company website, and it is published in the Commercial Registry Gazette (BORME). Sole traders are different: their tax ID is their personal DNI or NIE.

How do I verify that a Spanish CIF is real?

First check the format and control character with the NIF validator, then search it here to see the legal name and whether the company is active. For EU trade, check the VAT number in VIES. For official proof, request a nota simple from the Registro Mercantil.

Can I check many Spanish registration numbers at once?

Yes, with the API: up to 100 CIFs per request, each returned with legal name and status, so you can validate a customer or supplier list automatically.

Validate Spanish registration numbers in your own software

One API call per CIF returns the legal name, status and registry data as JSON, or up to 100 CIFs in one request: for onboarding forms, supplier checks, your ERP or CRM. 100 free calls, no card required.

Get free API key
🤖
Asistente IA En línea
¡Hola! Soy el asistente de APIEmpresas. ¿En qué puedo ayudarte hoy?