Decode & convert
SSL certificate converter
Convert certificates and keys between PEM, DER, PFX/PKCS #12 and P7B. Everything happens in your browser; private keys are never uploaded.
Runs in your browser Private keys are generated and processed in your browser (WebCrypto) and never leave your device. Nothing is uploaded to ssl.sh.
The SSL converter changes certificates and private keys from one format to another without installing OpenSSL. Pick a mode (for example PEM → PFX), paste the text or choose the file, and download the result. All conversions run in your browser with JavaScript; certificates and keys are not uploaded anywhere.
How to use it
- Choose the conversion at the top. Each mode also has its own page with details, linked below the tool.
- Paste PEM text or choose a file. For PFX files, enter the password.
- Press Convert (Create PFX in PEM → PFX mode) and download the files.
Modes
- PEM → DER: each PEM block (certificate, key or CSR) becomes a binary
.derfile, one object per file. - DER → PEM: a binary certificate, key, CSR or DER
.p7bbecomes PEM text. - PEM → PFX: certificate, chain and private key are bundled into a password-protected
.pfx. The tool checks that the key matches the certificate and orders the chain. See PEM to PFX. - PFX → PEM: a
.pfx/.p12is unpacked intofullchain.pem,cert.pem,chain.pemandprivkey.pem. See PFX to PEM. - P7B → PEM: certificates are extracted from a PKCS #7 bundle and put in chain order.
- CRT → PEM: a
.crtor.cerfile of either encoding becomes PEM.
Equivalent OpenSSL commands
# PEM → DER
openssl x509 -in cert.pem -outform DER -out cert.der
# PEM + key → PFX
openssl pkcs12 -export -out site.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem
# PFX → PEM (add -legacy on OpenSSL 3 for old RC2-encrypted files)
openssl pkcs12 -in site.pfx -nodes -out all.pem
# P7B → PEM
openssl pkcs7 -print_certs -in certs.p7b -out certs.pem
Notes
- A PFX holds the private key: always set a strong password and delete copies you no longer need.
privkey.pemfrom PFX → PEM is unencrypted, because web servers need it that way. Protect it with file permissions.- DER can hold only one object per file; a chain needs several files or a PEM/P7B bundle.
FAQ
Which format does my server need?
Nginx, Apache, HAProxy, Caddy and most Linux software use PEM files. IIS, Windows, Azure App Service and many Java servers import PFX/P12. Some Java tools and Windows dialogs offer P7B for chains without keys.
Is it safe to put a private key into an online converter?
Only if the conversion runs locally. This converter is JavaScript running in your browser: the key is read from the text box or file, converted in memory and offered as a download, and it is never sent to ssl.sh. You can disconnect from the network after the page has loaded to confirm.
Windows says the PFX password is wrong, but it is right. Why?
Older Windows versions such as Windows Server 2016 cannot read PFX files that use AES-256 and an SHA-256 MAC. Recreate the PFX with the compatibility (3DES + SHA-1) option.
What is the difference between .crt, .cer and .pem?
Only the file extension. .crt and .cer files contain either PEM text or DER binary. The CRT to PEM mode detects which and outputs PEM.