OpenSSL - Convert a public certificate file to a PEM

by
Jeremy Canfield |
Updated: April 13 2022
| OpenSSL articles
This assumes you have already created a public certificate with the .crt extension, such as example.com.crt. If not, refer to our article on creating a public certificate using OpenSSL on Linux.
Then OpenSSL command with the x509 -in -out and -outform options is used to convert a crt certificate to a pem certificate, like this.
openssl x509 -in example.com.crt -out example.com.pem -outform PEM
Or, to convert a pem certificate to a crt certificate, like this.
openssl x509 -in example.com.pem -out example.com.crt -outform CRT
Did you find this article helpful?
If so, consider buying me a coffee over at