Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I want to transfer an address from the satoshi client into a different client, how can I find its private key to do so?

share|improve this question
Related question, if you don't know the address, how to export all: – Stephen Gornick Sep 30 '12 at 1:06

To export a private key from your Satoshi bitcoin-qt client:

  1. launch your bitcoin client as usual and wait for it to load the blockchain and start up
  2. click on 'help' in the menu bar (top right)
  3. click on 'debug window'
  4. select the 'console' tab
  5. type: walletpassphrase "your walletpassphrase here" 600
  6. type: dumpprivkey [your Bitcoin address here]
  7. this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
  8. type: walletlock
share|improve this answer
This answer would benefit from adding "How to get your public key"; as i don't know my public key. – Ian Boyd Apr 8 '13 at 1:48
The Bitcoin address is what is to be used there. I've edited it. – Stephen Gornick Oct 11 '15 at 3:19
FYI, if you didn't already encrypt the Bitcoin-QT wallet then skip the walletpassphrase part (line numbered 5. and 8.). – Stephen Gornick Oct 11 '15 at 3:21
up vote 7 down vote accepted

Note: Recent versions of the satoshi client offer a 'debug window' which can be used to export private keys. This is described in Miguel Moreno's answer to this question, and is easier than the steps I describe below.

To export a private key from your satoshi client:

  1. you need to define a username and password in bitcoin.conf in the same folder as wallet.dat; this only needs doing once; you may have to create the file; add the following lines, changing the username and password to whatever you like:



  2. run: bitcoin-qt -server and wait for it to load the blockchain and start up

  3. if your wallet is encrypted, run: read -s x; bitcoind walletpassphrase "$x" 600; unset x to unlock it for 600 seconds (type your passphrase after hitting return, then hit return again; this 'read; ...; unset' prevents the password being written to your shell's history file on disk, and the '-s' in read prevents your password being displayed as you type it, and improves protection from screen-loggers and the shell log)

  4. run: bitcoind dumpprivkey 1my1bitcoin1addres11111 (replace 1my... with the bitcoin address of which you want the private key)

  5. if your wallet is encrypted and you want to re-lock your wallet, run bitcoind walletlock

share|improve this answer
What if I've encrypted my wallet? – Stephen Gornick Jul 19 '12 at 14:41
Good point. I updated my answer to mention that. – Chris Moore Jul 19 '12 at 18:02
I guess you do the "read x ..." shell stuff to prevent the shell writing your password to a history file. I think that's worth mentioning. – Jürgen Strobel Sep 15 '12 at 12:37
Yes, that's exactly why. I don't want my password being written to disk. – Chris Moore Sep 16 '12 at 3:26
How to dump all private keys at once? – opengrid Dec 12 '13 at 18:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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