How to Convert a PFX keystore file to JKS using Java keytool?

Document ID : KB000094145
Last Modified Date : 09/06/2018
Show Technical Document Details
Introduction:
This document shows how a PFX keystore (Personal Information Exchange Format also known as PKCS #12) can be converted to a Java Keystore (JKS) using the Java keytool.
Question:
How to Convert a PFX keystore file to JKS using Java keytool?
Answer:
Open a command prompt and go to the directory where keytool is available.
If you have DevTest installed, you will find keytool under the $DEVTEST_HOME/jre/bin folder.
If DevTest is not installed, you will find keytool under your $JAVA_HOME/bin folder.

Using Keytool run the following command below:
keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS
 
Replace the mypfxfile.pfx with the name of the PFX file you want to convert to a Java keystore (JKS).
Replace the clientcert . jks with the name of the keystore file you wish to create (it needs to be a JKS file).
Additional Information:
For more information about keytool, please use the link below:
keytool - https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html

For more information regarding SSL, Java and DevTest, find the document in the link below:
Of SSL, SNI, Java and DevTest - https://communities.ca.com/docs/DOC-231172116-of-ssl-java-and-devtest