.P12

P12 File

PKCS #12 Personal Information Exchange File
Ask a question
QUICK ANSWER

A P12 file is an encrypted, password-protected bundle that holds a digital certificate together with its private key (PKCS #12 format). You do not open it like a document - you import it. On Windows, double-click and the Certificate Import Wizard installs it (you need the password). On macOS, double-click to add it to Keychain Access. Keep it private: the file contains your private key.

Developer: RSA Laboratories (PKCS #12 standard); now IETF RFC 7292 Category: System Files Open standard MIME: application/x-pkcs12
OPENS ON Windows macOS Linux
Related: .NOMEDIA · .DLL · .TMP · .LNK

On this page

19k+ extensions indexed
Last reviewed Jul 19, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the P12 file format?

A .p12 file is a PKCS #12 archive that bundles one or more X.509 certificates together with their matching private keys into a single, password-protected binary file. The format was originally defined by RSA Laboratories and is now governed by IETF RFC 7292 (2014). It is widely used to transfer credentials between systems - for example, when exporting a TLS/SSL certificate from one server and importing it into another, or distributing a code-signing or email-signing identity.

The binary content is encoded in DER (Distinguished Encoding Rules) and structured as nested ASN.1 objects. The file starts with the DER bytes 30 82, which mark an ASN.1 SEQUENCE, though these bytes alone are not unique to PKCS #12. Password-Based Encryption (PBE) protects both the private key and, optionally, the certificates. Modern implementations favor AES-256-CBC or 3DES-CBC; older software may still produce RC2-based archives.

.p12 and .pfx are interchangeable - both hold an identical PKCS #12 structure; the .pfx name predates the RFC and originates from Microsoft. On Windows, double-clicking a .p12 file opens the Certificate Import Wizard. On macOS, Keychain Access handles import natively. On Linux, openssl pkcs12 is the standard command-line tool.

Related formats include .pem (text-encoded certificates, not bundled), .cer (certificate only, no private key), and .jks (Java KeyStore - the Java-ecosystem equivalent).

Security & safety

RISK: HIGH

A .p12 contains a PRIVATE KEY, making it one of the most sensitive file types a user handles: anyone with the file and its password can impersonate the certificate's owner - sign code or documents as them, send/decrypt their S/MIME e-mail, or stand up a server with their identity. Never email a .p12 unprotected, never commit it to source control (a frequent leak in CI/CD repos), use a strong export password, and delete the file after importing. Treat an unexpected .p12 attachment as suspicious. Only handle .p12 files with trusted tools (OS wizards, OpenSSL, Keychain) - never random "certificate viewer" websites, which could exfiltrate your key.

Format details

in a nutshell
FULL NAMEPKCS #12 Personal Information Exchange File
DEVELOPERRSA Laboratories (PKCS #12 standard); now IETF RFC 7292since PKCS #12 v1.0 published 1999 by RSA Laboratories; now RFC 7292 (2014)
CATEGORYSystem Files
MIME TYPEapplication/x-pkcs12
TYPEEncrypted, password-protected key+certificate bundle (binary, DER/PKCS#12)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001
HEX
3082
ASCII
0·
Starts with the DER tag 30 82 xx xx (an ASN.1 SEQUENCE with a 2-byte length) - the same generic prefix as many DER-encoded crypto objects, so it is not unique to .p12. The content is a PKCS#12 structure; identify by extension/context, not by the first bytes alone.

Programs that open P12 files

Windows4 apps
OpenSSL Open-source Extract or convert: 'openssl pkcs12 -in file.p12 -out out.pem -nodes' (prompts for the password).
Windows Certificate Import Wizard (built-in) Built-in Double-click the .p12 → the Certificate Import Wizard opens; enter the password and choose the store (Personal/Current User or Local Machine).
certutil / PowerShell (built-in) Built-in Inspect/import from a shell: 'certutil -dump file.p12' or PowerShell 'Get-PfxData -FilePath file.p12' / 'Import-PfxCertificate' (.p12 = .pfx).
Adobe Acrobat (as a digital ID, not a viewer) Freemium Preferences → Signatures → Identities → add the .p12 as a Digital ID for signing PDFs. It does NOT display the file as a document.
macOS2 apps
Keychain Access (built-in) Built-in Double-click the .p12 → it imports into Keychain Access (enter the file password); the identity (and key) is then available to apps and Xcode.
OpenSSL / security (built-in) Open-source Terminal: 'openssl pkcs12 -in file.p12 ...' to inspect/extract, or 'security import file.p12 -k login.keychain' to import.
Linux2 apps
OpenSSL Open-source Split into PEM parts for Apache/Nginx: key 'openssl pkcs12 -in file.p12 -nocerts -out key.pem'; cert '... -clcerts -nokeys -out cert.pem'.
GNOME Keyring / Seahorse Open-source Import the .p12 into the 'Passwords and Keys' (Seahorse) app to store the certificate and key.

Technical details

deep spec
Container typeEncrypted multi-object bundle storing a certificate chain and private key(s) in a single file
Binary encodingDER (Distinguished Encoding Rules), structured as nested ASN.1 objects
MIME typeapplication/x-pkcs12
Magic bytes30 82 at offset 0 - DER ASN.1 SEQUENCE tag followed by a 2-byte length field; not unique to .p12 alone
Password protectionMandatory for private-key bags; optionally applied to certificate bags independently
Symmetric encryptionAES-256-CBC (modern default); 3DES-CBC and RC2 in legacy implementations
Key derivation functionPKCS #12 KDF (PBKDF1 variant) per RFC 7292; PBKDF2 and PBMAC1 added by RFC 9579 (2024)
MAC integrityHMAC computed over the AuthenticatedSafe structure; SHA-1 (classic) or SHA-256 (modern)
Certificate storageSupports full chain: leaf certificate, intermediate CAs, and root CA in one archive
Private key types supportedRSA, DSA, ECDSA; commonly RSA-2048 or ECDSA P-256/P-384 in practice
Friendly namePer-entry display alias stored as a SafeBag localKeyId or friendlyName attribute (OID 1.2.840.113549.9.20)
Interchangeable format.pfx is the Microsoft-originated name for the same PKCS #12 binary structure; the file contents are identical
Platform supportNative on Windows (certutil, MMC Certificate snap-in), macOS (Keychain Access), iOS, and Android
Typical use casesTLS/SSL certificate export and import, code signing, S/MIME email identity, client authentication
Typical file size1-10 KB for a single key and certificate; larger when a full certificate chain is included
ReleasedPKCS #12 v1.0 published 1999 by RSA Laboratories; now RFC 7292 (2014)
Open standardYes · royalty-free
Specificationwww.rfc-editor.org

P12 conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with P12 files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about P12 files.

Frequently asked questions

What is a .p12 file?
An encrypted, password-protected PKCS #12 bundle that holds a digital certificate plus its private key. It's the same format as a .pfx and is used for TLS/client certificates, code signing, Apple developer/push certificates, and S/MIME e-mail.
What's the difference between .p12 and .pfx?
None in practice - both are the PKCS #12 format. .pfx is Microsoft's name, .p12 the more general one. You can usually just rename one to the other.
How do I open a .p12 file on Windows?
Double-click it to launch the Certificate Import Wizard, enter the password it was created with, and pick a store. To inspect it instead, use 'certutil -dump file.p12' or OpenSSL - you don't read a .p12, you import it.
How do I open a .p12 on a Mac?
Double-click it to import into Keychain Access (enter the file password). The certificate and its private key then become available to apps, Xcode and Safari.
How do I extract the certificate and key from a .p12 for Apache/Nginx?
Use OpenSSL: 'openssl pkcs12 -in file.p12 -clcerts -nokeys -out cert.pem' for the certificate and '... -nocerts -nodes -out key.pem' for the private key.
I lost the .p12 password - can I still open it?
No. The private key is encrypted with that password and there's no legitimate recovery. You'll need to re-export the certificate from where it was created, or have a new one issued.
Can Adobe Reader/Acrobat open a .p12 file?
Acrobat can import a .p12 as a 'digital ID' to sign PDFs, but it doesn't open it as a viewable document, and free Reader doesn't import it as a signing identity. To install the certificate, use the Windows certificate store or macOS Keychain.

References

1IETF RFC 7292 - PKCS #12: Personal Information Exchange Syntax v1.1www.rfc-editor.org
2Microsoft Learn - Import/export certificates with private keyslearn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.MDMarkdown Document
5.JPGJPEG Image
6.EXEWindows Executable (Portable Executable)
7.NOMEDIAAndroid No-Media Marker File
8.BINCD/DVD Disc Image (BIN/CUE)
9.DATProgram Data File (generic)
10.RPMSGRestricted Permission Message

Related extensions

.NOMEDIAAndroid No-Media Marker File
.DLLDynamic Link Library
.TMPTemporary File
.LNKWindows Shell Link (Shortcut)
.PKGmacOS Installer Package
.ETLEvent Trace Log

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z