Convert between PEM and DER File Formats Using OpenSSL

By default, OpenSSL files are created in PEM (Privacy Enhanced Mail) format. TLS files that are created in Windows operating environments are created in DER (Distinguished Encoding Rules) format.
On Windows, you can import a file that is created in either PEM or DER format. However, a digital certificate that is created in DER format must be converted to PEM format before it can be included in a trust list on UNIX.
Here is an example of how to convert a server digital certificate from PEM input format to DER output format:
OpenSSL> x509 -inform PEM -outform DER -in server.pem -out
server.der
Here is an example of how to convert a server digital certificate from DER input format to PEM output format:
OpenSSL> x509 -inform DER -outform PEM -in server.der -out server.pem