Logo

MonoCalc

/

Random Line Picker

Text
One candidate per line — names, entries, ideas.Enter at least one line to pick from.
0 lines0 in pool0 blank0 duplicates0 BDrawn in your browser
How many lines to draw.
Each line can be drawn at most once — correct raffle behaviour.
Random groups to deal the list into.

Enter draws · Space re-draws · Esc resets

How candidates are detected.
Up to 10 characters.
How the winners are listed.
One entry per line — staff, previous winners.
Decimal places shown for probabilities.

Trim whitespace

Ignore blank lines

Remove duplicates

Case-insensitive matching

Number the results

Animate the draw

Weighted mode

Pin random seed

One character, e.g. a comma or a tab.
Which side the number is on.
A whole number makes the draw reproducible.
seed 00x0

No draw yet

Paste a list and press Pick

About This Tool

Random Line Picker – Draw a Fair Winner From Any List

Every giveaway, standup rota and team split eventually comes down to the same request: here is a list, choose one at random, and let nobody argue with the result. A random line picker answers it directly. Paste a block of text with one candidate per line — entrants, employee names, question numbers, log rows, dinner ideas — and one or more lines come back drawn uniformly at random. Nothing is uploaded; the list, the draw and the result stay in your browser, which matters when the lines are email addresses or unreleased data.

Why the source of randomness matters

The usual one-liner for picking an index is Math.floor(Math.random() * n), and it has two problems. The first is that Math.random is a fast statistical generator, not a cryptographic one — perfectly fine for a dinner suggestion, unsuitable for a prize draw people care about. The second is subtler: reducing a 32-bit random word with % n introduces modulo bias. Unless n divides 232 exactly, the first few indices are reachable from one more word than the rest and are drawn very slightly more often. This tool takes its randomness from crypto.getRandomValues, drawn through a rejection-sampling step that discards the ragged tail above floor(2^32 / n) * n so no index is favoured, and it never reduces a random word modulo the list length anywhere in the pipeline.

With replacement or without

These are two different experiments and picking the wrong one is the most common mistake in list draws. Without replacement, a line that has been drawn leaves the hat, so three picks produce three distinct names — the correct behaviour for a raffle with a first, second and third prize. The tool implements it with a partial Fisher–Yates shuffle, which touches only the positions it needs and so stays fast on a list of a hundred thousand entries. With replacement, every draw is independent and the same line may come up repeatedly, which is what models dice rolls, random prompt selection, or bootstrap resampling; a frequency table accompanies the result so repeats are easy to read.

Seeds make a random draw auditable

Randomness and accountability sound opposed, but a seeded drawdelivers both. Pin any whole number as the seed and the same list always produces the same winners, so a giveaway can be announced in advance, run in public, and re-checked afterwards by anyone who has the entry list. Leave the seed unpinned and a fresh one is drawn from the browser's cryptographic source and reported back to you, so even a spur-of-the-moment draw can be reproduced later. The downloadable draw record bundles the seed, the pool size, the method and a fingerprint of the entry list so an observer can confirm the list was not edited after the winner was known.

Clean the list before you trust the odds
Duplicate lines quietly double someone's chances. If the same name appears twice in a hundred-line list its probability is 2 in 100, not 1 in 100. Switch on remove duplicates when every unique entrant should have equal odds, and leave it off when repeated lines are meant to represent extra entries.

Weighted picking, shuffling and random groups

Not every draw is uniform. Turn on weighted mode and add a number to each line after a delimiter — Gold Prize,1 against Consolation,89— and each line's chance becomes its weight divided by the total weight, resolved with a cumulative-sum binary search. Shuffle mode returns the whole list in a uniformly random order for a playlist, a question bank or a running order. Group mode shuffles and then deals round-robin into K teams, which keeps sizes balanced: eleven names across three groups become 4, 4 and 3 rather than 5, 5 and 1.

Reading the odds

The statistics panel reports the same probability in every form people actually reason with — the fraction 1/12, the decimal 0.0833, the percentage 8.333% and the plain odds 1 in 12 — alongside the raw line count, the number of blanks skipped, duplicates collapsed and entries excluded. It also shows the chance any given line appears at least once across the whole draw, which is k/n without replacement and 1 − ((n−1)/n)^k with it. Winners carry their original line number so a name can always be traced back to the row it came from.

Frequently Asked Questions

Is the Random Line Picker free?

Yes, Random Line Picker is totally free :)

Can I use the Random Line Picker offline?

Yes, you can install the webapp as PWA.

Is it safe to use Random Line Picker?

Yes, any data related to Random Line Picker only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the Random Line Picker work?

Paste a list, one entry per line, and the tool splits it into candidates, applies the cleanup you selected (trim whitespace, skip blank lines, remove duplicates, apply your exclude list), and then draws from what is left. Every candidate has exactly the same chance of being drawn unless you switch on weighted mode. The whole draw runs in your browser, so a list of entrants, employees or email addresses is never uploaded anywhere.

What is the difference between picking with and without replacement?

Without replacement, a line that has already been drawn is taken out of the hat, so picking three winners gives you three different names — the correct behaviour for a raffle with three prizes. With replacement, every draw is independent and the same line can come up more than once, which is what you want for dice rolls, random prompts, or bootstrap sampling. The tool shows a frequency breakdown whenever repeats are allowed.

Is the randomness actually fair?

The randomness starts at crypto.getRandomValues, your browser's cryptographic generator, drawn through rejection sampling so no entry is favoured by modulo bias. That value seeds a deterministic stream which the draw then runs on, which is what makes the result reproducible from the seed alone; selections without replacement use a partial Fisher-Yates shuffle and are uniform over every possible set of winners. It is more than fair enough for a giveaway, but it is not a certified draw system for a regulated lottery.

How do I run a giveaway that other people can verify?

Turn on the random seed and enter any whole number, or publish the seed the tool reports after an unseeded draw. Anyone with the same entry list and the same seed will reproduce exactly the same winners. The draw record download bundles the seed, the pool size, the method, a fingerprint of the entry list, and a timestamp so you can publish the whole thing as evidence.

How does weighted picking work?

Switch on weighted mode and add a number to each line, separated by the delimiter you choose — for example Gold Prize,1 and Consolation,89. Each line's chance of being drawn is its weight divided by the total weight, so in that example Consolation is picked 89% of the time. Weights must be finite and non-negative, and at least one line must carry a weight above zero.

Can it split a list into random teams?

Yes. Switch to group mode and set how many groups you want. The list is shuffled with Fisher-Yates and then dealt out round-robin, which keeps group sizes within one of each other — eleven names across three groups become 4, 4 and 3 rather than 5, 5 and 1. Each group can be copied on its own.