<blockquote>
  <p>Is there an address format for P2WPKH or P2WSH?</p>
</blockquote>

<p>No.  <a href="https://github.com/bitcoin/bips/blob/master/bip-0142.mediawiki" rel="noreferrer">BIP142</a> would have provided an address format for these output scripts, but it is in "deferred" status and expected to remain that way.  Wallet developers are being <a href="https://bitcoincore.org/en/2016/10/27/segwit-upgrade-guide/#bitcoin-software-developers" rel="noreferrer">encouraged</a> to discuss a new address format on the bitcoin-dev mailing list, and it is my understanding that one proposal may be coming soon.</p>

<p>In the meantime, <a href="https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki" rel="noreferrer">BIP70</a> supports paying to arbitrary outputs, so it can be used for the native segwit outputs, as can any other software that communicates using its own protocol (such as payment channel software like that being used for various Lightning Network implementations).</p>

<blockquote>
  <p>If P2WPKH uses the same address format as P2PKH, how does a wallet know which one to use?</p>
</blockquote>

<p>Although the new address proposal will probably not use base58check like the current address formats for P2PKH and P2SH, the now-deferred proposal in BIP142 explains how this could easily be done by changing the first byte of the address (which is a version number):</p>

<p>"For P2WPKH address, the address version is 6 (0x06) for a main-network address or 3 (0x03) for a testnet address.</p>

<p>"For P2WSH address, the address version is 10 (0x0A) for a main-network address or 40 (0x28) for a testnet address."</p>

CC BY-SA 3.0
2017-12-05T12:07:44.670Z
There is one now - https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
tsusanka
CC BY-SA 3.0
2016-11-12T20:35:00.810Z
2016-11-12T20:35:00.810Z
David A. Harding
<p>Yes. The format used for encoding native version 0 Segwit scriptPubKeys (<code>P2WPKH</code> and <code>P2WSH</code>) is <code>bech32</code>, defined by <a href="https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki" rel="nofollow noreferrer">BIP173</a>. The format used for encoding Segwit scriptPubKeys version 1 and above is <code>bech32m</code>, defined in <a href="https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki" rel="nofollow noreferrer">BIP350</a>.</p>

CC BY-SA 4.0
2020-12-01T12:28:54.777Z
2023-10-06T07:47:21.203Z
2023-10-06T07:47:21.203Z
Antoine Poinsot
<p>Is there an address format for P2WPKH or P2WSH? If P2WPKH uses the same address format as P2PKH, how does a sender's wallet know which one to use?</p>

<segregated-witness><bech32-address><address-format><bip350-bech32m>
Is there an address format for P2WPKH or P2WSH?
Nick ODell
# Is there an address format for P2WPKH or P2WSH?

(Asked by: username_0 on 2016-11-12)

Is there an address format for P2WPKH or P2WSH? If P2WPKH uses the same address format as P2PKH, how does a sender's wallet know which one to use?

**Tags:** segregated-witness, bech32-address, address-format, bip350-bech32m


---

## 2 answers

### Answer by username_3 on 2020-12-01. Score: 7 | Accepted answer

Yes. The format used for encoding native version 0 Segwit scriptPubKeys (`P2WPKH` and `P2WSH`) is `bech32`, defined by [BIP173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki). The format used for encoding Segwit scriptPubKeys version 1 and above is `bech32m`, defined in [BIP350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki).


---

### Answer by username_1 on 2016-11-12. Score: 5

> Is there an address format for P2WPKH or P2WSH?

No. [BIP142](https://github.com/bitcoin/bips/blob/master/bip-0142.mediawiki) would have provided an address format for these output scripts, but it is in "deferred" status and expected to remain that way. Wallet developers are being [encouraged](https://bitcoincore.org/en/2016/10/27/segwit-upgrade-guide/#bitcoin-software-developers) to discuss a new address format on the bitcoin-dev mailing list, and it is my understanding that one proposal may be coming soon.

In the meantime, [BIP70](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki) supports paying to arbitrary outputs, so it can be used for the native segwit outputs, as can any other software that communicates using its own protocol (such as payment channel software like that being used for various Lightning Network implementations).

> If P2WPKH uses the same address format as P2PKH, how does a wallet know which one to use?

Although the new address proposal will probably not use base58check like the current address formats for P2PKH and P2SH, the now-deferred proposal in BIP142 explains how this could easily be done by changing the first byte of the address (which is a version number):

"For P2WPKH address, the address version is 6 (0x06) for a main-network address or 3 (0x03) for a testnet address.

"For P2WSH address, the address version is 10 (0x0A) for a main-network address or 40 (0x28) for a testnet address."

> **Comments:**
> **username_2**: There is one now - https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki  

---

