<p><a href="https://en.bitcoin.it/wiki/Address" rel="noreferrer">The wiki</a> says that</p>
<blockquote>
<p>A Bitcoin address is an identifier of 26-35 alphanumeric characters.</p>
</blockquote>
<p>This information is now outdated but it was true at the time this question was asked <a href="https://bitcoin.stackexchange.com/a/36948/107202">look at morsecoder's answer</a>. With the introduction of Bech32 type addresses in 2017, the minimum and maximum length of a Bitcoin address have changed.</p>
<p>According to <a href="https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki" rel="noreferrer">BIP 173</a>:</p>
<blockquote>
<p>[Segwit] addresses are always between 14 and 74 characters long.</p>
</blockquote>
<blockquote>
<p>Version 0 witness addresses are always 42 or 62 characters.</p>
</blockquote>

CC BY-SA 4.0
2020-07-02T07:37:21.093Z
2020-07-02T07:43:37.890Z
2020-07-02T07:43:37.890Z
Baran Kılıç
<p>Private key and public key has a fixed size. Private keys are always 32 bytes, and public keys are always 65 bytes. However the bitcoin addresses are generated from the public key using <a href="https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart" rel="nofollow">Base58 encoding</a> <br/>
Base58 generates a 35 characters address but as mentioned in the <a href="https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart" rel="nofollow">link</a> and leading zero bytes are expressed as a single "1".</p>

<pre><code>repeat(number_of_leading_zero_bytes_in_hash)
   {
   output_string.append(code_string[0]);
   }
</code></pre>

<p>Depending on the number of leading zeros, the minimum number can be different. <a href="https://bitcointalk.org/index.php?topic=613068.0" rel="nofollow">Theoretically</a> it even can be as small as 20 characters so you cant define the minimum length for the bitcoin addresses.</p>

CC BY-SA 3.0
2015-04-16T16:45:42.537Z
2015-04-16T16:45:42.537Z
abeikverdi
<p>The wiki is correct! The source you linked must have assumed that the address with the smallest encoding has version_byte=00, data=20*00, checksum=94A00911</p>
<pre><code>$ encodeBase58 00000000000000000000000000000000000000000094A00911
1111111111111111111114oLvT2
</code></pre>
<p><strong>Which has length 27.</strong> This address is valid and has been <a href="https://blockchain.info/address/1111111111111111111114oLvT2" rel="noreferrer">used on the blockchain</a>! But it is not the shortest address.</p>
<p>I wrote this short <a href="http://pastebin.com/zx9kQtT0" rel="noreferrer">bash script</a> to find the minimum length address. It found that there were a total of <strong>266 address of length 26</strong>. For anyone who is curious, <a href="http://pastebin.com/KJmYYmtC" rel="noreferrer">these are the 266 addresses with length 26</a>.</p>
<hr> 
<p>The maximum length address has version_byte=00, data=20*FF, checksum=FA06820B:</p>
<pre><code>$ encodeBase58 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA06820B
1QLbz7JHiBTspS962RLKV8GndWFwi5j6Qr
</code></pre>
<p><strong>Which has length 34.</strong> This has also been used to receive coins, as can be seen <a href="https://blockchain.info/address/1QLbz7JHiBTspS962RLKV8GndWFwi5j6Qr" rel="noreferrer">here</a>.</p>

CC BY-SA 4.0
2020-07-02T00:46:20.383Z
Note that this answer is out of date, since there have both been longer and shorter addresses seen on the network since it was written. Notably, p2wsh addresses are 62 characters.
Murch
CC BY-SA 4.0
2022-11-22T17:11:40.540Z
According to BIP 173:

"Version 0 witness addresses are always 42 or 62 characters."

So `bc1` prefixed addresses would adhere to this limit

Version 1 addresses (P2TR or Pay-To-Taproot) with a prefix `bc1p` are not strictly Version 0 witness addresses... however there is no mention of address length in BIP341... so not sure what the length here would be...
oz21m
CC BY-SA 4.0
2015-04-16T17:32:18.127Z
2020-07-02T00:42:35.480Z
2020-07-02T00:42:35.480Z
morsecoder
<p>I'm getting mixed answers on this question. For example, <a href="http://enetium.com/resources/Bitcoin.pdf">this source</a> says addresses vary between 27 and 34 characters in length. <a href="https://en.bitcoin.it/wiki/Address">The Wiki</a> says 26-35 characters. Neither source cites something that will let me independently confirm the figures.</p>

<p>What are the minimum and maximum lengths of a Bitcoin address on mainnet, and how are these numbers derived?</p>

<address>
What are the minimum and maximum lengths of a Mainnet Bitcoin address?
Rich Apodaca
# What are the minimum and maximum lengths of a Mainnet Bitcoin address?

(Asked by: username_0 on 2015-04-16)

I'm getting mixed answers on this question. For example, [this source](http://enetium.com/resources/Bitcoin.pdf) says addresses vary between 27 and 34 characters in length. [The Wiki](https://en.bitcoin.it/wiki/Address) says 26-35 characters. Neither source cites something that will let me independently confirm the figures.

What are the minimum and maximum lengths of a Bitcoin address on mainnet, and how are these numbers derived?

**Tags:** address


---

## 3 answers

### Answer by username_3 on 2015-04-16. Score: 21 | Accepted answer

The wiki is correct! The source you linked must have assumed that the address with the smallest encoding has version\_byte=00, data=20\*00, checksum=94A00911

```
$ encodeBase58 00000000000000000000000000000000000000000094A00911
1111111111111111111114oLvT2

```

**Which has length 27.** This address is valid and has been [used on the blockchain](https://blockchain.info/address/1111111111111111111114oLvT2)! But it is not the shortest address.

I wrote this short [bash script](http://pastebin.com/zx9kQtT0) to find the minimum length address. It found that there were a total of **266 address of length 26**. For anyone who is curious, [these are the 266 addresses with length 26](http://pastebin.com/KJmYYmtC).

---

The maximum length address has version\_byte=00, data=20\*FF, checksum=FA06820B:

```
$ encodeBase58 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA06820B
1QLbz7JHiBTspS962RLKV8GndWFwi5j6Qr

```

**Which has length 34.** This has also been used to receive coins, as can be seen [here](https://blockchain.info/address/1QLbz7JHiBTspS962RLKV8GndWFwi5j6Qr).

> **Comments:**
> **username_4**: Note that this answer is out of date, since there have both been longer and shorter addresses seen on the network since it was written. Notably, p2wsh addresses are 62 characters.  
> **username_5**: According to BIP 173:  "Version 0 witness addresses are always 42 or 62 characters."  So `bc1` prefixed addresses would adhere to this limit  Version 1 addresses (P2TR or Pay-To-Taproot) with a prefix `bc1p` are not strictly Version 0 witness addresses... however there is no mention of address length in BIP341... so not sure what the length here would be...  

---

### Answer by username_1 on 2020-07-02. Score: 7

[The wiki](https://en.bitcoin.it/wiki/Address) says that

> A Bitcoin address is an identifier of 26-35 alphanumeric characters.

This information is now outdated but it was true at the time this question was asked [look at username_3's answer](https://bitcoin.stackexchange.com/a/36948/107202). With the introduction of Bech32 type addresses in 2017, the minimum and maximum length of a Bitcoin address have changed.

According to [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki):

> [Segwit] addresses are always between 14 and 74 characters long.

> Version 0 witness addresses are always 42 or 62 characters.


---

### Answer by username_2 on 2015-04-16. Score: 1

Private key and public key has a fixed size. Private keys are always 32 bytes, and public keys are always 65 bytes. However the bitcoin addresses are generated from the public key using [Base58 encoding](https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart)   
Base58 generates a 35 characters address but as mentioned in the [link](https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart) and leading zero bytes are expressed as a single "1".

```
repeat(number_of_leading_zero_bytes_in_hash)
   {
   output_string.append(code_string[0]);
   }

```

Depending on the number of leading zeros, the minimum number can be different. [Theoretically](https://bitcointalk.org/index.php?topic=613068.0) it even can be as small as 20 characters so you cant define the minimum length for the bitcoin addresses.


---

