From https://en.bitcoin.it/wiki/Address:

A Bitcoin address, or simply address, is an identifier of 27-34 alphanumeric characters, beginning with the number 1 or 3, that represents a possible destination for a Bitcoin payment.

Is any random address I create following the above rules going to be an address I can sucesfully send Bitcoin to?

For example if I randomly generate these addresses:

  • 3111111111111111111111111111111111

Are these all valid addresses I can always send Bitcoin payments to? Or do they have to already 'exist' in some capacity?

  • Check this out instead (en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses). No BTC addresses are not random. I don't have the time at the moment to outline the specifics, but these addresses will most certainly be rejected by the network.
    – RLH
    Oct 31, 2013 at 13:48
  • Also, even if you'd randomly generate a syntactically correct address, you won't be able to spend anything sent to it unless you own the corresponding private key. So address generation always starts from the private key. Oct 31, 2013 at 13:50
  • If you want to run some python code to validate a bitcoin address here it is: rosettacode.org/wiki/Bitcoin/address_validation#Python Oct 31, 2013 at 14:29

2 Answers 2


Addresses are randomly generated starting from a private key. The private key is the only truly random value in a whole chain of interesting values. These values are then mathematically derived from the private key. On the other end of the chain of values is the address.

Now if you could simply pick an address and recover the private key that, when passing it through the address derivation mechanism, gives you that address we would be in a lot of trouble. People could simply listen to transactions on the network, extract the receiving address, reconstruct the private key and spend the funds, even if they were not the intended recipient. So at this point it should be clear that simply picking an address and go ahead from there is not possible, in other words some of the functions in the chain are non-reversible.

So starting from the private key, we construct a public key. Already this first step is non-reversible, otherwise public-key cryptosystems would stop working. It should be computationally unfeasible to recover the private key from the public key. Bitcoin further goes ahead and hashes the public key twice. This step is non-reversible as well.

The first character of the address depends on the address version and may not be freely chosen. Then there is the matter of the Base58 encoding, which unlike the other mechanisms is reversible.

Finally the last few characters in the address are a checksum which is again calculated as a double hash of the already hashed public key. So for these last characters there is simply no way of "choosing" them so that the address looks a certain way.

So to answer your question: no, you cannot simply pick an Address that looks nice and use it as yours. That's also the reason why tools like vanitygen exist: they simply pick a random private key, transform it until they get an address and then check whether it has the desired features, e.g., your name in it. The more restrictive you are with what you want your address to look like, the harder it gets to find one that does. This difficulty increases exponentially, hence the term computationally unfeasible above.

  • > So to answer your question: no, you cannot simply pick an Address that looks nice and use it as yours Not quite what I'm asking, I'm asking if I can send BTC to these addresses
    – Tom Gullen
    Oct 31, 2013 at 15:05
  • There are people sending very small amounts of satoshis to store file checksums, to be able to prove that the file existed at a certain date. proofofexistence.com Oct 31, 2013 at 15:33
  • 1
    Ah, my mistake I thought you were asking whether you can use these addresses to receive bitcoins. If you simply want to send them, you can do so to arbitrary addresses (as long as they have a valid version byte and a matching checksum).
    – cdecker
    Oct 31, 2013 at 15:40

An "address" in bitcoin is composed in binary form of:

[1 prefix byte] + [20 bytes of ~public key] + [4 checksum bytes] = 25 bytes

This binary form is then converted to base 58, with 58 characters valid to write it (letters and numbers, except "0, O, I, l" which are confusing). That results in the 26-35 string of characters that is commonly used.

The prefix fixes the "1" or "3" character (P2PKH, P2SH), and the last 4 bytes are calculated from the previous 21 bytes.

So those 20 bytes in the middle could be chosen randomly.

But if those 20 bytes were random the private key would be unknown, and so funds transferred to that "address" would be irrecoverable. The correct process is to choose a private random key, derivate the public from it, and then fill those 20 bytes.

So, the reasons why a random combination of 26-35 letters and numbers won't result in a valid bitcoin address, even if it starts with "1" or "3" and "0, O, I, l" are not present:

  • when passed to binary, the number of bytes obtained may not be 25 exactly.
  • if it mapped to 25 bytes, checksum won't validate the previous 21 bytes.

As for the last question, any address with those 20 middle bytes generated randomly and the checksum and prefix correct, is valid. It will have a zero amount of bitcoins available when checked for the first time (for example at https://blockchain.info), and any funds transferred to it will be received. There's no previous requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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