Why fairness matters in random selection
When you pick a winner for a raffle, assign presentation slots, choose a Secret Santa recipient, or select a team lead, the selection method must be demonstrably fair. A biased or predictable picker undermines trust — participants will question whether the draw was rigged, whether certain names had higher chances, or whether the organizer influenced the outcome. Using a cryptographically secure random number generator eliminates these concerns.
This tool uses `crypto.getRandomValues` for its randomness, which draws from the operating system's cryptographically secure pseudorandom number generator (CSPRNG). Unlike `Math.random()`, which is seeded and theoretically predictable, `crypto.getRandomValues` produces values that are practically impossible to predict or bias. For any selection task where the outcome matters to the participants, this distinction is critical.
The remove-winners feature adds a practical layer for multi-round drawings. In a classroom setting where you need to call on students one at a time without repeats, or in a raffle where multiple prizes need different winners, removing each picked name from the pool ensures that no one is selected twice in the same session.
Picker features
| Feature | Details |
|---|---|
| Randomness source | `crypto.getRandomValues` (CSPRNG) |
| Input format | One name per line |
| Remove winners | Toggle on/off per session |
| Shuffle animation | Brief visual shuffle before reveal |
| Copy latest pick | One-click copy button |
| List size limit | No hard limit |
How to use the random name picker
Paste your list of names into the text box, with one name per line. Empty lines are ignored.
Toggle the 'Remove winners' switch on if you want each drawn name excluded from future picks in this session. Leave it off if names should remain eligible for re-selection.
Click 'Pick a name' to trigger the shuffle animation and reveal the randomly selected winner.
Use the copy button next to the latest pick to paste the name elsewhere, such as into a chat message or spreadsheet.
Click 'Reset' to restore all removed names back into the pool and start a fresh round of drawings.
The current round number and the most recent pick are displayed above the name list for quick reference.
Testing the fairness of the draw
To verify that the picker is fair, run a large number of draws (100 or more) on a small list of names and tally the results. Each name should be selected approximately the same number of times, with the distribution becoming more even as the number of draws increases. For a list of 10 names and 1000 draws, each name should appear roughly 100 times with a small statistical variance.
You can also test the remove-winners feature by entering a short list, enabling the toggle, and drawing repeatedly. Each name should appear exactly once before all names are exhausted and the pool is empty. If any name appears twice or is skipped, there is a bug in the removal logic.
Common mistakes
Including blank lines in the name list: blank lines are ignored, but trailing whitespace on a line creates a distinct entry like 'John ' instead of 'John'. Trim your list before pasting.
Forgetting to reset between sessions: the remove-winners state persists within the tab but is lost if you refresh. If you need continuity, do not refresh the page during a multi-round draw.
Expecting a seeded random for reproducibility: this tool uses cryptographic randomness, which is not seedable. If you need reproducible draws for testing, you would need a pseudorandom generator with a fixed seed.
Using commas instead of newlines: the tool expects one name per line. If your names are comma-separated, use a text editor to replace commas with newlines before pasting.
Pasting from a spreadsheet with invisible characters: copy-pasting from Excel or Google Sheets can introduce non-breaking spaces or tab characters. Paste into a plain text editor first to clean the data.
Cryptographic vs pseudorandom generation
JavaScript's `Math.random()` uses a pseudorandom number generator (PRNG) that is sufficient for games and visual effects but is not suitable for selections where fairness is important. The internal state of a PRNG can, in theory, be inferred from a sequence of outputs, which means a determined adversary could predict future values. For raffles and contests, this is an unacceptable risk.
The `crypto.getRandomValues` API, by contrast, pulls entropy from the operating system's cryptographic random source — on Linux this is `/dev/urandom`, on macOS it is the SecureRandom framework, and on Windows it is the CryptGenRandom or BCryptGenRandom API. These sources are designed to be unpredictable even against adversaries with significant resources, making them the correct choice for any selection where the integrity of the random draw matters.
Real-world use cases
Running a classroom raffle where each student's name is entered once, and the teacher draws winners for prizes without any student being selected twice.
Assigning presentation order in a team meeting by pasting the team roster and drawing names one at a time with the remove-winners toggle enabled.
Organizing a Secret Santa exchange by drawing names for each participant, with the guarantee that no one draws their own name.
Selecting a random review code or sample from a large list for quality assurance auditing.
Frequently asked questions
Q: Is the name draw fair?
A: Yes. The winner is selected with `crypto.getRandomValues`, giving every name in the pool an exactly equal probability of being chosen.
Q: What does 'Remove winners' do?
A: When enabled, each picked name is excluded from future draws in the same session. This is ideal for raffles, Secret Santa, or assigning turns without repeats.
Q: How many names can I add?
A: There is no hard limit. The tool handles hundreds of names comfortably. For very large lists, paste them in once and draw repeatedly.
Q: Can I copy the latest pick?
A: Yes — a copy button appears next to the most recent pick so you can paste it into a message, document, or spreadsheet.
Q: Are my names stored or uploaded?
A: No. The list lives only in your browser tab. Closing the tab clears everything; nothing is sent over the network.
Q: What happens when all names are removed?
A: The pool becomes empty and no further draws are possible until you click Reset to restore all names.
Q: Is the shuffle animation just for show?
A: Yes — the winner is determined instantly by the random number generator. The brief shuffle animation adds suspense and visual feedback but does not affect the outcome.
Start picking names now
Try the Random Name Picker to draw fair random names from any list. See also Wheel Spinner, Quick Random Number, and Coin Flip for more randomization tools.