I created an account with eth and ended up with a JSON file in the Web3 Storage Definition format. After backing up this JSON file, I am able to delete my .web3 directory and reimport this JSON file into eth as I would expect.

Now I'd like to try geth with my existing account. As I understand, geth account import expects not the JSON file, but rather a file containing just the "ciphertext" value from the JSON file. Upon providing that, geth asks me to set a new passphrase, then prints the address of the imported key.

Problem: the address geth shows for my imported key is different from the address eth knows! And when I view the JSON file that geth created from my import, its "ciphertext" value is different from the one I provided.

Question: Starting with the JSON file I have, how do I import my account correctly into geth?

1 Answer 1


All you need to do to import a JSON account file into geth is to copy the fule into the keystore folder.

  • Linux: ~/.ethereum/keystore
  • Mac: /Library/Ethereum/keystore
  • Windows: %APPDATA%/Ethereum

If the folder does not exist, create it.

The reason that the geth account import command isn't working for you is that it expects the plaintext(decrypted) private key, not the ciphertext.

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.