esc
ID checkers

Validar CIF:
NIF de empresa

Type a CIF or company NIF to check its control character and see which legal form its letter stands for.

More tools for Spain Other countries

How to use Validar CIF

  1. 01Type the CIF9 characters, any case.
  2. 02See the resultValid or not.
  3. 03Read the formS.A., S.L., asociación …
Front and back of an ID card on one sheet of paper

Q2918001E: organismo público, control E.

A Spanish company NIF, still widely called CIF, is a letter for the legal form, seven digits and a control character. Depending on the letter, the control is a digit, a letter or either. The tool works out the right one and explains each step.

Validar CIF online: type a Spanish company NIF and the tool tells you whether the control character is right, what legal form the first letter stands for, and whether the control should be a digit or a letter. Leave off the last character and it works it out.

CIF, NIF and what the letter means

Since 2008 the official name for a company’s tax number is NIF, but the format of the old CIF didn’t change: a letter, seven digits and a control character. Orden EHA/451/2008 lists the letters.

  • A sociedad anónima, B sociedad de responsabilidad limitada, C sociedad colectiva, D sociedad comanditaria.
  • E comunidad de bienes, F cooperativa, G asociación, H comunidad de propietarios, J sociedad civil.
  • P corporación local, Q organismo público, R congregación religiosa, S órgano de la Administración.
  • U unión temporal de empresas, V other types, N foreign entity, W permanent establishment of a non-resident.

Calcular el carácter de control

Example: Universidad de Málaga, Q2918001E. Even places 9 + 8 + 0 = 17. Odd places doubled: 4, 2, 0, 2 → 8. 17 + 8 = 25, 10 − 5 = 5, and 5 as a letter is E.

  1. Take the seven digits after the letter.
  2. Add the digits in the 2nd, 4th and 6th places.
  3. Double each digit in the 1st, 3rd, 5th and 7th places and add the digits of each result (14 counts as 1 + 4 = 5). Add those up.
  4. Add both totals and take the last digit. The control is 10 minus that digit, or 0 if the last digit is 0.
  5. As a letter, the control uses J for 0, A for 1, B for 2 … I for 9.

Digit or letter?

  • Always a letter: P, Q, R, S, N and W, and any NIF whose 2nd and 3rd characters are 00.
  • Always a digit: A, B, E and H.
  • Either: C, D, F, G, J, U and V.

At a glance

Price
Free. No sign-up, no watermark.
Privacy
Your text stays in your browser. Nothing is uploaded.
Works in
Chrome, Edge, Firefox and Safari, on phones and computers

Questions

¿Cómo se calcula el dígito de control del CIF?

Take the 7 digits. Add the 2nd, 4th and 6th. Double the 1st, 3rd, 5th and 7th and add the digits of each result. Add both totals and subtract the last digit from 10 (10 counts as 0). That is the control digit; as a letter, J = 0, A = 1 … I = 9.

When is the control a letter and when a digit?

For P, Q, R, S, N and W it is a letter; for A, B, E and H it is a digit; for the other letters either is accepted. The tool checks for the right type.

Is CIF the same as NIF?

Since 2008 the official name is NIF for companies too, but the format didn’t change, so a CIF and a company NIF are the same number.

Does it check the company exists?

No. It only checks the letters and digits. To confirm a company, use the Agencia Tributaria or the Registro Mercantil.

Do the two digits after the letter still mean the province?

On older numbers they showed the province where the entity was registered. Newer numbers no longer carry that meaning, so the tool doesn’t read it.

Can it check a DNI or NIE?

No. Use the DNI letter calculator for those; this page is for companies and other entities.

Is the CIF sent anywhere?

No. The check runs in your browser.