web3 version 1.x has the decrypt method, which decrypts a keystore v3 JSON.

By using it the following way, I can get the private key easily:

web3.eth.accounts.decrypt(keystoreJsonV3, password);

But how to get the private key with web3 version 0.2.x ?

1 Answer 1


Web3 v0.20.xx doesn't have such functionality. You can use a third party library like Ethereumjs Wallet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.