SuperSigner

How to export a certificate with its private key as a .p12 file on Mac

To export a certificate with its private key on a Mac, open Keychain Access, select the login keychain and the My Certificates category, select the certificate and choose File → Export Items. Choose the format Personal Information Exchange (.p12), set a password for the file and allow the export with your Mac login password. A .cer or .pem export of the certificate leaves the private key out.

Steps: exporting a .p12 file from Keychain Access

  1. 1

    Open Keychain Access

    Press ⌘ + Space, type “Keychain Access” and press Return, as Apple’s guide suggests. Don’t look for it in the Utilities folder: on macOS 26.6.2 it isn’t there. Saved website passwords have moved to the Passwords app, but certificates and their keys are still managed in Keychain Access. If you don’t see the list of keychains, choose Window → Keychain Viewer (⌘ + 1).

    The steps are the same for any certificate with a private key, for example one you use to sign email in Apple Mail.

  2. 2

    Find the certificate with its private key

    Select the login keychain and the My Certificates category. This category lists only certificates that have a private key on this Mac, and each one has a disclosure arrow with the key underneath. Look at the Expires column: if you renewed the certificate, the old and the new one have the same name, and you want the one with the later date.

    If the certificate shows up only under Certificates and not under My Certificates, its private key isn’t on this Mac. It stays where the certificate request was created, for example on another Mac, in another user account or on a smart card. Export it there instead.

  3. 3

    Choose Export Items and the .p12 format

    Select the certificate and choose File → Export Items. In the File Format menu, choose Personal Information Exchange (.p12), name the file, pick a folder and click Save. Apple says that if Export Items is dimmed, at least one of the selected items can’t be exported; the section below the table explains the usual reasons.

  4. 4

    Set a password for the file and allow the export

    Keychain Access asks for a new password that will protect the .p12 file. You choose it now, and you’ll type it every time you import the file or pick it in a signing app, so store it in a password manager. Then macOS asks for the password of the login keychain, which is usually your Mac login password, and you click Allow. These are two different passwords: a signing app later wants the first one, not your Mac password.

  5. 5

    Check the file (optional)

    To be sure the key is inside, open Terminal and run openssl pkcs12 -in certificate.p12 -info -noout with your file name. After you enter the file password, the built-in openssl (LibreSSL 3.3.6 on macOS 26.6.2) prints MAC verified OK, a Certificate bag line and a Shrouded Keybag line, which is the encrypted private key. With a wrong password it prints Mac verify error: invalid password? instead. If you installed OpenSSL 3 with Homebrew and the command ends with an error, run /usr/bin/openssl instead or add -legacy.

  6. 6

    Keep a backup

    The .p12 file is a full copy of your signing identity: whoever has it and its password can sign in your name. Keep it on an encrypted drive or in an encrypted vault, not in an email attachment. It is also your only backup of the private key. If the Mac breaks and you have no copy, the certificate can’t be recovered and you need a new one.

What the export formats contain

The File Format menu in Keychain Access on macOS 26.6.2 offers four formats. Only one of them carries the private key, and without the key no app can sign.

Format in Keychain AccessContains the private keyWhat it is for
Personal Information Exchange (.p12)yes, protected by the file passwordsigning in another app, moving the certificate to another Mac, backup. PKCS #12 (RFC 7292); Windows saves the same format as .pfx
Certificate (.cer)nosending your certificate to someone who wants to check your signatures or encrypt email to you
Privacy Enhanced Mail (.pem)no, when you export the certificatethe certificate as text between -----BEGIN CERTIFICATE----- lines (RFC 7468), for servers and command-line tools
Certificate Bundle (.p7b)noseveral certificates in one file, for example a chain of issuers

When Export Items is dimmed or the file has no key

  • The exported file has no private key. You exported a certificate without a key under it, or chose .cer or .pem. Export it again from My Certificates, where the key sits under the certificate, as .p12.
  • The key was created as non-exportable. Some certificate authorities ask, while you create the request, whether the private key may be exported. I.CA in Czechia, for example, offers an option to allow exporting the private key when the chosen key storage supports it; without it, you can’t make a .p12 file later. Ask your provider whether you need a new certificate.
  • The certificate lives on a smart card or a USB token. Keys on such hardware usually can’t be exported, and neither can keys held by a remote signing service. Sign with the software your provider recommends.
  • You selected several items. Apple says Export Items is dimmed when at least one of them can’t be exported. Select only the certificate.

When you don’t need SuperSigner

Exporting the file needs nothing but Keychain Access. If you need the .p12 file to sign a few documents a year, the free Adobe Acrobat Reader can use it as a digital ID (how to add it to Acrobat). If you need it to sign email in Apple Mail, you don’t need a PDF app at all. SuperSigner is worth it when you sign PDFs on a Mac regularly and want the stamp on the page in a few clicks.

Signing a PDF with the .p12 file

In SuperSigner, open the PDF, click Choose in the Certificate card, select the .p12 file and enter the file password from step 4, then click Confirm. The app shows who issued the certificate and until when it is valid. If you tick Remember the certificate and password, the password is stored in your Keychain. Three signatures are free, then a license costs 1,490 CZK once (about €61 or $69 at the Czech National Bank rate of November 10, 2026). The whole process is in How to sign a PDF with a digital certificate on a Mac.

Frequently asked questions

Which password does a signing app ask for?

The one you set for the .p12 file in step 4. Your Mac login password only allows Keychain Access to export the key.

Is a .p12 file the same as a .pfx file?

Yes. Both are the PKCS #12 format; Windows calls it “Personal Information Exchange - PKCS #12 (.PFX)”. Most apps accept either extension.

Does exporting remove the certificate from my Mac?

No. Export makes a copy, and the certificate and its key stay in your keychain.

How do I put the .p12 file on another Mac?

In Keychain Access on the other Mac, choose File → Import Items, select the file, choose the keychain in Destination Keychain and click Open. You’ll need the file password.

Why does my certificate have no private key?

The key stays on the device where the certificate request was made, or on the card or token it was generated on. Export the .p12 file there.

Sources

Try SuperSigner for free

3 signatures with every feature unlocked. PostSignum, I.CA and any .p12/.pfx certificate, signed PDF with a timestamp.

The SuperSigner window: a PDF with the signature stamp placed and the certificate selected
This is what signing looks like in SuperSigner: open the PDF, pick the certificate, place the stamp.
Download for Apple Silicon

Version 2.0 · macOS 12+ · 40 MB Need the Intel build instead?

Signed with an Apple Developer ID and notarized: Apple checked the app for malware.

Pricing and what the license includes