For many foreign residents in Spain, the first real shock is not the sunshine, the paperwork, or even the opening hours. It is discovering that a huge amount of Spanish administration now happens online, and that you need the right digital identification before you can get very far.
That is where Cl@ve comes in. Cl@ve is Spain's official electronic identification system for accessing public administration services online. It allows individuals to identify themselves securely when dealing with government bodies such as the Tax Agency, Social Security, regional administrations, town halls and other public services.
Cl@ve PIN is one part of that system. It is commonly used for short-term access to online procedures, especially when logging into government websites such as the Agencia Tributaria. In recent years, Spain has also placed more emphasis on Cl@ve Mobile, which allows users to confirm access through the Cl@ve app, often by scanning a QR code or approving an authentication request on their phone.
If you live in Spain, Cl@ve can save you a lot of time. It can be used for tasks such as checking tax information, filing a Spanish income tax return, viewing Social Security records, accessing some residency-related procedures, checking notifications, updating certain personal details and completing forms that would otherwise require an in-person appointment.
For expats, students, remote workers, retirees and self-employed people in Spain, Cl@ve is not just a technical extra. It can quickly become part of everyday life. Once you have your Spanish NIE number, your padrón, tax address and other basic paperwork in place, registering for Cl@ve is one of the next practical steps worth taking.

Cl@ve PIN is a temporary electronic identification method used in Spain to access official online services. Instead of relying only on a permanent password, the system allows you to request a temporary PIN or confirm your identity through the Cl@ve app.
In practical terms, it helps prove that the person trying to access an online public service is really you. This matters because many of the procedures connected to Cl@ve involve sensitive information, including tax records, personal identification data, Social Security information and official communications from Spanish public bodies.
Cl@ve is designed for people who need to interact with Spanish public administrations electronically. Spanish citizens use it, but it is also useful for foreign residents with an NIE or TIE who need to deal with tax, employment, healthcare, residency or municipal procedures online.
It is important to understand that Cl@ve PIN, Cl@ve Mobile and Cl@ve Permanente are connected but not exactly the same thing. Cl@ve PIN is generally used for temporary access. Cl@ve Mobile allows authentication through the official app. Cl@ve Permanente is a more stable password-based system used for certain services, although not every public body uses it in the same way.
You may need Cl@ve when dealing with Spanish tax matters, checking your draft income tax return, accessing Social Security records, downloading certain certificates, receiving official notifications, completing some online forms, or checking information held by public bodies.
For example, someone who is self-employed in Spain may use Cl@ve or a digital certificate for Spain to manage tax and Social Security procedures. A retiree may use it to check official records or notifications. A foreign student or worker may need it later when dealing with residency, appointments or administrative updates.
Cl@ve is also useful because getting appointments in Spain can be slow. If you can complete a procedure online, you may avoid queues, missed appointments, travel time and the usual “come back with another photocopy” routine that seems to have been designed by someone with a personal grudge against printers.
Cl@ve is available to people who can properly identify themselves through the registration process. Spanish citizens usually register with their DNI. Foreign residents normally register using their NIE and the support number shown on their residence document, TIE card, EU certificate or other accepted identification document.
If you are a foreigner in Spain, make sure the details on your documents are correct before starting. You will usually need your NIE, the support number from your document, a mobile phone number and an email address. If you are using a foreign mobile number, you may need to include the correct country prefix.
One important rule is that only one DNI or NIE can normally be associated with the same mobile phone number. This can catch couples and families out if they try to use the same phone number for several people. If the system detects that the mobile number is already linked to another person, it may disable Cl@ve access for the previous user.
If you do not yet have your NIE, read our guide on how to get your NIE number in Spain first. If you are unsure how DNI, NIE, NIF and CIF differ, our guide to Spain's tax codes is a useful place to start.
There are several ways to register for Cl@ve. The best option depends on whether you already have a digital certificate, whether you can attend an office in person, and whether the online video identification options are available to you.
The main registration routes are online registration using an invitation letter, online registration with a digital certificate or electronic DNI, registration through certain video identification routes where available, and in-person registration at an authorised registration office.
For many foreign residents who do not yet have a digital certificate, the invitation letter route remains one of the most common options. It is not the fastest method because you must wait for a letter to arrive at your tax address, but it is often the most realistic route for people who are still getting their Spanish paperwork in order.
If you already have a Spanish digital certificate, registration is usually much faster. This is one reason many foreign residents eventually choose to get both Cl@ve and a digital certificate. They overlap in some areas, but a digital certificate can still be more powerful for certain formal procedures.
If you do not have a digital certificate or electronic DNI, you can register online by requesting an invitation letter. This letter is sent by post to the tax address held for you by the Spanish Tax Agency.
To begin, go to the official Tax Agency Cl@ve registration page and choose the option to register in Cl@ve. You will be asked to enter your DNI or NIE. If you enter a DNI, the system may ask for the validity date or issue date. If you enter an NIE, it will usually ask for the support number shown on your foreigner document.
After your details are validated, the system should offer the option to request an invitation letter. This is normally worded along the lines of sending the letter to your tax address. If you accept, the Tax Agency records the request and sends the letter to the address it has on file.
This is where many expats run into problems. If your tax address is out of date, the letter may go to the wrong place. If you have moved recently, or if you are not sure what address the Tax Agency has for you, it is worth sorting that out before relying on the postal letter route.
You may also find that your padrón address, tax address and actual living address are not always the same in different systems. Spain does love a database, but sadly the databases do not always talk to each other like civilised adults.
Once the invitation letter arrives, look for the Secure Verification Code, known in Spanish as the CSV. This is a 16-character code made up of numbers and capital letters.
You then return to the same Cl@ve registration option online. Enter your DNI or NIE again, together with the requested validity date, issue date or support number. This time, select the option confirming that you already have an invitation letter.
Enter the 16-character CSV from the letter and continue. If the code is accepted, you will then provide your mobile phone number and email address, read and accept the conditions, and submit the registration.
There is an important time limit. The CSV code in the invitation letter is valid for 60 days. If you do not use it within that period, it expires and you will need to request a new letter or use another registration method.
After completing registration, you should receive confirmation and may be able to download proof of registration. Keep this document safe, especially if it includes information connected to activating Cl@ve Permanente.
If you already have a valid digital certificate or electronic DNI, you can register in Cl@ve online without waiting for an invitation letter. This generally gives you an advanced registration level, which may be needed for some procedures.
During the process, you identify yourself using the certificate or electronic DNI, provide the requested document support number, enter your mobile phone number and email address, accept the terms and submit the registration.
For foreign residents, the digital certificate route can be very useful once it is set up. If you are going to live in Spain long term, work here, run a business, file regular tax returns, or deal with frequent administrative procedures, it is worth considering a digital certificate as well as Cl@ve.
You can also register for Cl@ve in person at an authorised registration office. This may include certain Tax Agency offices, Social Security offices, town halls or other authorised public offices, depending on your location.
In-person registration can be useful if the online route fails, if you cannot receive the invitation letter, if your mobile number needs updating, or if you need a higher level of registration for certain services.
You should normally book an appointment before going. Take your valid passport, NIE or TIE, and any other identification documents that may be relevant. Requirements can vary slightly depending on the office, so it is sensible to check the appointment page or office instructions before attending.
Cl@ve has offered different video identification routes, including options through the Cl@ve app. However, availability and eligibility can vary, and some video identification services may be limited, temporarily disabled, or restricted to Spanish citizens with a valid DNI.
For that reason, foreign residents should not assume that video identification will always be available with an NIE. Check the official Cl@ve page at the time you register. If the video option is not available to you, the invitation letter, digital certificate or in-person office route will usually be the safer choice.
Once registered, you can use Cl@ve on public administration websites that support it. When you access a procedure, look for the Cl@ve identification option. In many cases, this may appear as Cl@ve Mobile, which includes Cl@ve PIN.
If you use the Cl@ve app, the website may show a QR code. You open the app, scan the QR code, check that the verification code and organisation match, and confirm the request on your phone. You may then need to unlock your device using fingerprint, face recognition, PIN, pattern or another security method.
If you cannot scan the QR code, there may be an option to continue without QR reading by entering your DNI or NIE and the requested verification data. Depending on the procedure, you may then confirm through the app or receive a PIN by SMS.
Authentication requests are time limited, so do not start the process and then wander off to make coffee. Have your phone nearby and make sure you can access your SMS messages or the Cl@ve app before beginning.
One of the most common problems is not receiving the SMS with the PIN. If this happens, first check that the last digits of the phone number shown on screen match your current mobile number. The phone number used to receive the PIN must be the same one registered in the Cl@ve system.
If the number is correct but the SMS still does not arrive, try again, check your mobile signal, restart your device, make sure your inbox is not full and check whether your phone provider is blocking this type of message. Some antivirus or filtering apps may also interfere with SMS delivery.
The official advice is to install the Cl@ve app where possible, as this can reduce reliance on SMS messages. The app is often more convenient once it is activated properly.
Another common issue is entering the support number incorrectly. On foreigner documents, the support number can be easy to confuse with other numbers. Use the help links on the official registration page if you are not sure where to find it on your TIE, EU certificate or residence document.
The CSV code in the invitation letter is valid for 60 days. If you try to use it after that period, it will no longer work. In that case, you will need to request a new invitation letter or register using another method.
Each DNI or NIE should normally have its own mobile number linked to Cl@ve. If a couple or family tries to use the same mobile number for several registrations, the system may block access or disable the previous user's registration.
You may also have problems if the procedure you are trying to access requires an advanced registration level rather than a basic one. This can happen even if your Cl@ve registration itself works correctly.
Not all Cl@ve registrations are equal. Registration by invitation letter usually gives a basic registration level. Some online services accept this, but others may require advanced registration.
Advanced registration is usually obtained through in-person registration, registration with a digital certificate or electronic DNI, or certain reviewed video identification routes where available. This distinction matters because some users successfully register for Cl@ve but later find that a specific procedure still blocks access.
If that happens, the issue may not be your PIN. It may be that the public body requires a higher identity assurance level. In that case, you may need to upgrade your registration method, register in person, or use a digital certificate.
For everyday identification, Cl@ve is often easier. It is especially useful for checking records, accessing tax information, confirming identity and completing common procedures.
A digital certificate can be more powerful for signing documents, filing certain forms, dealing with business administration, or completing procedures where formal electronic signature is required. Many long-term residents in Spain eventually use both.
If you only need to check the odd record or access the Tax Agency once a year, Cl@ve may be enough. If you are self-employed, running a company, dealing with immigration paperwork, buying property, submitting regular tax forms or managing official matters frequently, a digital certificate is strongly worth considering.
Once registered, Cl@ve can help with many Spanish administrative tasks. These may include accessing Renta Web for income tax, checking Social Security information, viewing official notifications, accessing some municipal or regional services, downloading certain certificates, checking tax data and managing selected procedures online.
For example, if you need to file a return, read our guide on how to file an income tax return in Spain. If you are registering locally or need proof of address for other procedures, our guide to empadronamiento in Spain may also help.
If you are working in Spain or planning to become self-employed, Cl@ve may also be useful when dealing with Social Security. You can read more in our article on getting a Social Security number in Spain.
Cl@ve PIN is one of the most useful digital tools for anyone living in Spain. It will not remove every bit of bureaucracy from your life, but it can make many official procedures faster, safer and easier to manage from home.
If you are new to Spain, the best approach is to get your basic paperwork in order first: NIE, address registration, tax address, mobile number and email. Once those details are stable, registering for Cl@ve becomes much easier.
For most foreign residents without a digital certificate, the invitation letter route remains a practical starting point. Just remember that the CSV code expires after 60 days, your mobile number must be correct, and some procedures may require a higher registration level.
Once everything is working, Cl@ve can save you repeated office visits and help you stay on top of Spanish administration. In a country where the right login can sometimes be as valuable as the right appointment, that is no small thing.
If you are applying for residency, moving to Spain, studying here, working remotely or already living in Spain, having the right private health cover can make the administrative side of life much easier. HealthPlanSpain offers Sanitas health insurance options for visa applications, residency, students, families, self-employed people and long-term residents.
Quick guide to Sanitas health insurance in Spain
Tax Agency guide to Cl@ve registration with CSV
How to request the Cl@ve invitation letter