Converting Certificate Files in PFX Format to PEM

Learn how to convert PFX files to PEM files.

John Savill

March 12, 2015

1 Min Read
Converting Certificate Files in PFX Format to PEM

Q. I have a certificate file in PFX format that I need to convert to PEM format. How can I do this on Windows?

A. PEM is required for a number of gateway type devices and if you primarily use Windows you likely have a PFX file that contains your private key. To convert the easiest way i have found is to use OpenSSL from http://slproweb.com/products/Win32OpenSSL.html. Once installed, you can convert using the following commands (note you may need to change the folder depending on the architecture and location installed to):

cd C:Program FilesOpenSSL-Win64binopenssl pkcs12 -in d:Tempcert.pfx -out d:Tempcert.pem -nodes

The -nodes removes the password from the created PEM file. If you wish to maintain the password encryption omit the -nodes however this may make it difficult to use the PEM file on your device. You will be prompted to type the password for the pfx file. An example is shown below.

You can now use the created PEM file.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like