PFX and P12 decoder
Runs in your browserOpen a .pfx, .p12 or .jks file with its password. You get the certificate chain and the private key as PEM, or build a new PFX. Nothing is uploaded.
More options
More options
Open the file and enter its password
You get the certificate chain and the private key as PEM, plus how the file is protected. Empty passwords work too.
PEM files in, PFX out
Private key and certificate chain as PEM. “Modern” is what OpenSSL 3 writes; “Compatible” opens on old Windows, Java 8 and macOS too.
Start from an example
Each example fills in the tool above and decrypts it. All keys and passwords are demo values made for this page.
What is inside a .pfx or .p12 file
PKCS#12 is a container for a private key and certificates. Each part can be encrypted differently, and a MAC protects the whole file with the same password.
| Who wrote it | Certificates | Key | MAC |
|---|---|---|---|
| OpenSSL 3, Java 17+, Windows 10+ | AES-256-CBC, PBKDF2-SHA256 | AES-256-CBC, PBKDF2-SHA256 | HMAC-SHA256 |
| OpenSSL 1.x, old Windows, -legacy | RC2-40 (weak) | 3DES | HMAC-SHA1 |
The page reads both, plus BER files from Windows, and Java keystores (JKS and JCEKS from keytool). It shows which key belongs to which certificate (by public key, not only by name).
The same with OpenSSL and keytool
openssl pkcs12 -in cert.pfx -out all.pem -noenc openssl pkcs12 -in cert.pfx -nokeys -out cert.pem openssl pkcs12 -in cert.pfx -nocerts -noenc -out key.pem
openssl pkcs12 -legacy -in old.pfx -out all.pem -noenc # RC2-40, 3DES
openssl pkcs12 -export -inkey key.pem -in cert.pem -certfile chain.pem -out cert.pfx openssl pkcs12 -export -legacy … # for old Windows and Java 8
keytool -list -v -keystore keystore.jks keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype pkcs12
Why the file won’t open
The password is wrong. Some tools treat an empty password differently: this tool tries both kinds of empty.
OpenSSL 3 dropped the old ciphers from the default provider. Add -legacy, or create a modern file on the second tab.
Old Windows (before 10 1709), Java 8 and some macOS versions can’t read AES/PBKDF2. Choose “Compatible” when creating.
keytool and some exporters protect the key with a second password. Enter it under More options.
Tested against the original tools
Every format on this page was checked against values made by the real tool, on 3 December 2026:
- 7 files from OpenSSL 3 (modern, legacy, empty password, SHA-512 MAC with AES-128) and keytool (JKS, JCEKS, PKCS#12); key and certificate must match what OpenSSL extracts.
- PFX files created here open with openssl pkcs12 and keytool.
Other encrypted formats
Every format has its own page with the same tool. Paste anything into one of them: if it belongs elsewhere, the tool says so and takes it there.
Questions about PFX / P12 decoder
How do I convert a PFX to PEM?
Open the file above with its password: the private key, the certificate and the chain appear as PEM, each to copy or download, plus all of it in one file. In a terminal: openssl pkcs12 -in cert.pfx -out all.pem -noenc.
What is the difference between .pfx and .p12?
None, both are PKCS#12. Windows says .pfx, everyone else .p12.
Can I open a PFX without the password?
No. The MAC check needs it, and the key inside is encrypted with it.
Is it safe to open a production certificate here?
Everything runs in your browser: nothing you paste is sent anywhere, not even to this site. The page’s Content-Security-Policy blocks connections to other sites; check the Network tab of your browser’s developer tools. The file is read with a file dialog; nothing is uploaded.