Spanish System
Digital certificate and Cl@ve in Spain: how to get them as a foreigner
How foreign residents with an NIE get the FNMT digital certificate and register in Cl@ve, which one to get first and what you can do online with them.
Updated: October 2026
Sooner or later, almost every Spanish government website will ask you to identify yourself with a certificado digital or Cl@ve. Without one of them, many simple tasks mean booking an appointment and queuing at an office. This guide is for foreign residents with an NIE who want to deal with tax, Social Security, traffic and town hall paperwork online. You will learn what each tool does, which one to get first and how to apply step by step.
What the digital certificate and Cl@ve are
Both are ways to prove who you are online to the Spanish public administration. They do the same basic job – logging you in – but they work quite differently.
- Digital certificate (certificado digital): an electronic file installed in your browser, issued by the FNMT (Fábrica Nacional de Moneda y Timbre). The version for private individuals is called the certificado de persona física. It lets you log in and also sign documents electronically.
- Cl@ve: the government login system linked to your NIE and your mobile number. Once registered, you can log in with Cl@ve Móvil (you approve a notification on your phone), Cl@ve Permanente (a long-lasting password for frequent users) or Cl@ve PIN (a short-lived code for occasional use).
The big portals – the Agencia Tributaria (tax agency), Social Security’s Import@ss, the DGT (traffic), SEPE (employment) and many regional health services and town halls – generally accept both. Some formal procedures where you sign and submit documents work best with the certificate.
Which one should you get first?
Ideally, get both – they complement each other. If you have to choose, this comparison helps:
| FNMT digital certificate | Cl@ve | |
|---|---|---|
| Cost | The certificate is free | Free |
| Where it lives | In your browser (plus a backup file) | Linked to your NIE and mobile phone |
| Identity check for NIE holders | In person at an accreditation office | In person, or online if you already have a certificate |
| Electronic signature | Yes | Mainly for logging in |
| Validity | Four years, then renew | Stays active while your details are up to date |
A practical rule: if you are self-employed (autónomo), run a company, own property or deal with Hacienda often, the digital certificate is close to essential. If you mainly need your employment record, health appointments or the odd form, Cl@ve is usually enough to start. A handy shortcut: once you have the certificate, you can register in Cl@ve online in minutes.
What you need before you start
- Your NIE plus a document that shows it: your TIE card, your EU registration certificate (the green certificate) or the official NIE grant document. See our guide on how to get your NIE if you do not have one yet.
- Your passport – EU citizens can usually use their national ID card instead.
- A mobile number and an email address. Cl@ve accepts Spanish or foreign mobile numbers, but each NIE can only be linked to one number.
- A computer with a supported browser for the certificate request and download.
How to get the FNMT digital certificate
The standard route for foreigners is the “software certificate” with an in-person identity check. It takes four steps, which must be done in this order:
- Prepare your computer. Follow the FNMT’s “configuración previa” instructions on its website. Use the same computer and the same browser for the whole process, because the certificate is generated in that browser.
- Request the certificate online. On the FNMT site, choose the persona física certificate, enter your NIE, first surname and email address. You receive a request code (código de solicitud) by email.
- Prove your identity in person. Take the request code, your NIE document and your passport to an Oficina de Acreditación de Identidad. The FNMT lists more than 2,400 offices and has an office finder. Some, such as tax agency and Social Security offices, require an appointment. Post offices (Correos) cannot do this certificate. If you are outside Spain, a Spanish consulate can do the identity check.
- Download and back up. Once your identity is confirmed, download the certificate on the same computer and browser using your request code. Do it soon, then export a backup copy protected with a strong password and store it somewhere safe.
Video identification and other routes
The FNMT also offers identity checks by video from home. At the time of writing, this requires a valid Spanish electronic DNI and costs 2.99 euros plus tax (the certificate itself is still free), so it is not an option for most people with an NIE. If you cannot attend the office yourself, someone can go on your behalf, but your signature must first be legalised by a notary.
Validity and renewal
The persona física certificate is valid for four years. You can renew it online during the 60 days before it expires, as long as it has not been revoked. If your certificate was obtained by video identification or has already been renewed online once, you have to prove your identity again. Put a reminder in your calendar – an expired certificate always seems to happen the week your tax return is due.
How to register in Cl@ve
Registering links your NIE to your mobile number and email. There are four routes, but not all are open to foreign residents:
- In person at a Cl@ve registration office: the most reliable route for NIE holders. Bring your TIE or registration certificate and your passport. Some offices need an appointment – use the office finder on administracion.gob.es.
- Online with a digital certificate: if you already have the FNMT certificate, you can register through the Agencia Tributaria’s electronic office without leaving home.
- Online without a certificate (invitation letter or video call): gives only a basic level of registration, which does not open every service.
- Video identification in the Cl@ve app: at the time of writing, only available to Spanish nationals with a valid DNI.
Choosing your login method
After registering, install the official Cl@ve app and activate it with your NIE and registered mobile number. From then on, Cl@ve Móvil is the easiest option: you type your NIE on the government site and approve the request on your phone. Cl@ve PIN suits people who only log in occasionally, while Cl@ve Permanente is a password you set yourself for frequent use.
What you can do once you have them
- Tax: file your income tax return, see your tax data, pay and download tax certificates. Our guide to the Spanish tax system explains the basics.
- Social Security: request your Social Security number, download your vida laboral (employment record) and update your details in Import@ss.
- Traffic: check your licence points, vehicles and fines on the DGT site.
- Town hall: many town halls let you download a padrón certificate online – see our padrón guide.
- Official notifications: read letters sent to you electronically by public bodies instead of waiting for the post.
Common problems and practical tips
- “My certificate has disappeared”: you probably changed browser or computer. Import your backup file into the new browser.
- New phone number: update it in Cl@ve straight away, or you will not receive codes or notifications.
- NIE format: type your NIE exactly as it appears, including the letters at the start and end.
- Working with a gestor: rather than handing over your certificate file and password, ask your gestor to act as your authorised representative with their own credentials.
- Avoid scams: official sites end in .gob.es or .es, and no public body will ask for your Cl@ve password or certificate by phone or email.
Useful links
- FNMT – proving your identity for the persona física certificate
- FNMT – renewing your certificate (Spanish)
- administracion.gob.es – registering in Cl@ve
- How to get your Spanish NIE number
- Residency in Spain: how to become a legal resident
- How to register on the padrón
FAQ: digital certificate and Cl@ve
Can I get a digital certificate without an NIE?
No. The FNMT certificate for individuals is linked to your Spanish tax identification number, which for foreigners is the NIE. Get your NIE first.
Does the digital certificate cost anything?
The certificate itself is free, and so is the in-person identity check. Only the video identification service, which currently requires a Spanish DNI, has a small fee.
Can I use Cl@ve with a foreign mobile number?
Yes, registration accepts Spanish and foreign mobile numbers. Each NIE can only be linked to one mobile number, so do not share a number with your partner.
What happens when my certificate expires?
You can renew online in the 60 days before expiry if the certificate is still valid and has not already been renewed online once. Otherwise, request a new one and prove your identity again.
Disclaimer: This article is general information only and is not legal advice. Procedures, requirements and fees can change – always check the official FNMT and Cl@ve websites before you act, and ask a gestor or lawyer if your situation is complicated.
