Is there a calculation to convert Ethereum private keys to the public address, without being connected to the internet?

2 Answers 2


I found a solution using nodejs:

const createKeccakHash = require('keccak')
const secp256k1 = require('secp256k1')
const privateKey = new Buffer('<PRIVATE KEY>', 'hex');
let pubKey = secp256k1.publicKeyCreate(privateKey, false).slice(1);
let address = createKeccakHash('keccak256').update(pubKey).digest().slice(-20).toString('hex');
  • See my answer for an easier version.
    – user19510
    Commented Jan 14, 2018 at 6:02

Transforming a private key to a public key does not require the network. It's only cryptography. The network does not do any computation for you to give you the answer.

An easier solution using Node.js:

> const Wallet = require('ethereumjs-wallet');
> Wallet.fromPrivateKey(Buffer.from('208065a247edbe5df4d86fbdc0171303f23a76961be9f6013850dd2bdc759bbb', 'hex')).getAddress().toString('hex');

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.