HomeBlogSpanish VAT number: how it works and how to check it
API Insights

Spanish VAT number: how it works and how to check it

CIF, NIF, NIE: how VAT numbers work in Spain and how to verify the identity of a Spanish company

VAT Number Spain

Spanish companies, as well as foreign businesses intending to operate in Spain, are required to obtain a NIF (Número de Identificación Fiscal), the equivalent of the Italian VAT number. This rule also applies to sole proprietors and self-employed individuals who are not residents in Spain. They can request a dedicated tax identification number, which is not linked to Spanish identity documents.

Spanish VAT Number: obliged parties

Any company, whether Spanish or foreign, that intends to carry out VAT-liable transactions in Spain must obtain a Spanish VAT number (NIF).

This requirement applies to all businesses importing goods into Spain from non-EU countries, as well as to companies delivering goods from another EU member state to customers residing in Spain.

For e-commerce businesses, the obligation to obtain a Spanish VAT number applies only to those selling to other businesses or via platforms such as Amazon and other marketplaces, and only when a certain price threshold is exceeded.

However, since 2021, direct B2C e-commerce businesses selling to private consumers can opt for the MOSS (Mini One Stop Shop) scheme, which allows them to register in a single EU member state and fulfill VAT obligations from a single location.

Apart from this exception, any commercial activity involving VAT application requires a valid VAT position in Spain.

NIF, CIF, and NIE: VAT Number in Spain

Setting up a tax position in Spain can be complex at first. There are several acronyms to navigate, such as NIF and CIF, which might seem similar but serve different purposes.

The first distinction is between European businesses selling to Spanish consumers and those establishing a new company in Spain. In the latter case, obtaining a NIF (equivalent to the Italian VAT number) alone is not enough. Entrepreneurs will also need a NIE (Número de Identificación de Extranjero), which acts as an identity document for foreign residents in Spain.

NIE: what it is and when it’s required

The NIE (Número de Identificación de Extranjero) is a unique identification number assigned to foreign residents in Spain. It is necessary for company formation but also for opening a bank account or signing a rental contract.

Those looking to expand their business presence in Spain must obtain this number, especially if they plan to move there. For non-EU citizens, the NIE is essential to apply for a residence permit.

CIF: what it was and how to avoid confusion

The CIF (Código de Identificación Fiscal) was a tax identification number assigned to legal entities operating in Spain. It was used to differentiate them from individuals, who had a NIF. However, in 2008, the CIF was officially replaced by the NIF, which is now used for both individuals and businesses.

NIF: what it is and how it works

The NIF (Número de Identificación Fiscal) in Spain is the equivalent of the Italian tax code and is assigned to both individuals and businesses for tax identification purposes.

The format of the NIF differs depending on whether it belongs to an individual or a company. For legal entities, the first letter of the code indicates the type of company, using letters such as A, B, C, D, E, F, G, H, J, N, P, Q, R, S, U, V, and W (where N and W identify foreign companies).

For individuals, the NIF begins with letters K, L, M, X, Y, or Z. The first two letters are for minors under 14 years old, while M, X, Y, and Z indicate that the taxpayer is a foreign national. For those with a NIE, the NIF corresponds to their NIE.

A Spanish NIF can also be requested without a NIE. In such cases, the following categories apply:

  • NIF L: For Spanish citizens residing abroad without a national identity card.
  • NIF M: For foreign individuals residing abroad.
  • NIF N: For legal entities with headquarters abroad.
  • NIF W: For permanent establishments of non-resident entities in Spain.

How to obtain a Spanish VAT Number without a NIE

Businesses and professionals interested in the Spanish market but not requiring a NIE can apply for a Spanish VAT number through the Agencia Tributaria.

Sole proprietors and freelancers must submit Form 030 along with supporting documentation explaining why a NIE is not required. Once VAT registration is completed with Seguridad Social, they become part of RETA (Régimen Especial de Trabajadores Autónomos).

Foreign companies wishing to operate in Spain must provide:

  • Form 036
  • Documentation proving the company’s existence (such as business registry certificates or notarized documents)
  • The tax identification code and power of attorney of the individual signing the VAT registration request

This process results in obtaining a NIF for non-residents. For intra-community transactions, businesses must also request inclusion in the VIES (or ROI - Registro de Operadores Intracomunitarios).

How to verify a Spanish VAT Number

Verifying a Spanish VAT number is essential when dealing with a Spanish company. It is also crucial when working with a foreign entity that has a permanent establishment in Spain.

There are two main ways to check a Spanish VAT number for free:

However, when dealing with numerous transactions involving Spanish businesses, manual verification may not be a long-term solution. To optimize workflows, companies can automate VAT number verification using APIs.

The Company Start Spain service allows real-time access to Spanish company data, including VAT number, business status, and headquarters. The Company Advance service provides deeper insights, such as revenue and employee numbers, for evaluating potential business partners.

Spanish VAT number: how it works and how to check it
Share on