Ask a Question

Advanced Search

Solution ID : SO17389

Last Modified : 05/02/2018

How to convert a JKS Keystore to a PKCS12 (.p12) format


How to convert a JKS keystore file to PKCS12 format.
How to move a certificate from Tomcat to IIS


To convert a JKS (.jks) keystore to a PKCS12 (.p12) keystore, run the following command:

Note: This command is supported on JDK / JRE keytool versions 1.6 and greater.

keytool -importkeystore -srckeystore [MY_KEYSTORE.jks] -destkeystore [MY_FILE.p12] -srcstoretype JKS - deststoretype PKCS12 -deststorepass [PASSWORD_PKCS12]

List of example parameters:

MY_KEYSTORE.jks: path to the keystore that you want to convert.
MY_FILE.p12: path to the PKCS#12 file (.p12 or .pfx extension) that is going to be created.
PASSWORD_PKCS12: password that will be requested at the PKCS#12 file opening.


To verify the content of .p12 (e.g. MY_FILE.p12), run the following command:

keytool -list -v -keystore MY_FILE.p12 -storetype pkcs12

For more information about Keytool key management tool, please visit the following web site.