I am using bitcoind. It generates the BTC addresses(not segregated). How to get segwit addresses? Do I have to change the settings in bitcoin.conf file?

bitcoin-cli getnewaddress -- generates address that starts with '1'


Make sure you are using Bitcoin-core v0.16 bitcoin-cli getnetworkinfo then in your bitcoin.conf add


As @Meshcolider comment if you want to get p2sh address you should set:


But I would use bech32 since bech32 produces smaller transactions than P2SH segwit transactions.

For Bitcoin-core version 0.15 send

bitcoin-cli addwitnessaddress 1BRo7qrYHMPrzdBDzfjmzteBdYAyTMXW75

to get p2sh address.

  • After adding, when I use "getnewaddress" , will it give me a segwit address directly?
    – merklexy
    Mar 9 '18 at 11:55
  • Yeah, nothing more required. You are most welcome!
    – Adam
    Mar 10 '18 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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