Share Article
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.
Submit Your Technical Queries Here for Expert Assistance!
We will contact you as soon as possible.
Please enter your details below.