Random Line Picker

Pick a random line from text.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Put one option on each line and press Pick one. The tool chooses a single line at random and shows it large, with a short history of earlier picks.

How to use

1
Step 1
Replace the sample options with your own, one per line.
2
Step 2
Press Pick one.
3
Step 3
Press again for another pick; recent picks are listed below.

How it works

Blank lines are ignored and each remaining line has the same chance. The index is drawn from crypto.getRandomValues, the browser's cryptographic random source, and a short spin animation plays before the result settles. A line can be picked more than once across presses.

Worked example

Lunch options

Input
Oranges Apples Bananas Cherries Mangoes
Output
One of the five lines, each with a 1 in 5 chance
Walkthrough
Five non-empty lines means every line has a probability of 0.2 on each press.

Limitations

  • Picks with replacement: the same line can come up twice in a row.
  • Duplicated lines get proportionally more chances.
  • Picks one line at a time.

Questions

How do I pick a random line from a list?
Enter one option per line and press Pick one.
Is it truly random?
It uses the browser's cryptographic random number source.
Can the same line be picked twice?
Yes. Every press is independent.

Features

  • Cryptographic random source
  • Pick history
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn Regular Expressions - Crash Course

    freeCodeCamp.org

    Regex powers many find/replace and clean-text workflows.

    Watch on YouTube
  • Regular Expressions in 100 Seconds

    Fireship

    Fast regex refresher for text extraction patterns.

    Watch on YouTube