SSL Convert FAQ
Common questions about SSL certificate format conversion
Certificate Format Comparison
| Format | Extension | Encoding | Usage |
|---|---|---|---|
| PEM | .pem, .crt, .key | Base64 (ASCII) | Most common format, used by Apache, Nginx |
| DER | .der, .cer | Binary (DER) | Binary format, used by Java, some Windows apps |
| P7B/PKCS#7 | .p7b, .p7c | Base64 (ASCII) | Certificate chain format, used by Windows |
| PFX/PKCS#12 | .pfx, .p12 | Binary (DER) | Archive format with private key, used by Windows/IIS |
Common Conversions
PEM → DER
Convert PEM to DER binary format
openssl x509 -in cert.pem -outform DER -out cert.derDER → PEM
Convert DER binary to PEM text format
openssl x509 -in cert.der -inform DER -outform PEM -out cert.pemPEM → P7B
Convert PEM certificate to PKCS#7 format
openssl crl2pkcs7 -nocrl -certfile cert.pem -out cert.p7bP7B → PEM
Convert PKCS#7 to PEM certificate format
openssl pkcs7 -in cert.p7b -print_certs -out cert.pemPEM → PFX
Convert PEM certificate and key to PFX archive
openssl pkcs12 -export -out cert.pfx -inkey private.key -in cert.pem -certfile chain.pemPFX → PEM
Extract PEM certificate and key from PFX archive
openssl pkcs12 -in cert.pfx -out cert.pem -nodesTips
- Always backup your certificates before converting
- Keep your private key secure during conversion
- Verify the converted certificate works correctly
- Some conversions require the private key password