The following instructions will guide you through the process of generating a PFX or P12 file using OpenSSL commands.

OpenSSL Instructions

To complete the instructions below you will need to have OpenSSL installed on your computer. Windows users can download a copy of the OpenSSL installer here: Wiki OpenSSL

For OSX users, OpenSSL should be installed by default on your machine. 

After you have downloaded and installed the exe or MSI file, click on the Windows key or on your keyboard or click on the Windows Icon in your lower left corner of your screen and type: OpenSSL

The following result should be displayed: Win64 OpenSSL Command Prompt app.

Clicking the app will open a command line console as shown, the default location will be c:\users\%username%\

Please note, this is the default location where your CSR and Private key will be saved.

To create an P12 file or a PFX file, copy the following to the command line with your own specifics:

Create a PFX file:

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt


Create a P12 file:

openssl pkcs12 -export -out certificate.p12 -inkey privateKey.key -in certificate.crt


  1. Certificate.pfx = The PFX file that will be created after the query has been completed successful. You can change it also to .p12 extension id needed.
  2. PrivateKey.key = The Private key you have saved after creating your CSR.
  3. Certificate.crt = The certificate file you received after completing all validation steps in the order.


Here is the plain text version of the example, we have copied and paste into our terminal:

openssl pkcs12 -export -out c:\createpfx\certificate.pfx -inkey c:\createpfx\private.key -in c:\createpfx\certificate.crt

Note:  This openssl command created 1 file certificate.pfx in the folder c:\createpfx.

Example P12 and PFX: