Convert a Certificate to PEM: CRT to PEM, CER to PEM, DER to PEM

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

X.509 digital certificates are files that are used to affirm the identity of an organization and to protect data integrity. They’re a variety of digitally encoded and/or signed documents that include code signing certificates, SSL/TLS certificates, personal authentication and S/MIME certificates, etc.

Need to convert a certificate to PEM? No problem. We’ll walk you through the process in OpenSSL.

Typically, x.509 certificates can have a variety of file extension types that you can convert certificates and keys to, including:

  • Certificate (.CRT) or (.CER)
  • Distinguished encoding rules (.DER)
  • Privacy-enhanced electronic mail (.PEM)

There are different reasons why you may want to convert them to other formats, such as your server not approving of the existing file format or the file not being compatible with software. But regardless of why you may want to convert your certificate to PEM — if you want to convert these files easily, you can do so by using OpenSSL. There are a few simple OpenSSL commands that will correctly change the file format easily.

How to Convert Your Certificates and Keys to PEM Using OpenSSL

There are four basic ways to manipulate certificates — you can view, transform, combine, or extract them. To transform one type of encoded certificate to another — such as converting CRT to PEM, CER to PEM, and DER to PEM — you’ll want to use the following commands:

OpenSSL: Convert CRT to PEM:

Type the following code into your OpenSSL client:

openssl x509 -in cert.crt -out cert.pem

OpenSSL: Convert CER to PEM

openssl x509 -in cert.cer -out cert.pem

OpenSSL: Convert DER to PEM

openssl x509 -in cert.der -out cert.pem

You can also use similar commands to convert PEM files to these different types of files as well. Furthermore, there are additional parameters you can specify in your command — such as -inform and -outform — but the above examples are the basic, bare bones OpenSSL commands.

Haven’t purchased your x.509 certificate? Get your certificates from the leading certificate authorities (CA) at the best prices — guaranteed.

Purchase an x.509 Digital Certificate from CheapSSLSecurity & Save Up to 88%!

We offer the internet’s best discount on x.509 digital certificates such as SSL/TLS certificates and code signing certificates. Our SSL certificates start as low as $5.88 per year.

Shop All SSL Certificate