Convert SSL certificate from DER to PEM using openssl

DER stands for Distinguished Encoding Rules, an encoding for ASN.1 data structures; X.509 certificates are represented using the ASN.1 standard.

If you have an SSL certificate in binary format (DER), and you want to convert it to text-based PEM format use the following:

openssl x509 -inform der -in filename -out filename.pem