Bitcoin Puzzle/Hex to WIF

Tool

Hex to WIF converter

Convert a raw Bitcoin private key from hex to Wallet Import Format, the base58 encoding that wallets like Electrum accept. Both the compressed and uncompressed WIF are shown. Everything runs locally in your browser: your key never leaves this page.

The converter

Paste or type a hex key above. The conversion runs instantly as you type, entirely in your browser.

How the conversion works

A WIF key is the same 256 bit number as the hex key, wrapped for safe copying. The steps: prefix the 32 key bytes with 0x80 (Bitcoin mainnet), append 0x01 if the key should derive a compressed public key, add a 4 byte double SHA-256 checksum, and encode the result in base58. The checksum is why a mistyped WIF is caught immediately instead of silently pointing at the wrong wallet.

Compressed or uncompressed? Modern wallets use compressed keys (WIF starting with K or L), which derive a different address than the uncompressed form (WIF starting with 5). Same secret number, two possible addresses. If you are importing a key, try the compressed form first. You can see both resulting addresses with the private key to address tool.

This converter exists because of the Bitcoin Puzzle: solved puzzles publish their keys in hex, and the solved puzzle pages show them in WIF too, so you can verify the math end to end. The reverse conversion lives at WIF to hex.

A note on safety: never paste the private key of a funded wallet into any website, including this one. Use this tool for study, testing and puzzle work, and handle real keys only in offline, audited software.