Bitcoin Giveaway Manager

Manage your giveaways easily. Pick winners using provably fair method based on bitcoin blockhash.

One competitor per line

Paste your list of participants, one name or identifier per line.

Set a target block

Enter the Bitcoin block number whose hash will seed the random draw.

Provably fair

Winners are derived from the blockhash — verifiable by anyone on the blockchain.

Shareable link

Generate a link to share your giveaway setup — data is encrypted client-side.


Block hash:

Decimal number:

Winner:

Provably Fair Selection Algorithm

A draw is provably fair when the winner is selected deterministically from an unpredictable, publicly verifiable seed. This tool uses the hash of a Bitcoin block as its source of entropy. Because Bitcoin block hashes are generated by decentralized miners solving complex cryptographic puzzles, they cannot be manipulated or predicted beforehand.

1. Hexadecimal to Decimal

The target block hash is a 64-character hexadecimal string. To perform arithmetic, we extract the last 6 characters (which range from 000000 to ffffff) and convert them into a base-10 integer:

This gives us a deterministic number between 0 and 16,777,215.

JavaScript
let decimal = parseInt(blockhash.slice(-6), 16);
2. Selecting the Index

We divide the decimal value by the total number of participants and find the division remainder using the modulo operator (%). The remainder acts as the index pointer:

The index is guaranteed to fall between 0 and competitors.length - 1.

JavaScript
let index = decimal % competitors.length;
let winner = competitors[index];
3. Drawing Multiple Winners

To choose multiple winners without duplicates, the selected winner is removed from the array, shrinking the pool. The script shifts the blockhash slice window one index to the left to extract a new, independent entropy chunk, and recalculates:

JavaScript
// Slice slide loop logic for Winner (N)
let n_decimal = parseInt(blockhash.slice(-(6 + step), blockhash.length - step), 16);
let n_index = n_decimal % competitors.length;