I am using PolkadotJS, I can sign the message, and get the public key, but I don't know the way to get the private key. Could you please let me know how to get the private key? Thank you so much.

1 Answer 1


Polkadot js apps does not support this. The only instance where you can have access to the private key is when generating the account. Once generated, you are asked to save a json in a safe place. In this file, you can find the private key, encoded by the password that you set for your account.

Perhaps this feature can be added, although my guess is that currently Polakdot js apps is doing this to protect the users and prevents them from leaking their private key. Storing and displaying the private key in online web app sounds like the last thing you want to do.

  • I saw the encode string in the json file when created the address. Is it the private key?
    – TigerT
    Commented Jun 16, 2022 at 13:35
  • It is the private key, encrypted with the password that you have provided. I don't exactly know the format of the encryption used.
    – kianenigma
    Commented Jun 16, 2022 at 16:31
  • Based on this, the encoded key seems to be written using the TweetNaCl.js library.
    – kianenigma
    Commented Jun 16, 2022 at 16:39

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.