A .cer file is just a .der file (.crt .cer .der).
openssl x509 -inform der -in cert.cer -out cert.pem
NOTE: If the .cer file starts with —–BEGIN CERTIFICATE, then it is already in .pem format.
Just rename it to using a .pem extension.