Is there any way to generate bitcoin addresses other than the Blockchain API? (given the fact that it is not public)

4 Answers 4


I wrote a long and detailed tutorial on it http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript

In short, scroll all the way down to the summary to see this short version:

var randArr = new Uint8Array(32) //create a typed array of 32 bytes (256 bits)
window.crypto.getRandomValues(randArr) //populate array with cryptographically secure random numbers

//some Bitcoin and Crypto methods don't like Uint8Array for input. They expect regular JS arrays.
var privateKeyBytes = []
for (var i = 0; i < randArr.length; ++i)
  privateKeyBytes[i] = randArr[i]

var eckey = new Bitcoin.ECKey(privateKeyBytes)
eckey.compressed = true
var address = eckey.getBitcoinAddress().toString()
console.log(address)// 1FkKMsKNJqWSDvTvETqcCeHcUQQ64kSC6s

var privateKeyBytesCompressed = privateKeyBytes.slice(0) //clone array
var privateKeyWIFCompressed = new Bitcoin.Address(privateKeyBytesCompressed)
privateKeyWIFCompressed.version = 0x80
privateKeyWIFCompressed = privateKeyWIFCompressed.toString()

Open up the JavaScript console on the page (in your browser) and follow along. You can create your very own address right there in the browser. I wouldn't recommend using this newly created address to actually conduct commerce. Just use it as an academic exercise.

  • 1
    I wouldn't recommend using this newly created address to actually conduct commerce. Just use it as an academic exercise. Why do you say that? Are there any risks associated with this method (as I intend to use it for generating personal cold-storage keys) Commented Nov 30, 2017 at 22:46
  • 1
    Yes, generating a private key in the browser where other scripts/plugins may have access to the keys puts your money at risk. Commented Dec 2, 2017 at 11:31
  • Gotcha, but I can use my own personal Javascript IDE or something just fine. Just wanted to make sure there wasn't a potential risk with the code itself (as opposed to the environment) Thanks for clarification Commented Dec 2, 2017 at 12:06

There are a number of sample programs here: https://bitcointalk.org/index.php?topic=1026.0

Also see the wiki for the step-by-step algorithm for generating a valid address.


There are plenty of very easy-to-use tools that can generate addresses for you, the exact process is detailed in the Bitcoin wiki.

Some examples of such tools are:


Coinbase Your wallet on Coinbase is a collection of bitcoin addresses. New bitcoin addresses are automatically generated for each payment on Coinbase and stay associated with your account forever (so it is safe to reuse them).

  • I meant programatically, that's why I mentioned the blockchain API. And here you are giving me your "referral" link to coinbase. Commented Dec 2, 2013 at 20:40

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.