Get your FREE copy of "The Ultimate Guide of SSL"

Download Ebook

How to Convert CER to CRT in OpenSSL

how to convert cer to crt in openssl

Using simple OpenSSL commands, you can quickly convert CER to CRT

SSL certificates enable encrypted and secure connections between the browser and the webserver. These certificates are issued in formats like CER, CRT, PEM, and DER. When it comes to SSL/TLS certificates, there are instances when you will have to convert your file from CER to CRT. There are different reasons why you will have to convert your file. While there is no huge difference between the file types, CER and CRT, some servers and devices do not accept certain formats. For example, if your device or server accepts CRT and not CER, you will have to convert your CER file to CRT.

Both CER and CRT files are Base64 (ASCII) format files, but the difference between the two is only their file name extensions, i.e., .cer and .crt. So, how to convert a CER file to CET? In this article, we have broken down the conversion process. Read on to know how to convert CER to CRT.

How to Convert CER to CRT?

You may be in a position to convert your CER file to CRT if your server or device does not accept the CER file format. Here’s how to convert CER to CRT in OpenSSL.

You will need to use the following OpenSSL command to convert CER to CRT.

openssl x509 -inform PEM -in <filepath>/certificate.cert -out certificate.crt
This command requires OpenSSL to convert your CER file to CRT format. Remember, you will need to install OpenSSL in your device to convert your CER file to CRT using OpenSSL.


If your server doesn’t accept your certificate formatted CER, you will need to convert it to CRT. Using the above-mentioned OpenSSL command, you can quickly convert your CER formatted file to CRT.
Disclosure: AboutSSL appreciates your continuous support. It helps us tremendously to keep moving in the competitive SSL industry. Here most of the links which direct you to buy any SSL/TLS related service or products earns us a certain percentage of referral commission. Learn More