Skip To Main Content

Certificates

Solutions

Join our Newsletter

Contact Us

How to Split a .pfx File into .pem and .key Files Using OpenSSL for Windows 10 or Linux

Use the instructions in this guide to use OpenSSL to split a .pfx file into .pem and .key files.

Use the instructions in this guide to use OpenSSL to split a .pfx file into .pem and .key files.

Requirements: 

  • A .pfx file
  • OpenSSL for Windows 10 or Linux

Note: OpenSSL will use the current path in the command prompt – remember to navigate the command prompt to the correct path before running OpenSSL.

Remember to change the details of the commands to fit your filenames and setup.

The following command will generate a private key file without a password from your .pfx file (requires password):

pkcs12 -in certificate.pfx -out privateKey.key -nocerts -nodes

The following command will generate a .pem certificate file from your .pfx file which will include any intermediate and root certificates that may be included in the .pfx file. (requires password):

pkcs12 -in certificate.pfx -out certificate.pem -nokeys -clcerts

The .key and .pem files will be available at the path used in the command prompt.

Jon Tittmann

Vetting/Support Team Lead & OpEx

Jon has been an integral part of TRUSTZONE for the past six years, during which he has acquired substantial expertise in the cyber security field. As the team leader for our support team, he possesses a profound understanding of the sector, enabling him to resolve even the most complex challenges within the certificate industry effectively.

Submit Your Technical Queries Here for Expert Assistance!

We will contact you as soon as possible.

Please enter your details below.