BTC Logo

BTCVanity

Custom Address Generator

Buy us a coffee

Our free tools run entirely on donations. Your support pays for the servers and GPU power that make every generation possible. If we helped you today, a small donation helps keep this service free for everyone.

ETH · Ethereum network
0xcf5777b71c31146bd396cece6d3128e42d0ad9f7

Thank you for keeping us running! ❤️

Keys

How Bitcoin P2PKH Addresses Are Derived

A Bitcoin P2PKH address is derived from a secp256k1 public key, a public-key hash, a mainnet version byte and a Base58Check encoding.

By Updated 2 min readRead as Markdown

P2PKH derivation pipeline. Public key: Derived from a secp256k1 private key; HASH160: RIPEMD-160 applied to SHA-256 of the public key; Base58Check: Version, public-key hash and checksum are encoded.
P2PKH derivation pipeline. Public key: Derived from a secp256k1 private key; HASH160: RIPEMD-160 applied to SHA-256 of the public key; Base58Check: Version, public-key hash and checksum are encoded.Open full-size diagram (SVG)Download diagram (PNG)About these visual guides
Short answer: A Bitcoin P2PKH address is derived from a secp256k1 public key, a public-key hash, a mainnet version byte and a Base58Check encoding.

From a secret scalar to a receiving address

The worker uses a private scalar to derive a secp256k1 public key. For its compressed P2PKH output, it hashes the serialized public key with SHA-256 and then RIPEMD-160. A mainnet version byte and a checksum are included before Base58 encoding.

Each stage has a different role: the secret enables signing, the public key is derived from it, the hash identifies the P2PKH spending condition, and the encoding makes the destination transferable as text.

What the independent check establishes

Before reporting success, the worker decodes the WIF output, derives its public key and address independently, and compares the address and requested pattern. A malformed WIF, mismatched address or nonmatching pattern is rejected.

That check establishes consistency of the returned pair. It does not audit every aspect of the random source or hosting system; see the separate security questions. Save the exact WIF because the public address alone cannot restore that secret.

Explore the related mechanism

Sources and editorial method

The technical references below support the concepts discussed in this article. Examples and comparison worksheets are explanatory, not measured service benchmarks.

Read how these articles are prepared.