Random Name Picker Widget

Put a fair name picker on your classroom, giveaway or team page. Paste the names one per line, press Pick, and a name is drawn with the browser's cryptographic random generator; optionally take each picked name off the list so nobody is chosen twice.

Education & Math Generator Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/random-name-picker" title="Random Name Picker by A2Z Tools" width="100%" height="480" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

The draw uses crypto.getRandomValues, the browser's secure source, and rejection sampling: a random 32-bit number is accepted only when it falls below the largest multiple of the list length, then reduced to an index. That removes the slight favouritism that simple remainder arithmetic gives the first names in a list, so with 30 pupils each has exactly a 1-in-30 chance. The pick is made the moment the button is pressed; the short flicker of names that follows is decoration only and is skipped entirely for visitors whose system asks for reduced motion. With 'remove each picked name' on, the chosen line is deleted from the box and can be restored with one button, which suits taking turns. The last 50 picks are listed newest first. Blank lines and extra spaces are ignored, and up to 1,000 names of 80 characters each are read.

Method

  • Index = r mod n, where r is a 32-bit value from crypto.getRandomValues
  • r is rejected and redrawn when r >= 2^32 - (2^32 mod n), so every name has probability exactly 1/n

Worked examples

Taking turns in a class of 30

Inputs: 30 names, remove each picked name on, 5 picks

Result: 25 names left in the box; history lists the 5 picked, newest first

Each pick is uniform over the names still listed: 1 in 30, then 1 in 29, and so on.

Why rejection sampling matters

Inputs: 3 names

Result: Random words of 4,294,967,295 are redrawn; every name has probability exactly 1/3

2^32 = 4,294,967,296 leaves remainder 1 when divided by 3, so the single top value would otherwise favour the first name.

Limitations

  • No weighting: every line has the same chance, so a name typed twice is twice as likely.
  • History and removed names are lost when the page is reloaded.
  • Not an auditable draw: for regulated prize draws, record the process with an independent witness.

Where publishers use it

  • Teachers choosing who answers next during a lesson projected on a smartboard
  • Social-media giveaway pages that announce a winner live
  • Team stand-up pages that pick who speaks first
  • Quiz nights and club meetings drawing a volunteer
  • Classroom-management blogs demonstrating cold calling

Questions

Is the picker really fair?

Yes. Each draw uses the browser's cryptographic generator and discards the few values that would favour early names, so with 12 names every name has exactly a 1-in-12 chance on every draw. Previous draws do not influence the next.

How do I stop the same student being picked twice?

Tick 'Remove each picked name from the list'. Each winner is removed from the box; 'Put picked names back' restores them all when the round is finished.

Can the same name be picked twice in a row?

Yes, if removal is off. With 25 names, the chance that the next pick repeats the last one is 1 in 25, as it should be for independent draws.

Can I preload my class list for students?

Yes, put the names in the embed URL separated by | : v_names=Asha|Ben|Chen. Add v_remove=1 to switch removal on by default.

Is the spinning animation part of the draw?

No. The winner is fixed the instant you press the button; the 0.9-second flicker is only visual and does not run at all when reduced motion is requested.

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools Random Name Picker
https://a2z.tools/embed/random-name-picker
  • Random Group Generator

    Education & Math Generator New

    Split a class list into a chosen number of groups, or groups of a set size, balanced and shuffled fairly.

    Get code
  • Random Number Generator

    QR & Generators Generator

    Fair random numbers in any range - whole or decimal, with or without repeats, sorted if you like.

    Get code
  • Pomodoro Timer

    Education & Math Clock & time New

    A 25/5 focus timer with long breaks, cycle counter and pause, skip and reset - every length editable.

    Get code
  • Percentage Calculator

    Education & Math Calculator

    X% of Y, X as a percent of Y, and the percentage change between two values.

    Get code
  • Basic Calculator

    Education & Math Calculator

    A clean on-screen calculator with keyboard support, correct operator precedence and percent.

    Get code
  • Scientific Calculator

    Education & Math Calculator

    Trig in degrees or radians, logs, roots, powers, factorials, pi, e and Ans - typed or tapped.

    Get code

Preview