What it does
The random name picker chooses names from a list at random. Paste or type your list with one entry on each line, say how many you want, and the picks appear straight away.
The page opens with a list of six first names and one of them already picked. Edit the list or change How many to pick and a new draw appears at once. The picks are shown in the order they were drawn, and no line is picked twice in one draw.
How to use it
- Type or paste your entries in the box, one on each line.
- Set How many to pick, from 1 up to the number of entries.
- Read the picks under the settings. The line under the count says how many entries they came from.
- Select Copy all for every pick, one per line, or Copy next to a single one.
- Select Regenerate, or press Ctrl+Enter (⌘+Enter on a Mac), for a new draw from the same list.
Blank lines are ignored, and spaces at the start and end of a line are trimmed. A name that appears twice is two entries. The list can hold up to 1,000 entries. The page remembers nothing you type: a reload brings the six sample names back. How many to pick starts at 1 each time too.
How it works
Each pick is drawn from your browser’s cryptographic random number generator, the same source used for encryption keys. The generator reads the browser’s random bytes 4 at a time, as a 32-bit value from 0 to 4,294,967,295. A plain remainder (modulo) would favour some entries, because 4,294,967,296 doesn’t divide evenly by most list sizes. So the generator sets aside the few values at the very top that would cause that: for a list of six, the last 4 values. If one of those comes up it’s skipped and the next one is used. What’s left divides evenly, so every entry has exactly the same chance.
To pick several entries, the generator takes them one at a time from the lines still left, a partial Fisher–Yates shuffle. Each pick is made with the same unbiased step over what’s left, so every possible ordered set of different lines is equally likely.
Good to know
- Picks are by line, not by name. Two lines with the same name are two separate chances.
- Every entry is equally likely, whatever its position in the list or its length.
- A pick doesn’t depend on the last one. A name that won a moment ago is just as likely as any other in the next draw, and a run of similar picks is a normal result.
- A line break, a carriage return or both end a line, so a list pasted from a spreadsheet column or a document works as it is.
- Picking every entry gives the whole list in a random order.
Privacy
The list is read and the picks are drawn in your browser, on your device. Nothing is sent to a server, and neither your list nor the picks are stored. Nothing you type is kept, not even in this browser’s storage.