Private Key Tools

Private key → uncompressed public key

Compute P = k·G on secp256k1 and serialize the point in the original 65-byte form 04‖X‖Y — the encoding every key generated before 2012 used, and the only one that reproduces an old uncompressed address or a 5… WIF.

64 hex digits = 32 bytes. 0x prefixes, spaces and upper case are accepted; shorter values are left-padded with zeros. The value must lie in [1, n−1]. The key is never logged by this page, but it is sent to the server — use test keys while experimenting.
No input yet

Enter a value above and press Convert. Not sure what to type? Press “Use example” to load the sample from the placeholder.

How it works

What this page computes

You give it a 256-bit private key k and it produces the uncompressed public key: the elliptic-curve point P = k·G written out in full, both coordinates, tagged with a single 04 byte. That is 65 bytes — the format Satoshi's original client used for every key it ever made.

P = k · G   →   pubkey = 0x04 ‖ X ‖ Y  (65 bytes = 520 bits)
private key k→ k · G→ point (X, Y)→ 04 ‖ X ‖ Y→ SHA-256→ RIPEMD-160→ hash160→ 1… address

Nothing here is a new kind of cryptography. The curve arithmetic is identical to the compressed-key page; only the serialization of the resulting point differs — and that difference is what gives one private key two unrelated addresses.

1. Why the uncompressed form is exactly 65 bytes

A public key is a point on secp256k1: two numbers X and Y in the range [0, p−1] satisfying Y² ≡ X³ + 7 (mod p), with p = 0xFFFFFFFF…FFFFFC2F (256 bits). Since each coordinate is smaller than p, each one fits into 32 bytes. The encoding is the obvious one — a one-byte tag saying "here comes a point in uncompressed form", then the two coordinates:

Offset (bytes)LengthFieldValue for this page's purpose
01Type tag / prefix04 = uncompressed point
132X coordinate, big-endian, zero-paddedfirst coordinate of P = k·G
3332Y coordinate, big-endian, zero-paddedsecond coordinate of P
65 bytes total520 bits → 130 hex digits

Three details are easy to get wrong:

2. The prefix byte: 04, and the abandoned 06/07

The first byte comes from SEC1, the standard that defines how elliptic-curve points are written as octet strings. SEC1 gives each point encoding a one-byte identifier, and Bitcoin inherited all of them:

PrefixNameLayoutLengthStatus today
00Point at infinity—1 byteNever valid as a public key; k = 0 cannot produce it
02Compressed, even Y02 ‖ X33 bytesStandard modern form
03Compressed, odd Y03 ‖ X33 bytesStandard modern form
04Uncompressed04 ‖ X ‖ Y65 bytesLegacy but fully valid in legacy scripts
06Hybrid, even Y06 ‖ X ‖ Y65 bytesObsolete; redundant parity bit
07Hybrid, odd Y07 ‖ X ‖ Y65 bytesObsolete; redundant parity bit
nonex-only (BIP340 / Taproot)X32 bytesModern for Taproot only

The hybrid forms 06 and 07 carried the parity of Y in the low bit of the tag (06 = even, 07 = odd) and also wrote out Y in full. The parity bit therefore said nothing the Y bytes did not already say, while handing an attacker a second, redundant field to tamper with: flip the tag and the key becomes internally inconsistent. Later revisions of SEC1 dropped the hybrid encodings for exactly that reason, no wallet ever emitted them, and they carry no meaningful transaction volume. This page's shared parser still accepts a 06/07 key so you can inspect one — never generate or store one.

Nothing to do with the network byte

The 04 here is a point tag. It is unrelated to the version byte of an address (0x00 for mainnet P2PKH) or the version byte of a WIF (0x80). Three different "prefix bytes" appear in one derivation chain; conflating them is a classic beginner error.

3. Where this format came from — and why it changed in 2012

The original Bitcoin client (2009) generated keys through OpenSSL. OpenSSL's default octet-string encoding for an EC point is the uncompressed one, so every key created by the first three years of Bitcoin software was a 65-byte 04‖X‖Y key, and every address in the early blockchain was hash160 of that 65-byte string. That is the historical default, not a special "legacy mode" someone switched on.

Compression was proposed later as a space optimization. A point's Y coordinate is fully determined by X plus one bit (its parity), so 32 of the 65 bytes are redundant. A BIP-style proposal worked through the change, and Bitcoin 0.6.0, released in March 2012, shipped support for compressed public keys and made them the default for newly generated keys. The motivations were purely economic and practical:

Because the change altered the bytes that get hashed, wallets had to tell their users which form a key was in — a raw private key carries no such information. That is the entire reason the WIF format grew a 0x01 compression flag in the same release (see private key → compressed WIF). Crucially, the change added a format; it did not invalidate the old one. Coins sitting at uncompressed addresses in 2012 are still spendable today, by the same consensus rules.

4. Why the uncompressed form still matters

Where the uncompressed form is not allowed

SegWit witness-v0 rules require a compressed public key: P2WPKH and P2SH-P2WPKH outputs can only be spent with a 33-byte key. The same goes for any modern descriptor-based wallet that refuses uncompressed keys at import time. So an uncompressed key leads to P2PKH (and historical bare-P2PK) scripts only — you cannot turn it into a bc1q… address.

5. Worked example with the real demo values

Everything in this table is what this page computes for the sample key shown in the input box. You can reproduce it by pressing "Use example":

StepValue
Private key k (hex)0824c314772b2c2859c889471390a36bf66e53a1ca1642f96f0f2c9307a171ca
Private key (decimal)3683455675284633286911943861444039993120875154046227415438637967083965608394
X of P = k·Gff812e26116a9aa140abe629e7f8a38401653caf925119def59ed3758c67ee80
Y of P8f49cde13c7ffd64f1d730bf87a743a578eda4971ddac4a08118160732b424ae
Parity of Ylast hex digit e → even (so the compressed sibling of this key starts with 02)
Uncompressed public key (this page's output)04ff812e26116a9aa140abe629e7f8a38401653caf925119def59ed3758c67ee808f49cde13c7ffd64f1d730bf87a743a578eda4971ddac4a08118160732b424ae
Its length65 bytes = 130 hex digits = 520 bits
hash160 of that 65-byte string3f0e966dc089c611a9c1d03bd4f69ea53b0223f9
P2PKH address from it16kR3eiswUY6tmGnxZhwQmW6LAvTLGWG2G
For contrast: compressed key02ff812e26116a9aa140abe629e7f8a38401653caf925119def59ed3758c67ee80
For contrast: its hash16021f57b6debcfc5b67182dfb4af1641f0a8189012
For contrast: its P2PKH address146ZNjH7XTXnMd1ofe3z7CL2i8WM7N2UqT

The last three rows are the whole point of this page. The same 256-bit number k is responsible for both 16kR3eis…GWG2G and 146ZNjH7…2UqT. They are not aliases: they are two distinct 20-byte commitments, two distinct addresses, and a wallet normally watches only one of them.

The address itself is a Base58Check structure built from the hash160 above:

Address partLengthDemo value
Version byte1 byte00
hash160 payload20 bytes3f0e966dc089c611a9c1d03bd4f69ea53b0223f9
Checksum = first 4 bytes of SHA256d(payload)4 bytes3b0b7cbd
Encoded result34 characters of Base5816kR3eiswUY6tmGnxZhwQmW6LAvTLGWG2G

6. Compressed vs uncompressed, side by side

UncompressedCompressed
Serialization04 ‖ X ‖ Y02/03 ‖ X
Bytes / hex digits / bits65 / 130 / 52033 / 66 / 264
Information carriedBoth coordinatesX plus the parity of Y
hash160 inputall 65 bytesall 33 bytes
P2PKH address (same key)16kR3eis…GWG2G146ZNjH7…2UqT
Matching WIF prefix5…K… / L…
Public key bytes pushed when spending6533
Typical P2PKH scriptSig size1 + 72 + 1 + 65 = 139 bytes1 + 72 + 1 + 33 = 107 bytes
Usable in witness v0 / TaprootNoWitness v0 yes (x-only key for Taproot)
Default sinceBitcoin 0.1 (2009)Bitcoin 0.6.0 (March 2012)
Still consensus-valid?Yes, for legacy script typesYes

The scriptSig arithmetic is worth spelling out: a P2PKH spend pushes one DER signature plus its 1-byte sighash type (about 72 bytes) and one public key, each preceded by a length byte. At a fee rate expressed in satoshis per virtual byte, that 32-byte difference is paid on every input, forever.

7. One key, two addresses — the most common "I lost my coins" story

A private key does not know its own encoding

The number k is just a number. "Compressed" or "uncompressed" is a property of the serialization, and the only place that choice is recorded in a wallet backup is one flag byte inside the WIF string. Import an uncompressed key into a wallet that assumes compression, and it will derive hash160(02/03‖X), look up 146ZNjH7…, find nothing, and display a zero balance — while your actual coins sit untouched at 16kR3eis…. Nothing has been lost, but it looks exactly like a loss, and this is the single most common version of that story.

Three consequences worth remembering:

  1. Both addresses are spendable by you. The same private key controls the compressed and the uncompressed address. If someone ever paid you at an old address, you can still move those coins.
  2. They cannot be merged. You cannot "convert" an uncompressed address into a compressed one; you can only send the coins from the former to the latter in an ordinary transaction, paying a fee.
  3. Check both before concluding anything. When a restored wallet shows zero, compute both forms (this page and its compressed twin do exactly that) and search the blockchain for both addresses.

8. What happens after this step

65-byte public key→ SHA-256→ RIPEMD-160→ 20-byte hash160→ Base58Check(0x00 ‖ hash160)→ 1… address

9. Security notes

10. Common mistakes

11. Quick reference

ItemValue
FormulaP = k·G on secp256k1
Encoding0x04 ‖ X(32) ‖ Y(32)
Length65 bytes / 130 hex digits / 520 bits
Prefix meanings02/03 compressed, 04 uncompressed, 06/07 hybrid (obsolete)
CoordinatesBig-endian, fixed 32 bytes, reduced mod p
Where the prefix livesInside the hash160 preimage — it changes the address
Reachable address typesP2PKH (1…) and legacy bare P2PK only
Matching backup formatWIF starting with 5, 51 characters
Reversible to k?No (ECDLP)
Still valid on-chain?Yes, for legacy script types