Guides

NIF for foreigners in Spain: what it is, NIE, CIF, and how to apply

If a Spanish form asks for your NIF, first work out whether it means your existing NIE, an AEAT-assigned personal NIF, or an entity's tax ID.

Last updated

Which NIF does a foreigner use in Spain?

  1. Check whether you already have a NIE

    For a foreign individual, the NIF is the NIE assigned under Spain's foreigner-identification rules. If you already have a NIE, do not assume a tax form is asking you to create a second personal number.

    https://sede.agenciatributaria.gob.es/Sede/censos-nif-domicilio-fiscal/solicitar-nif/nif-persona-fisica.html
  2. If you have no NIE, use AEAT's individual route

    A foreign individual without a NIE must request an AEAT-assigned NIF when carrying out a transaction with tax significance. AEAT says this covers both a temporary situation when the person is required to obtain a NIE and a definitive one when they are not. The current individual route uses Modelo 030 and is separate from applying for a NIE.

    https://sede.agenciatributaria.gob.es/Sede/censos-nif-domicilio-fiscal/solicitar-nif/nif-persona-fisica.html
  3. Keep personal and entity NIFs separate

    Legal entities and other organisations use the separate AEAT entity route and Modelo 036. People still say "CIF" in everyday business language, but the official identifier for a company or other legal entity is a NIF.

    https://sede.agenciatributaria.gob.es/Sede/censos-nif-domicilio-fiscal/solicitar-nif/nif-persona-juridica-entidad.html
  4. Do not confuse format with census or VAT status

    A letter or checksum can show that a number has a plausible format. It cannot prove who owns it, whether it is current in AEAT's census, or whether an entity is registered for EU VAT. AEAT's third-party census check and the EU VIES service answer different, narrower questions.

    https://ec.europa.eu/taxation_customs/vies/

Before you apply for or check anything

This page separates a foreign individual's personal NIF from an entity NIF and from the old CIF label. It does not turn a format check into proof of identity, census status, or VAT registration.

Read the exact field or request first. A bank, invoice, tax form, and EU VAT check can use similar words while asking different questions.

  • Identify whether the field concerns you personally, a legal entity, or EU VAT registration.
  • If you already have a NIE, start from the official rule that this is your personal NIF.
  • Do not paste an identifier into an unknown third-party checker; use the official service for the named task.

Common questions about NIF and CIF

What is the difference between NIF and CIF?
NIF (Número de Identificación Fiscal) is Spain's tax ID for both individuals and legal entities. CIF (Código de Identificación Fiscal) was the older term used specifically for companies and other legal entities; since the change introduced by Real Decreto 1065/2007, that number is now formally called the NIF for legal entities, not a separate CIF.
What is my NIF if I am a foreigner in Spain?
If you already have a NIE, that number is your personal NIF for tax-related dealings. If you do not have a NIE and will carry out a tax-relevant transaction, use AEAT's individual NIF route; a NIF assigned directly to a foreign person without a NIE starts with M.
Why do some forms still say CIF?
CIF is the older business term for the tax identifier of a company or other legal entity. The official identifier is now a NIF, although CIF remains common in everyday forms and conversation.
How does a non-resident get a NIF in Spain?
A foreign individual without a NIE who will carry out a transaction with tax significance can use AEAT's individual NIF route and Modelo 030. AEAT says this can be temporary when the person must later obtain a NIE, or definitive when they are not required to obtain one. A non-resident entity uses the separate legal-entity route and Modelo 036.
What is the format of a Spanish NIF?
For a foreign individual with a NIE, the NIF is that NIE. Under article 20 of Real Decreto 1065/2007, a personal NIF assigned directly by AEAT to a foreign person without a NIE starts with M, followed by seven alphanumeric characters and a verification letter. Entity NIF formats follow separate rules.

This is general information, not legal advice. Guiri is not a lawyer or gestor. Always check the official portal linked above, and consult a professional for your specific case.