For certain application, a job partner asked me to send him certain certificate with private key in PEM format. Normally I’m using PFX format, but with a little help of the openssl toolkit converting PFX to PEM is quite easy.

Windows

openssl for windows can be downloaded here: http://gnuwin32.sourceforge.net/packages/openssl.htm
After extracting the contents, inside the bin subfolder the openssl utility is found.

These are the parameters to convert the format:

openssl pkcs12 -in <PFX_FILE> -com.pfx -out <PEM_FILE> -nodes

(-nodes parameter is to not to encrypt the private key with a passphrase)

For example (Windows):

OpenSSL - Convert PFX to PEM using Windows or Linux

For example (Linux):

OpenSSL - Convert PFX to PEM using Windows or Linux