How to extract Private Key from PKCS 12 (Pfx/P12)

Unlike the Public Key which is visible in the Certificate Details page, the private key wont be visible and can’t be downloaded directly. To download that in a readable format or as a text file follow the steps below,

Download and install OpenSSL in your Windows or Linux machine,


Once the installation is complete , place the p12 or pfx file in OpenSSL\bin path and execute the below command,


openssl pkcs12 -in filename.p12 -nodes -nocerts -out privatekey.pem


The above command will ask for the keystore password. Enter the same and it will reply as MAC verified OK and a file named PrivateKey.pem in the same path.


You can open the file in Notepad and copy the private key.

Need More Help?

Are you looking for a personalized customer support? Submit your question or Call our Toll Free Number to speak with ServiceDesk Plus MSP Expert who can offer a better solution for your requirements.

Submit a Ticket
Email :
Toll Free : 1-888-720-9500