Cryptographically Fair (Web Crypto API)

Random Number Generator, Name Picker & Dice Roller

Generate unbiased random integers using window.crypto.getRandomValues(), pick fair raffle winners from a list of names, or flip coins and roll tabletop dice instantly.

Tool Documentation & Guide

Running Fair Cryptographic Draws, Raffle Pickers & Tabletop Rolls

Whether selecting giveaway winners, assigning fair classroom presentation order, generating unbiased statistical samples, or rolling tabletop RPG dice, using browser cryptographic randomness (window.crypto.getRandomValues) with rejection sampling eliminates modulo bias.

Step-by-Step Instructions

  1. Switch between Random Numbers, Name/Winner Picker, or Coin & Dice Roller modes.
  2. In Random Numbers, set Min, Max, Quantity, and toggle No Duplicates for unique lottery or sample draws.
  3. In Name Picker, paste one name per line and optionally enable Remove Winner After Picking for multi-prize raffles.
  4. Use Coin Flip or Tabletop Dice (d4โ€“d100) for instant fair rolls with automatic sum totals.

Worked Example & Methodology

Drawing 5 unique winners from IDs 1 to 500 uses rejection sampling over 32-bit Web Crypto integers so every single number from 1 to 500 holds an exact 1-in-500 (0.200%) probability.

Privacy & Verification: All participant lists and draws execute 100% locally in your browserโ€”contestant names are never uploaded or saved.

Frequently Asked Questions

What is modulo bias and how does this tool prevent it?

Simply taking randomUint32 % range slightly favors lower numbers when 2^32 is not evenly divisible by range. Rejection sampling discards top remainder values for mathematically uniform odds.

Can I pick multiple winners without picking the same person twice?

Yes! Check "Remove winner from list after picking" in Name Picker mode or "No duplicates" in Random Numbers mode.

Does refreshing the page reset coin flip and winner history?

Yesโ€”state lives strictly in browser session memory with zero server tracking.

Are d20 and d100 tabletop dice rolls truly uniform?

Yes. Every die is rolled independently via unbiased Web Crypto integers from 1 to N.