A simple CLI tool to convert Ethereum plain private key to UTC/JSON keystore format.
Please don't share your private key (plain text or UTC/JSON keystore format) to anyone. Keep it safe!
$ cd /path/to/projects
$ git clone https://github.com/zulhfreelancer/private-key-to-json.git
$ cd private-key-to-json
$ npm link
private-key-to-json command will be available globally.
$ cd /path/to/any/folder
$ private-key-to-json
**************************** WARNING *****************************
* This will create/replace private_key.json file in this folder. *
* ------------------ Press Ctrl + C to abort. ------------------ *
******************************************************************
Please enter the plain private key:
xxx
Please enter the passphrase:
<just-press-enter-if-it-has-no-passphrase>
JSON keystore generated. See private_key.json file.
Inside the /path/to/any/folder, you will see a file named private_key.json. Every time you run private-key-to-json command, it will replace the content of the file.
You can test the UTC/JSON keystore file at MyCrypto by choosing Keystore / JSON File option in that webpage.
If you no longer need the CLI, you can remove it by running the following command:
$ npm uninstall -g private-key-to-json
