PFX and P12 decoder

Runs in your browser

Open 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
Waiting for input

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.

Examples

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.

The format

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 itCertificatesKeyMAC
OpenSSL 3, Java 17+, Windows 10+AES-256-CBC, PBKDF2-SHA256AES-256-CBC, PBKDF2-SHA256HMAC-SHA256
OpenSSL 1.x, old Windows, -legacyRC2-40 (weak)3DESHMAC-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).

In your terminal

The same with OpenSSL and keytool

PFX to PEM
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
Old PFX
openssl pkcs12 -legacy -in old.pfx -out all.pem -noenc   # RC2-40, 3DES
PEM to PFX
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
JKS
keytool -list -v -keystore keystore.jks
keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype pkcs12
Common errors

Why the file won’t open

Mac verify error: invalid password?

The password is wrong. Some tools treat an empty password differently: this tool tries both kinds of empty.

unsupported: RC2-40-CBC

OpenSSL 3 dropped the old ciphers from the default provider. Add -legacy, or create a modern file on the second tab.

Windows or macOS refuses a new PFX

Old Windows (before 10 1709), Java 8 and some macOS versions can’t read AES/PBKDF2. Choose “Compatible” when creating.

Key password differs

keytool and some exporters protect the key with a second password. Enter it under More options.

Under the hood

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.
More formats

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.

FAQ

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.

Searches the list of pages on this site. What you type stays in your browser.