Tax Identification Number (NIF) and Electronic certificate
NIF (Personal Tax ID) of Individuals

As a general rule, the Tax ID Number (NIF) of the individuals of Spanish nationality will be their DNI (Spanish National ID) followed by the verification code and for those that are not Spanish nationals, it will be the NIE (Foreign National ID). The Ministry of the Interior is the competent body for its allocation.
All liable taxpayers will have to include their Tax ID Number in all the self-assessments, declarations, communications or writings that they submit to the Tax Administration. If the liable taxpayer does not have this number, he will have to request for an allocation.

There are two cases in which it is not obligatory for Spanish citizens to have their DNI (Spanish National ID) -- individuals younger than fourteen years of age and individuals older than fourteen years of age who are resident abroad and travel to Spain for a time inferior to six months. Yet all of them should have their NIF (Personal Tax ID) when they are going to carry out an operation of a taxable nature or transcendence. All liable taxpayers will be able to obtain the DNI (Spanish National ID) voluntarily or they may request from the Tax Administration the allocation of a NIF (Personal Tax ID) that it will have an initial letter that will point to the nature of the number: L, for the Spanish residents abroad, and K, for the Spaniards residing in Spain who are younger than 14 years of age.

Similarly, the individuals who are not Spanish nationals and do not have a NIE (Foreign National ID), whether in a temporary way, as they are under the obligation of having it, or in a definitive way when they are not under the obligation of having it, will have to request from the Tax Administration the allocation of a NIF (Personal Tax ID) when they have to carry out operations of a taxable nature or transcendence. The number will be made up of nine characters with the following distribution: an initial letter, specifically an M, destined to indicate the nature of this number, followed by seven alphanumeric characters and an alphabetical verification character. 

 Those who have a K, L or M type NIE (Foreign National ID) and later obtain a DNI (Spanish National ID) or the NIE (Foreign National ID) will have to communicate this circumstance to the Tax Administration and to the rest of people or bodies who should know about their new NIF (Personal Tax ID) within two months. The previous NIF (Personal Tax ID) will be effective up to the date of communication of the new one.
NIF (Personal Tax ID) of legal persons and organisations
Every legal person, as well as parties required to pay taxes under Article 35(4) of General Tax Act 58/2003 of 17th December, shall possess a Tax ID number to be used in any interactions of a tax nature or with a bearing on taxation.
Royal Decree Law 1065/2007, which came into force on January 2008 and approved the General Regulations on tax management and inspection procedures and actions as well as on the development of common procedural standards for the application of taxes, sets forth the general rules on allocation and revocation, on the composition of the Tax ID code and on the way in which it must be used in interactions of a tax nature or relevant to taxation, in accordance with the Sixth Additional Provision of the General Tax Act.

The Tax ID Number of legal persons and organisations without a legal personality shall consist of nine characters with the following composition:
One letter, which will provide information on the legal form of a Spanish organisation or, if applicable, on the nature of a foreign organisation or permanent establishment that is resident outside Spain
A random seven-digit number
A control character
Codes for the different legal forms of Spanish organisations
For Spanish organisations, the Tax ID Number will begin with a letter which will provide information on the organisation's legal form, as per the following key:
A - Sociedades anónimas
B - Sociedades de responsabilidad limitada
C - Sociedades colectivas
D - Sociedades comanditarias
E - Comunidades de bienes y demás entidades carentes de personalidad jurídica no incluidas expresamente en otras claves
F - Sociedades cooperativas
G - Asociaciones
H - Comunidades de propietarios en régimen de propiedad horizontal
J - Sociedades civiles
P - Corporaciones Locales
Q - Organismos públicos
R - Congregaciones e instituciones religiosas
S - Órganos de la Administración del Estado y de las Comunidades Autónomas
U - Uniones Temporales de Empresas
V - Otros tipos no definidos en el resto de claves
Code for foreign organisations
N - Legal persons and organisations without legal personality that do not have Spanish nationality
Code for permanent establishments of non-resident organisations
W - Permanent establishments of organisations that are not resident in Spain.
Inside the scope of the responsibilities of the State, it falls to the Tax Agency to allocate a Tax ID Number to the legal persons and organisations that request one. Should they not request one, the Tax Agency shall be entitled to proceed ex-officio, including them in the Census of Taxpayers and allocating the relevant Tax ID Number.
The Tax ID Number allocated by the Tax Agency to legal persons and organisations shall remain the same regardless of any changes that may occur, except for changes in legal form or nationality.
Parties required to pay taxes must include their NIF (Personal Tax ID)in all self-assessments, tax returns, communications or documents relevant to taxation that are issued as a result of their activity and in transactions with credit institutions, and must provide their NIF to other parties required to pay taxes in compliance with the provisions of the law governing taxation.
The NIF (Personal Tax ID) that has been allocated can be accredited by its holder by showing the Card provided for this purpose, issued by the Tax Agency, and the authenticity of the Card can be verified on the website of the Tax Agency.

Tax Identification Number (NIF).pdf


For more information, please visit Agencia Tributaria - NIF (Personal Tax ID) of Individuals





1.- SUBMIT YOUR APPLICATION in person at this Consulate. Following documents:
• Application form. Download it from our Website. Select the appropriate form from the following options: individuals, corporations and non-legal entities. Print two copies and sign them in the presence of the consular official, who will give you back one copy.
• Individual applicants must provide ID card or other document containing their ID Number (DNI, NIE, NIF L o NIF M), and copy.
• Corporations and non-legal entities must provide:
- Documents referred to the Corporation/entity:
·        ID card or other document specifying Tax Id Number (NIF) issued by the Spanish Government.
·        Deed, contract, by-law, agreements and other documents certifying the incorporation, current existence and identification of members. Non-Spanish companies must provide documents from the country of legal origin.
- Documents referred to the individual signing the application as a legal representative:
·        ID card or other document containing your ID Number (DNI, NIE, NIF L o NIF M), and copy.
·        Power of Attorney for the signatory to act on behalf of the company/entity. It will be enough a certificate from the Authority of the country of registration stating the signatory as the company legal representative.
If you are applying also for a NIF at the same time, you will not need to provide other documents than those already presented for NIF application, in order to obtain your FNMT Electronic Certificate.
2.- OBTAIN THE APPLICATION CODE: Follow these steps from a computer available for your personal use, safe and without any session restrictions:
Click on the link “OBTENGA SU CERTIFICADO DIGITAL” (the last one on the right side), go to the menu “PERSONA FÍSICA”, the first on the left, and click on the submenu “OBTENER CERTIFICADO SOFTWARE”.
Once the 1st step is completed (“Configuración del Navegador”), click on the 2nd (“Solicitud vía Internet de su Certificado”), enter your NIE, first surname and email address. If, as a Spanish citizen, you have two surnames, you must enter ONLY THE 1st surname. Click on “Enviar petición”. The following message will appear, followed by a 9 digit number: “El código de solicitud para el NIF (…) es: (9 digit number)”. Write or print this number.
3.- SEND AN EMAIL TO THE CONSULATE ( within 10 days from the application (step 1). It must be sent from the email address that you specified on the application form and will include:
• Application code (see step 2).
• Applicant´s name and NIF (Company NIF too, in its case).
• Date when the application was signed.
If you miss the 10 day deadline, you will be required to resubmit all the documents personally at this Consulate, with your application code.
4.- DOWNLOAD YOUR CERTIFICATE. Within the 10 day window, after sending your email, you must download your certificate from the same computer, session and Web browser that you use on step 2.
For that, go to the FNMT Webpage and click again on the link “OBTENER CERTIFICADO SOFTWARE”. This time go to the submenu “DESCARGAR CERTIFICADO”, and follow the instructions.
You have the possibility to copy the certificate in a different computer and to back it up. Please check on the Web site for more information and for the terms of use.
If you have lost your certificate or for any reason you could not finally download it, you do not need to cancel it, simply restart the process and a new certificate will then be issued.



  • 19 Oct @ConEspMONTREAL * Con ocasión de la reunión del Consejo Europeo, aprovechamos para recordar la posición oficial de España frente al…
  • 19 Oct @ConEspMONTREAL * #DíaContraelCáncerdeMama La detección precoz, la supervivencia de los casos y la investigación son las prioridades…
  • 19 Oct @ConEspMONTREAL * Día de clausura de la 7ª edición de la Semana Hispanofónica. Agradecemos al Centro de Lenguas de @UQAM la difusión…
  • 18 Oct @ConEspMONTREAL * Más cifras sobre la percepción que tienen los españoles sobre la Unión Europea 🇪🇸🇪🇺
  • 18 Oct @ConEspMONTREAL * DATO: El 62% de los españoles considera que ser miembro de la UE es algo bueno; el 26%, ni bueno ni malo; el 9%, ma…
  • 18 Oct @ConEspMONTREAL * León toma el relevo de Huelva como capital gastronómica de España. La cecina, el botillo y los quesos de Valdeón av…
  • 18 Oct @ConEspMONTREAL * La Semana Hispanofónica 2017 de la @UQAM nos trae hoy movilidad internacional, lengua & identidad y una proyección…
  • 18 Oct @ConEspMONTREAL * La obra de Caum versa sobre las víctimas olvidadas de la guerra civil de El Salvador (1980-92) usando el simbolismo del cuadro de Picasso.
  • 18 Oct @ConEspMONTREAL * Mañana a las 14.00h el cineasta español Ferrán Caum presenta en la Universidad de Concordia su aclamado cortometraj…
  • 17 Oct @ConEspMONTREAL * El programa incluirá piezas de Turina, Granados y de Falla. Las entradas oscilan entre 25 y 35 CAD. Para más info:
  • 17 Oct @ConEspMONTREAL * El 11 de noviembre la asociación musical Camerata Montréal celebra un concierto en honor a la música española en la Chapelle Historique.
  • 17 Oct @ConEspMONTREAL * España, la UE y la comunidad internacional siguen avanzando hacia la total erradicación de la pobreza, el 1º objeti…
  • 17 Oct @ConEspMONTREAL * La Comisión Europea expresa su pésame por las víctimas de los incendios que asolan Galicia y Portugal. Nos unimos a…
  • 17 Oct @ConEspMONTREAL * @UQAM El evento busca explorar y reflexionar acerca de la interacción de la lengua española y los pueblos. Más info…
  • 17 Oct @ConEspMONTREAL * Hoy continúa la 7ª Semana Hispanofónica en la École de Langues de @UQAM con tres diferentes conferencias sobre la i…


  • Nouveau Visas Schengen
  • Instagram
  • Twitter SpainMFA
  • Twitter
  • MAEC / Sede Palacio de Santa Cruz
    Plaza de la Provincia, 1
    28012 MADRID
    Tfno: 91 379 97 00
  • MAEC / Sede Palacio de Viana
    Duque de Rivas, 1
    28071 MADRID
    Tfno: 91 379 97 00
  • MAEC / Sede Torres Ágora
    Serrano Galvache, 26
    28033 MADRID
    Tfno: 91 379 97 00
    Avda. Reyes Católicos, 4
    28040 MADRID
    Tfno: 91 583 81 00 / 01
    Fax: 91 583 83 10 / 11
  • Dirección General de Españoles en el Exterior y de Asuntos Consulares y Migratorios
    C/ Pechuán, 1
    28002 MADRID
    Tfno: 91 379 17 00
Gobierno de España
©Ministerio de Asuntos Exteriores y Cooperación
Portal gestionado por la Oficina de Información Diplomática