Tax identification number: differences among NIF, NIE, CIF

Tax identification number: differences among NIF, NIE, CIF

2021-11-15 18:04:53

If you pay taxes in Spain, you will become familiar with ta identification numbers. When you go to a tax office or social security office, you might be asked about different numbers. In order for you to not get lost, this article is a guide to identify different numbers such as NIF, NIE, CIF, and the social security number.

1. Spanish tax numbers: NIF, NIE, CIF

  • NIF (Número de identificación fiscal):
    • Tax ID for Spanish citizens
    • It consists of 8 numbers and 1 or 2 letters
  • NIE (Número de identificación de extranjero):
    • Tax ID for foreigners and non-citizens, the usual tax number for foreigners living in Spain
    • Non-resident foreigners with Spanish property or with legal or financial transactions in Spain are also included
    • In this case, the NIE number is the same as the NIE number you get for your legal residency
    • It consists of 7 numbers and 2 letters
  • CIF (Certificado de Identificación fiscal):
    • This is also the VAT number of the Spanish company
    • It consists of 8 numbers and a letter. The letter usually refers to the company type (eg. Ltd company)

You might also know the social security number, called as número de seguridad social or número de afiliación in Spanish. This is not a tax identification number, but it's related to your social security contributions and the benefits you can receive from the social security system.

2. Who needs a Spanish tax number?

The short answer for this question is: everyone or every entity that pays tax in Spain, no matter if you are an employee or a freelancer, a worker or a company. The tax identification number for the Spanish tax agency to calculate and supervise the taxes required to be paid and ensure the normal functionality of the society.

If you are a foreigner and will stay for more than three months, you will need a Spanish visa (eg. student visa, non-lucrative visa, or investor visa) and an NIE number to guarantee your legal stay. The NIE number is the only effective identification number for you to stay legally in Spain. When applying for Spanish visas, visa insurance is a compulsory requirement for many types of visas.

3. How to apply for a Spanish tax number?

As a foreigner, you can apply for a tax number in the following ways:

  • To apply for the NIE number:
    • Local national police (Policía Nacional) station in your province: You need to first book an appointment here.
    • You can also find an authorized Spanish resident to represent you and apply for the number, whether he or she is a lawyer, friend, or family.
  • To apply for the CIF number:
    • You need to go to a local tax office in your municipality if you are living in Spain
  • To apply for the NIF number:
    • If you are living in Spain and decide to take Spanish citizenship, you need to apply for a NIF number. While you are waiting for the card to arrive, you can still use the NIE card.

4. Requirements needed to apply for a Spanish tax number

The requirements vary across different offices, but the common requirements are:

  • Valid ID card or passport
  • Empadronamiento if you live in Spain
  • Certificate of company registry (for obtaining a CIF)
  • Proof of company’s legal name, address, nationality, registration date, names, and NIE/NIF of company representatives

5. How to access your tax-related information online?

On the official website of the tax agency, you can have easy access to your personal tax information, notification, or alerts by using:

  • NIE, support number (número de soporte) and your cl@ve account
  • OR using the digital certificate


Agencia Tributaria: Inicio. (2021). Retrieved 15 November 2021, from

Our contents will be updated according to the most recent legislation. Last update: 15/11/2021

Search in Blog

Subscribe to our newsletter

Subscribe to receive health tips, latest medical news, and promotions.