256-bit bijection  ·  Bitcoin × Chess

Your Bitcoin Key as a Chessboard

A real chess position carries about 148 bits of information. Two boards comfortably hold a 256-bit Bitcoin key — encoded as a perfect mathematical bijection over the standard chess army.

Educational tool. Never store real funds with a key generated or shown here. All cryptography runs locally in your browser — your key is never sent anywhere.

Private-Key Positions

1Low 128 bits
2High 128 bits

Each board carries 128 bits via the unique placement of the standard chess army (16 pieces per side, pawns on ranks 2–7, bishops on opposite colours). You can also paste your own FEN — if it matches the schema, the Bitcoin key updates instantly.

How a 256-bit key becomes two positions

1Split the 256-bit key K into two halves: K = Klow + 2128·Khigh.
2Place pieces in fixed order (kings, queens, rooks, bishops, knights, pawns). At each step, the remaining squares define a radix; the next digits of the half-key pick the placement combinatorially.
3Pawns can only land on ranks 2–7. Bishops are placed one on a light square and one on a dark square. The result is always a piece-set-legal position.
4Decoding reverses each step: read piece positions in the same order, accumulate the digits back into K via Horner's scheme. The mapping is a perfect bijection.

Live derivation

A Bitcoin private key is simply a 256-bit number — identical on mainnet and testnet. Only the visible WIF prefix and address format change between networks. Outputs below are mainnet.

Raw hex (32 bytes)
WIF (import to any wallet)
SegWit address (Bech32)
Legacy address (P2PKH)
Compressed public key
Loading cryptography libraries…

Decode an existing key

Famous keys

How the mapping works

1. Split the key into two halves

A Bitcoin private key is 256 bits. We split it into a low 128-bit half (Klow) and a high 128-bit half (Khigh). Each half becomes one of the two chessboards.

2. Encode each half as a chess position

Using mixed-radix combinatorial unranking, the 128-bit value picks one specific placement of the standard 32-piece chess army on the 64 squares (pawns on ranks 2–7, bishops on opposite colours). Each position carries ≈148 bits of capacity, of which 128 are used.

3. Derive the public key with ECDSA

Compute P = k·G on the secp256k1 curve. This step is one-way: nobody can recover k from P. We use the audited @noble/secp256k1 library, fully in your browser.

4. Hash → address

HASH160 = RIPEMD-160(SHA-256(public key)) gives the 20-byte payload that becomes the address (Bech32 for SegWit, Base58Check for legacy).

Want the full theory? Read the deep-dive article →