Random Name Picker
Paste a list of names, choose how many to pick, hit Pick. Useful for classroom call-outs, raffle draws, fair team allocations, or settling a decision when nobody can agree. The picks are unbiased: every name on the list has exactly the same chance, drawn from the browser's cryptographic random source.
Explain like I'm 5 (what even is this calculator?)
Imagine writing every name on a slip of paper, putting them in a hat, and pulling some out. This page does that, except the hat is your browser, and the random pick is provably fair. Nothing you paste in gets sent anywhere.
Pick a name
Browser-only. Your list of names never leaves the device. Picks use the Web Crypto API for an unbiased draw.
Add some names and hit Pick.
Prove it
Picks use crypto.getRandomValues, the cryptographically strong random source built into every modern browser. It is the same primitive used to generate session keys and CSRF tokens. There is no Math.random in this page.
The naive rand % n reduction introduces bias: if 2^32 is not a multiple of n, the lower remainders show up slightly more often. We avoid that with rejection sampling: any draw above the largest multiple of n that fits in 2^32 is discarded and re-drawn. The expected number of redraws per pick is at most 1, even in the worst case.
For picks without duplicates we use a partial Fisher-Yates shuffle on a working copy of your list, swapping one position at a time and reading off the first k entries. That is the textbook unbiased algorithm for sampling without replacement.
// Unbiased integer in [0, n)
function randomInt(n) {
const max = 0xFFFFFFFF;
const limit = max - ((max + 1) % n);
const buf = new Uint32Array(1);
while (true) {
crypto.getRandomValues(buf);
if (buf[0] <= limit) return buf[0] % n;
}
}
// Sample k names without replacement (partial Fisher-Yates)
const pool = names.slice();
const picked = [];
for (let i = 0; i < k; i++) {
const j = i + randomInt(pool.length - i);
[pool[i], pool[j]] = [pool[j], pool[i]];
picked.push(pool[i]);
}
Nothing leaves the device. The page makes no network requests after it has loaded, so your names cannot be exfiltrated. Disconnect your network and the picker still works.
Useful? Save this calculator: press Ctrl + D to bookmark it.
When a fair pick actually matters
The classroom is the obvious case. Calling on the same students every lesson is a habit teachers fall into without noticing, and the quiet ones drift further into the background each week. A genuinely random pick from the register breaks the pattern: the next voice you hear is whoever the browser draws, not whoever caught your eye. The same trick works for hand-up votes, allocating who reads first, and stopping the loudest child from running every group activity.
Sports clubs and youth groups face the same problem with team assignment. If the captain picks, the strong friendship groups stick together and the new kid ends up last. A random allocation, drawn in front of everyone with a tool nobody can fiddle, removes the social politics. Paste the squad in, set the pick count to half the list, draw team A, the rest are team B. Two clicks, no arguments.
Raffles and prize draws are where the bias question stops being academic. If your "random" number generator favours the start of the list, the people who signed up first are quietly more likely to win. A serious draw needs a draw process that you can explain and that holds up if anyone audits it. The Web Crypto API plus rejection sampling is that process. The Prove it panel above is there so you can show the working to a sceptical organiser.
Decision-making is the most underrated use. When two reasonable choices are too close to call, the time spent agonising is worth more than the difference between them. Toss the options into the textarea, pick one, get on with the day. The name is "Random Name Picker" but the names can be holiday destinations, restaurants, project ideas, or anything else where the deliberation has stopped paying off.
Common mistakes to avoid
Pasting a list with stray blank lines or trailing spaces is the most frequent. Most spreadsheets export with a trailing newline, and a copy-paste from a Word document drags inconsistent indentation along with it. The page strips leading and trailing whitespace on every line and drops empty lines, but if your names happen to include their own internal whitespace, that is preserved. "Alice Smith" with two spaces in the middle is treated as a different name from "Alice Smith" with one. If your list looks longer than it should be, look for that.
Forgetting that exact duplicate lines are removed before the draw is the second. If you paste in a list where two people happen to share the same name, only one entry survives. That is usually what you want for a raffle (one ticket per person), but if you genuinely have two distinct people called "John", differentiate them in the textarea: "John (red team)" and "John (blue team)" will both survive deduplication. The page tells you how many duplicates it dropped, so you can spot this before drawing.
Asking for more picks than the list has, with duplicates disabled, is the third. The page checks for this and refuses to draw, with a message that names the actual list size. The fix is one of: add more names, reduce the pick count, or tick "Allow duplicates" if independent draws is what you actually want.
Edge cases this page handles
- Single name, pick 1. Returns the one name. Not interesting, but defined.
- Empty list. The Pick button shows a clear validation message.
- Whitespace-only lines. Stripped before counting and drawing.
- Duplicates inside the list. Removed, with a count of how many were dropped.
- Pick count larger than the list, no duplicates. Validation blocks the draw.
- Pick count larger than the list, duplicates on. Works as expected: independent draws.
Related calculators
Picking a name is one random job. These cover the rest of the toolkit.
Frequently asked questions
Is the pick actually random?
Yes. Picks come from crypto.getRandomValues, the browser's cryptographically strong random source, the same one used to generate session keys. We use rejection sampling to remove the bias that a naive rand % n introduces, so every name on your list has exactly the same chance of being picked. There is no Math.random and no seeded pseudo-random anywhere in the page.
Does my list of names get sent anywhere?
No. Everything happens in your browser. The textarea you paste into never leaves the device. You can disconnect from the network, paste a list in, hit Pick, and it still works. Open your browser's network tab while you use the page if you want to verify it.
What is the difference between allowing duplicates and not?
Without duplicates is sampling without replacement: each name can be picked at most once, like drawing names out of a hat without putting them back. With duplicates is sampling with replacement: each pick is independent, so the same name can come up more than once. Use without duplicates for raffles, fair team draws and classroom name calling. Use with duplicates only when independent draws is genuinely what you want.
How big a list can it handle?
Tens of thousands of names is fine. The page parses, deduplicates and shuffles in memory; performance is not a problem long before the textarea itself becomes awkward to scroll through.
Why are exact duplicates removed before picking?
If a name appears twice in your list, that name would have twice the chance of being picked. For most uses that is not what people want, so exact duplicate lines are removed before the draw and the page tells you how many were dropped.