How to convert .crt to .pem

X509Pemasn.1CrtDer

X509 Problem Overview


How can I convert .crt to .pem?

X509 Solutions


Solution 1 - X509

You can do this conversion with the OpenSSL library. Windows binaries can be found here.

Once you have the library installed, the command you need to issue is:

openssl x509 -in mycert.crt -out mycert.pem -outform PEM

Solution 2 - X509

I found the OpenSSL answer given above didn't work for me, but the following did, working with a CRT file sourced from windows.

openssl x509 -inform DER -in yourdownloaded.crt -out outcert.pem -text

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAliView Question on Stackoverflow
Solution 1 - X509MrEyesView Answer on Stackoverflow
Solution 2 - X509NeilGView Answer on Stackoverflow