We use cookies to ensure you get the best experience.By using our website you agree to our Cookie Policy.

SSL Certificate Converter

Converting the SSL Certificate Format is a cakewalk now!

What happens sometimes is, your CA may have sent you the SSL certificate file in a format that is not supported on your server. For this, you need to modify the file format of your certificate. This can be quickly and easily done. All you need to do is run some OpenSSL commands as listed below.

OpenSSL commands to convert PEM file

  • Convert PEM to DER
openssl x509 -outform der -in certificate.pem -out certificate.der
  • Convert PEM to P7B
openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer
  • Convert PEM to PFX
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

OpenSSL commands to convert DER file

  • Convert DER to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem

OpenSSL commands to convert P7B file

  • Convert P7B to PEM
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
  • Convert P7B to PFX
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer

OpenSSL commands to convert PFX file

  • Convert PFX to PEM
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes