Getting a digital certificate in Spain as a foreigner was the first job on our list once our NIE came through, and it turned out to be one of the easier bits of Spanish admin we’ve done. One online form, one short office visit, and the certificate was ready to download the same day. It was also free.
Without an NIE you can’t request one. Once we had ours, everything we needed to do next seemed to start with “log in with your certificado digital”. Importing our cars, tax, the Seguridad Social (social security), town hall paperwork - all of it ran through government websites, and the certificate is one of the most secure ways in.
So here’s how it went for us, what the FNMT (Fábrica Nacional de Moneda y Timbre, the state mint that also issues these certificates) actually asks for, and what I’d do differently.
What is the digital certificate in Spain?
The certificado digital de persona física is a small file that sits in your browser or on your phone and proves to a government website that you are you. With it you can log in to the Agencia Tributaria, the DGT (the traffic authority), the Seguridad Social and most other Spanish sedes electrónicas (the official online offices), and you can sign documents electronically.
The FNMT’s certificate page (opens in new tab) says any Spanish or foreign adult with a DNI or NIE can get one, and that it’s free. The DNI is the Spanish national ID card, and the NIE is the foreigner’s number. There are four ways to get the certificate, but for a foreigner the realistic one is what the FNMT calls the software certificate with in-person identity check. The other three are further down.
What documents does a foreigner need for the digital certificate?
This is the part that differs from what Spaniards do, and the FNMT spells it out on its identity accreditation page (opens in new tab). Everyone needs the request code the FNMT emails you after the online form. On top of that:
- EU citizens: a foreigner’s identity card showing your NIE together with your passport, or the green EU registration certificate or official NIE assignment document together with your passport or your national ID card.
- Non-EU citizens: a foreigner’s identity card showing your NIE, or the official NIE assignment document, together with your passport.
The FNMT also says the passport has to be valid and an original (or an officially certified copy), and that only adults or emancipated minors can apply. We’re Dutch, so for us that meant passport plus NIE paperwork.
How it went for us
I did mine on a Linux laptop with Chrome, and it was fully compatible. No strange commands, no workarounds - the FNMT offers its software for Linux next to Windows and macOS, and everything just worked.
The first step was installing the government software from the FNMT site. The old version of this post only mentioned AutoFirma, but I used two tools: the Configurador FNMT-RCM, which the FNMT’s setup page (opens in new tab) lists for the request, and AutoFirma, the separate signing app I’ll come back to below.
With that installed, I filled in the request form: my name, my NIE and my email address. The software handled the rest and sent the request off to the FNMT, and an email came back with a request code.
Then I needed an appointment to prove I was really me. We booked at the Agencia Tributaria (AEAT, the tax office), which had more availability than anywhere else we looked, and I could go in a couple of days after making the request. At the desk they checked my passport, my NIE and the email with the code against the request - and rejected it. I hadn’t typed my official name, so the request didn’t match my passport.
Luckily I had my laptop with me, and they let me fix it on the spot. Once the corrected request matched my passport, they confirmed I was the person on it, and that was it.
Before I’d made it out of the building, a second email arrived saying the certificate was ready to download. The FNMT’s step-by-step page (opens in new tab) says to allow about an hour, so I was lucky.
My wife went to the AEAT too. The only thing I did differently for her was type her official name from the start, and nothing went wrong. Since then we’ve used our certificates for the car import, tax, the Seguridad Social and signing PDFs for the town hall, where we’d already registered on the padrón in person. I also exported mine and moved it to another device, which I’ll get to in a moment.
How to get a digital certificate in Spain: what I’d do again
If I were starting over, this is the order I’d follow:
- Get your NIE first. The request asks for it, and so does the office.
- Book the identity appointment early. The Agencia Tributaria’s guide (opens in new tab) says its offices need an appointment for this step and suggests getting one before you even send the request. The FNMT’s office map (opens in new tab) shows the other offices near you.
- Install the Configurador FNMT-RCM on the computer you’ll keep using, from the FNMT’s setup page.
- Fill in the request with your official name, exactly as it appears in your passport and NIE paperwork. Pick a password you won’t forget - the FNMT says it can’t be recovered, and you’d have to start the request again.
- Go to the appointment with your passport, your NIE document and the request code. If you can, bring the laptop you made the request on - it’s what saved my visit.
- Download the certificate on the same computer and user account, then make a backup copy straight away.
The things that catch people out
Your name. This is the one thing I’d do differently. The first time, I didn’t use my official name, and the office rejected the request until I’d corrected it. For my wife’s, I typed her name exactly as it appears in her passport, and it went through first time. The FNMT also says that at the download step you have to enter your details exactly as you typed them in the request.
Same computer, same user. The FNMT’s download page (opens in new tab) says you have to download on the same computer and the same user account you requested from, and its setup page warns against formatting the computer in between. I made sure to do the whole thing on my own laptop, and I wouldn’t start it on a borrowed one.
The backup. Once it’s installed, the certificate lives in that one browser. The Agencia Tributaria has a guide to making a backup copy of your certificate (opens in new tab), and you’ll need that file to recover the certificate or use it on another device. That’s how I moved mine over. That file plus its password is everything someone would need to use the certificate as you.
The office wants an appointment. The FNMT says AEAT, Seguridad Social and some other offices only see you with cita previa (a pre-booked appointment), so we booked ours before going anywhere.
Cl@ve, AutoFirma and the other routes
Cl@ve is the other login system for Spanish government websites, and the two get mixed up a lot. The certificate is a file on your device. Cl@ve is a separate account you register for. One of the ways Cl@ve lets you register (opens in new tab) is online with an electronic certificate, which is how I set mine up - so the certificate makes the next step easier too.
AutoFirma is the government’s app for signing electronically, available on the official firma electrónica downloads page (opens in new tab) for Windows, macOS and Linux. With the certificate installed, it’s what we use to sign PDFs.
Video identification is the FNMT’s way of skipping the office visit. But its video identification request page (opens in new tab) currently says the service only works with a valid DNI. For those of us with an NIE, the office visit is still the route.
The FNMT app for Android and iOS lets you request and download the certificate on your phone. But the FNMT’s mobile app page (opens in new tab) says its video identification is also DNI-only, so an NIE holder still proves their identity at an office.
The DNIe route uses the chip in the electronic Spanish ID card, so it doesn’t apply to anyone with an NIE.
How long is the digital certificate valid, and how do you renew it?
The certificate doesn’t last forever. The FNMT’s FAQ on validity (opens in new tab) says citizen certificates issued by its AC FNMT Usuarios authority are valid until 31 December 2028, and the exact date is written into each certificate. The old version of this post said four years, and the Agencia Tributaria’s page on FNMT certificates (opens in new tab) still says the same. Because the two official answers differ, I’d check the expiry date in your own certificate rather than counting years.
On paper, renewing is easier than the first time. The FNMT’s renewal page (opens in new tab) says you can renew online in the 60 days before it expires, as long as it hasn’t been revoked. There’s a catch: if the certificate has already been renewed online once, or you got it through video identification, a DNIe or another certificate, you have to prove your identity again before you get a new one. So every other renewal, expect another office visit.
Was the digital certificate worth it?
For us, easily. It felt like a small turning point. Up to then, every new task meant finding an office and booking an appointment. After it, a lot of them could be done from home, at whatever hour suited us, which with a young son in the house counts as a real luxury.