PFX / P12 to PEM Converter
Convert a .pfx or .p12 file to PEM: certificate, chain and unencrypted private key, checked with the file’s password. Runs in your browser; nothing is uploaded.
A .pfx or .p12 file (PKCS#12) bundles a certificate, its chain and the private key, protected by a password — the format Windows, IIS, Azure and many Java tools export. Web servers such as nginx and Apache, and most Linux tools, want separate PEM files instead. This converter opens the file with your password, checks its integrity, decrypts it, and gives you the certificate, the chain and the private key as PEM — without uploading anything.
How to use this tool
- Choose the .pfx or .p12 file (or paste it as Base64).
- Enter its password and press Calculate.
- Download certificate.pem, chain.pem and private-key.pem, or bundle.pem with all three.
- Store the private key safely: it is no longer password-protected.
Formula
PFX → verify MAC (HMAC with a key from the password) → decrypt each bag (PBES2/AES or PKCS#12 3DES/RC2) → PEM = Base64 of the DER between BEGIN/END lines
Modern files (OpenSSL 3 default, Windows Server 2019+) use PBES2: PBKDF2 with HMAC-SHA-256 and AES-256-CBC. Older files use PKCS#12’s own key derivation with SHA-1, 3-key Triple DES for the key and 40-bit RC2 for the certificates; both kinds are read here. The certificate whose localKeyId matches the key is the leaf; the others form the chain, ordered from its issuer upwards.
Example
A file made with openssl pkcs12 -export (AES-256, MAC HMAC-SHA-256, 2048 iterations) holding a P-256 key, the certificate for www.example.test and its root Test Root CA gives 2 certificates and 1 private key: certificate.pem is the www.example.test certificate, chain.pem the root, and private-key.pem a "BEGIN PRIVATE KEY" block identical to the original key.
Frequently asked questions
Is it safe to open my PFX here?
The file is read and decrypted inside your browser with the Web Crypto API; nothing is sent to a server, and the password field is never saved or put in links. The extracted private key is unprotected, so keep it in a safe place.
What is the OpenSSL command for this?
openssl pkcs12 -in file.pfx -nocerts -nodes -out key.pem and openssl pkcs12 -in file.pfx -clcerts -nokeys -out cert.pem (add -legacy for old RC2-encrypted files with OpenSSL 3).
Why does it say the password is wrong?
The file’s MAC is checked before anything is decrypted, so a typo is caught immediately. Passwords are case-sensitive; files exported with "no password" sometimes still need an empty password, which this page tries automatically.
Sources
Last updated:
Page address with these inputs: https://kakao.mobile/tools/pfx-to-pem-tool/
Cite or embed this tool
kakaoCalc. (2026, November 8). PFX / P12 to PEM Converter. https://kakao.mobile/tools/pfx-to-pem-tool/
“PFX / P12 to PEM Converter.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/pfx-to-pem-tool/.