Pick a random item from a list

Pick N random items from a list - default 1. Toggle Allow repeats for sampling with replacement (same item can appear multiple times). Without repeats, picks are drawn without replacement (each output item is unique). Uses `Math.random` - fine for raffles and decisions, not cryptographically secure.

Input
Ready
Output
Live

Random sampling with or without replacement

The op uses `Math.random` to pick items from the list. With Pick = 1 (default), one random item is returned. Set Pick > 1 to sample multiple items - the tool uses Fisher-Yates shuffle then takes the first N, so without replacement the same item never appears twice in a run.

Toggle Allow repeats on for sampling WITH replacement - each pick is independent, so the same item can appear multiple times in the output. Useful for simulating dice rolls, stress-testing with repeated samples, or generating test data where duplicates are fine.

Unseeded `Math.random` means each click produces a different sample. Fine for raffles and decision-making but not cryptographically secure. For reproducible sampling, copy the output before re-running.

How to use pick a random item from a list

  1. 1Enter your list in the input panel
  2. 2Adjust the 'Pick' setting to choose how many items to select
  3. 3Toggle 'Allow repeats' if you want duplicates in selections
  4. 4Watch the output panel update with your random item
  5. 5Hit Download to save the result as a plain text file

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What Pick a Random Item lets you do

Explore various scenarios where this tool shines.

Select a single random winner

Use this tool to pick a winner from a list of participants. Enter the names, and one will be selected at random, ensuring fairness in selections.

Randomize task assignments

In team settings, randomly assign tasks to team members. Input tasks, and the tool will choose one randomly, aiding in unbiased task distribution.

Choose a random meal option

Struggling with meal choices? List your options, and let the tool decide for you by picking one randomly, simplifying decision-making.

Select random survey responses

For qualitative analysis, randomly pick survey responses to focus on. This tool helps in selecting responses without bias.

Randomly select test data

Developers can use this tool to pick random entries from test datasets, ensuring diverse test coverage without manual selection.

Worked example

Example of selecting a random fruit from a list.

Input
Apple
Banana
Cherry
Date
Elderberry
Output
Cherry

Settings reference

Understand how each option affects the output with the provided example.

Setting What it does Effect on the sample
Pick: 1 Selects one random item Returns 'Cherry'
Allow repeats: off Ensures no duplicates in selection No change in single-item selection
Allow repeats: on Allows duplicates if picking multiple items No change since only one item is picked

FAQ

How do I select multiple random items?
Adjust the 'Pick' setting to the number of items you want. The tool will select that many items randomly.
Can I prevent duplicate selections?
Yes, turn off 'Allow repeats' to ensure each selected item is unique.
Is my data saved or shared?
No, all operations occur in your browser, ensuring your data remains private and secure.
How does the tool handle empty lines?
Empty lines are ignored in the selection process. Only lines with content are considered.
Can I use this tool for choosing more than one item?
Yes, adjust the 'Pick' setting to select multiple items, and toggle 'Allow repeats' as needed.