Saltar al contenido principal
    Skip to main content

    How to export and install your Spanish digital certificate: backup copy, another computer and your phone (Android and iPhone)

    You export it with its private key to a password-protected .p12 or .pfx file. Steps for Windows, Mac, Firefox, Android and iPhone, and when it can't be copied.

    By Filip Balik, co-founder · Updated on 17 November 2026

    To move your digital certificate to another computer or to your phone, you export it with its private key: you get a .p12 or .pfx file protected by a password you choose, and you import that file on the other device. The FNMT calls this a backup copy (copia de seguridad). A certificate on a smart card or on the Spanish ID card (DNIe) cannot be copied, and if you forget the backup's password, nobody can recover it.

    What is a certificate backup, and which file do you get?

    A certificate has two parts. The public part identifies the holder; the private part is what signs. The FNMT good-practice manual, a 2016 document still published on its website, says the private part "es la que da la capacidad de realizar la firma" (is what gives you the ability to sign) and must be kept "siempre bajo custodia" (always in your custody). The FNMT (Fábrica Nacional de Moneda y Timbre) is the state body that issues most personal certificates in Spain.

    When you export, you choose whether to include the private key, and the file changes. According to the manual, .cer and .p7b files "no contienen clave privada" (do not contain the private key), while .p12 and .pfx files "sí contienen la clave privada" (do contain it). The FNMT explains the difference in its question 1063:

    • Without the private key (.cer or .p7b): you can hand it to anyone who wants to communicate with you securely. It cannot sign.
    • With the private key (.p12 or .pfx): the full copy, exported "solo para su uso personal o como copia de seguridad" (only for your personal use or as a backup).

    Why make one? Because "como consecuencia de un borrado de datos en el ordenador o una avería es posible que pierda su certificado" (if your computer's data is wiped or it breaks down, you may lose your certificate), the manual warns. And because it is the file that lets you have the certificate in more than one place: it "puede ser instalado tanto en un PC como en un dispositivo móvil utilizando la copia de seguridad" (can be installed on a PC or a mobile device using the backup copy) (FNMT, certificate on a mobile device).

    At a glance

    Where your certificate is Can you export it? Where you do it
    Windows, with Edge or Chrome Yes, if the private key was marked as exportable Manage certificates, Personal tab, Export
    Firefox Yes Settings, Privacy & Security, Certificates, your certificates tab, back up
    Mac, in Keychain Access Yes, unless Export Items is dimmed My Certificates, File, Export Items
    FNMT app on Android There is already a copy: a .p12 file in Downloads File manager, Downloads folder
    FNMT app on iPhone Download it again from the app and share it Requested certificates, share with Mail
    Smart card or DNIe No The private key does not leave the card

    Each row's steps and sources are in the sections below. The FNMT gives the Spanish menu names; we quote them with a translation, so look for the equivalent if your device is in English.

    How do I export my digital certificate on Windows?

    Edge and Chrome both take you to the same Windows wizard. These are the FNMT's steps for Edge (question 1551):

    1. Open the menu (three-dot button or ALT+F), go to Settings, type "Certificados" (certificates) in the search box and click "Administrar Certificados" (manage certificates).
    2. In the "Personal" tab, select your certificate and click "Exportar" (export).
    3. In the wizard, choose "Exportar la clave privada" (export the private key) and click Next.
    4. Leave the file format options as they are by default.
    5. Type a password and confirm it. Write it down: "Esta misma contraseña se pedirá para importar el certificado a otro navegador o equipo diferente" (you will be asked for this same password to import the certificate into another browser or computer).
    6. With "Examinar" (browse), choose the folder and file name, click Next and then Finish. If all goes well, you will see that "el certificado ha sido exportado con éxito" (the certificate has been exported successfully).

    In Chrome, the path is Settings, Privacy and security, Security and "Gestionar certificados importados desde Windows" (manage certificates imported from Windows). From there the wizard is the same (FNMT, question 1501).

    What if it won't let me export the private key?

    That happens when the key was not marked as exportable when the certificate was installed on that computer. Microsoft explains it in the guide to its wizard: the "Yes, export the private key" option "will appear only if the private key is marked as exportable and you have access to the private key". It is the "Marcar la clave privada como exportable" (mark the private key as exportable) box in the import wizard, which the FNMT recommends ticking (see below). If it was not ticked, find the original backup or the computer where you downloaded the certificate and export from there.

    How do I make the backup in Firefox or on a Mac?

    In Firefox, according to the FNMT:

    1. Go to Settings, Privacy & Security, Certificates section, and open the certificate list.
    2. In the "Sus Certificados" (your certificates) tab, select yours and click "Hacer copia" (back up).
    3. Choose where to save it. If you set a primary password in the browser, it will ask for it.
    4. Type and confirm the password that will protect the copy. You will get a .p12 file.

    On a Mac there is one catch: since Firefox version 62, when naming the file "hay que poner también la extensión del fichero que es *.p12" (you also have to type the file extension, which is .p12).

    In Keychain Access on a Mac, the FNMT gives these steps (question 1379):

    1. Open Keychain Access (Go, Utilities).
    2. Click My Certificates and select the certificate.
    3. Choose File > Export Items, pick a name and folder, and type and confirm a password.
    4. The certificate "será guardado con extensión .p12" (will be saved as a .p12 file).

    If Export Items is greyed out, Apple explains: "If the Export Items menu is dimmed, at least one of the selected items can't be exported."

    How do I move the certificate from my phone to my computer?

    If you got it with the FNMT app, the copy already exists or takes a minute to make. According to the FNMT:

    • Android. Use your file manager app to open the Downloads folder: the copy is there, a file with your name "y tiene extensión .p12" (and a .p12 extension). You can also connect the phone to a computer by USB and open that folder. The FNMT adds that you can email it to your personal address "para disponer de él en caso de incidencia con el teléfono" (so you still have it if something happens to the phone).
    • iPhone. You can download it again from the app if you keep the request under "Ver certificados solicitados" (view requested certificates). When you download it, the app asks whether you want to share it: share it with Mail, send it to yourself and download the .p12 file on the computer.

    Either way, the copy is protected by the password you set when you downloaded the certificate: "Recuerde siempre la contraseña que lo protege" (always remember the password that protects it). Then you import it on the computer like any other backup.

    How do I install the certificate on another computer?

    First, a distinction that confuses many people: obtaining the certificate and moving it to another device are different things. To obtain it, the FNMT requires "todo el proceso de obtención" (the whole process) to be done "desde el mismo equipo y mismo usuario" (from the same computer and the same user account), and asks you not to reformat the computer "entre el proceso de solicitud y el de descarga del certificado" (between requesting and downloading the certificate) (FNMT, prior configuration). Once downloaded, the backup can be installed wherever you want.

    On Windows (Edge or Chrome), the FNMT says (question 1552):

    1. In manage certificates, "Personal" tab, click "Importar" (import) and then Next.
    2. With browse, choose the .p12 or .pfx file.
    3. Type the password that protects it.
    4. Tick "Habilitar protección segura de clave privada" (enable strong private key protection) and "Marcar la clave privada como exportable" (mark the private key as exportable). The second lets you make a copy from that computer again later.
    5. Keep the store it suggests, click Next and Finish.

    For extra protection, the FNMT suggests clicking "Nivel de seguridad" (security level), setting it to high and assigning a password.

    In Firefox, in the "Sus Certificados" tab click "Importar", choose the backup and type the browser's primary password (if you have one) and the backup's password. The FNMT warns that the backup "debe tener contraseña asignada" (must have a password), so do not export it with a blank password (question 1398).

    On a Mac, open Keychain Access, choose the login keychain and the My Certificates category, go to File > Import Items, select the backup (.pfx or .p12), click Open and type the password (FNMT, question 1380).

    Not your computer? Delete it when you finish. In Edge: manage certificates, "Personal" tab, select the certificate, click "Quitar" (remove) and confirm (FNMT, question 1550).

    How do I install the digital certificate on an Android phone?

    With the .p12 or .pfx backup, the FNMT's steps are these (installing a backup on a device and question 1615):

    1. Copy the file to a folder on the phone.
    2. Tap it, or go to Settings, Security, credential storage (Almacenamiento de credenciales) and install from phone storage (Instalar desde la memoria del teléfono).
    3. Type the password that protects the backup.
    4. Give it a name (the FNMT asks for one "sin espacios", without spaces).
    5. Choose "VPN y aplicaciones" (VPN and apps) and tap OK.

    "Si tiene una versión anterior a Android 8.x también tendrá que instalar el certificado raíz" (if you have a version older than Android 8.x you will also need to install the root certificate), which the FNMT links on the same page. Menus vary from phone to phone: the FNMT itself warns that "según la versión de Android puede diferir el menú" (the menu may differ depending on the Android version). To check it is there, look in Settings, Security and privacy, Other security settings, User certificates (FNMT, the phone's certificate store). And to use it on websites, the FNMT confirms that "Chrome también es válido para el uso de certificados" (Chrome also works with certificates) from the system store (question 1610).

    Be careful when deleting. Android's clear certificates option removes "todos los certificados que haya instalado" (all the certificates you have installed), and "Esta operación es irreversible" (this cannot be undone) (FNMT, question 1653). Make sure you have the backup somewhere else first.

    And on an iPhone?

    The FNMT gives two ways to get the backup onto an iPhone: email it to an account set up in the Mail app, or save it in an iCloud folder. Then "pulse sobre el archivo y siga el asistente de instalación" (tap the file and follow the installation wizard). Have the backup's password to hand. Installed certificates appear in Settings, General, VPN & Device Management (FNMT, the phone's certificate store).

    If I already have it on my computer, should I request it again in the app?

    No. Install the backup. The FNMT warns that "solo se puede disponer de un único certificado de persona física por ciudadano" (each citizen can only hold one personal certificate), and if you request another from the app while one is valid, "se autorevocará el anterior" (the previous one will be revoked automatically) (FNMT, certificate on a mobile device). You would lose the one on your computer.

    When can a certificate not be exported?

    1. When it is on a smart card. "No es posible la exportación del certificado con clave privada desde la tarjeta" (the certificate cannot be exported with its private key from the card) (FNMT, question 1359). The FNMT manual gives the reason: the card "es en sí mismo un dispositivo seguro" (is itself a secure device).
    2. When it is the DNIe's. Its certificates sit on the chip, which article 11.2 of Royal Decree 255/2025 describes as a "medio de almacenamiento de alta seguridad" (high-security storage medium), and they work "con un dispositivo cualificado de creación de firma electrónica" (with a qualified electronic signature creation device). You use it from the card itself. How long they last and how to renew them is in how long a digital certificate lasts.
    3. When the key is not exportable on that computer (Windows) or the item cannot be exported (Mac). Export from another device or use the original backup.
    4. When you have forgotten the backup's password. According to the FNMT, "este no se puede recuperar por motivos de seguridad" (it cannot be recovered for security reasons) and "tienes que solicitar un certificado nuevo" (you have to request a new certificate). One way out: if the certificate is still installed and working on some device, exporting it from there lets you choose a new password for the new copy.

    Company and community certificates are exported the same way, but have their own custody rules: see renewing a company digital certificate and the community of owners' digital certificate.

    Where should I keep the backup, and what if I lose it?

    The .p12 or .pfx copy is your signature. The FNMT manual puts it plainly: if you hand over the private key, "otros pueden hacer firmas en su nombre" (others can sign in your name). Its rules are clear:

    • "Haga copia de seguridad a disco de su certificado junto con la clave privada y guárdela en lugar seguro" (back up your certificate with its private key and keep it in a safe place) (question 1063).
    • "Nunca entregue copia de su clave privada a nadie bajo ningún concepto" (never give a copy of your private key to anyone, under any circumstances).
    • If a service, an app or anyone else asks you for your certificate as a .pfx file, "no lo ceda nunca" (never hand it over), the manual says.
    • Certificates are "personales e intransferibles" (personal and non-transferable), and many websites that help people obtain them "se quedan con copia del certificado del usuario" (keep a copy of the user's certificate) (FNMT, certificate custody).

    If you use email to move the backup, as the FNMT suggests for phones, remember that the message holds a full copy with the private key: the password is the only thing protecting it. Choose a long one and, if you do not want it there, delete the message once the certificate is installed.

    The law also puts custody on your side. Article 11.1 of Law 6/2020 on electronic trust services relieves the provider of liability if the holder is guilty of "negligencia en la conservación de sus datos de creación de firma" (negligence in keeping their signature creation data) or does not request revocation "en caso de duda en cuanto al mantenimiento de la confidencialidad" (if in doubt about whether that data is still confidential). And article 5.1.b provides for revoking the certificate for "violación o puesta en peligro del secreto de los datos de creación de firma" (breach or endangering of the secrecy of the signature creation data).

    How to cancel the certificate if you lose your phone or the backup

    The FNMT offers three routes (FNMT, revoking a certificate):

    1. Online, if you still have the certificate: "la revocación puede efectuarse en la aplicación de anulación online" (revocation can be done in the online cancellation application).
    2. By phone, "si conoce el código de solicitud" (if you know your request code): the phone cancellation service runs 24/7 on 917 406 848 and 913 878 337.
    3. In person, at an accreditation office (Oficina de Acreditación), if you no longer have it because of "extravío, pérdida o robo" (misplacement, loss or theft).

    Then you will need a new one. The FNMT personal certificate is free: registration and issue "no generarán coste económico para los interesados" (will cost the applicant nothing) (FNMT, question 1038). The ways to request it, including with an NIE, are in how long a digital certificate lasts.

    How do I keep track of copies and devices?

    For each certificate, yours and any you manage, note:

    • Which devices it is installed on: computers, phones and browsers. If you lose one, you will know what to cancel.
    • Where the backup is, and that only the holder knows its password.
    • Whether the key was marked as exportable on each computer.
    • The request code, which lets you cancel it by phone.
    • The expiry date, copied from the certificate itself. When you renew it or request another, you will have a new certificate: take its backup to all those devices.

    You can keep the dates in our expiry tracking template for Excel. If your office handles dozens of certificates, Renewals emails you before each expiry, company by company, and keeps each company isolated in the database. More ideas in automation for advisory firms, and what exactly a certificate is in the glossary.

    Frequently asked questions

    Can I have the same digital certificate on my computer and my phone?

    Yes. Export a copy with the private key (.p12 or .pfx) from the device where you have it and import it on the other. What you should not do is request another one in the FNMT app: only one is allowed per person, and the new one revokes the old one.

    What do I do if I have forgotten the backup's password?

    It cannot be recovered, and the FNMT tells you to request a new certificate. If the certificate is still installed and working on some device, exporting it from there lets you choose a new password for the new copy.

    Can I export the certificates on my Spanish ID card (DNIe)?

    No. They are on the card's chip, which works as a qualified signature creation device, and you use them from the card itself. The same applies to certificates on a smart card: the FNMT says they cannot be exported with the private key.

    What is the difference between a .cer file and a .p12 or .pfx file?

    A .cer (or .p7b) file only carries the public part: others can use it to communicate with you securely, but it cannot sign. A .p12 or .pfx file also carries the private key: it is the backup, and you never give it to anyone.

    Where is the certificate on my phone?

    On Android, in Settings, under Security, in User certificates (the menu varies by phone and Android version). On an iPhone, in Settings, General, VPN & Device Management. If you got it with the FNMT app on Android, the .p12 backup is in the Downloads folder.

    Sources

    This article explains the law and published court criteria as of the update date. It is not a substitute for advice from a lawyer on a specific case.

    We write each article with the help of AI and check every fact against primary sources before publishing it. If you spot a mistake, write to info@quantumnovaagency.com and we will correct it.

    Terms in this article

    Book your free diagnosis.

    Emailinfo@quantumnovaagency.comWhatsApp+34 678 428 710
    LocationTorrevieja (Alicante) · all of Spain

    What happens next

    1. 1We reply within 24 hours.
    2. 2We have a call to look at your case.
    3. 3We send you a proposal with a fixed price.

    By submitting this form you agree to your data being handled under the Privacy Policy.