I'm getting mixed answers on this question. For example, this source says addresses vary between 27 and 34 characters in length. The Wiki 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?

| improve this question | | | | |

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

Which hash length 27. This address is valid and has been used on the blockchain! But it is not the shortest address.

I wrote this short bash script 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.

The maximum length address has version_byte=00, data=20*FF, checksum=FA06820B:


Which hash length 34. This has also been used to receive coins, as can be seen here.

| improve this answer | | | | |
  • 1
    Wrong answer. blockchain.info/address/11111111111111111111BZbvjr has 26 symbols and I am not sure that it is the shortest :) – amaclin Apr 17 '15 at 13:21
  • @amaclin, thanks! I stand corrected. I have updated my answer. I wrote a shell script to test my answer for sure this time ;) – morsecoder Apr 17 '15 at 14:36
  • the wiki is incorrect because the maximum length is 34, not 35. – mulllhausen Nov 29 '15 at 6:47
  • 3
    The testnet P2SH address 2MzQwSSnBHWHqSAqtTVQ6v47XtaisrJa1Vc has 35 chars. – MCCCS Apr 6 '18 at 7:33
  • This question doesn't concern testnet addresses. – morsecoder Apr 6 '18 at 13:08

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
Base58 generates a 35 characters address but as mentioned in the link and leading zero bytes are expressed as a single "1".


Depending on the number of leading zeros, the minimum number can be different. Theoretically it even can be as small as 20 characters so you cant define the minimum length for the bitcoin addresses.

| improve this answer | | | | |

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.