Shuffle a list

Paste a list and get a shuffled version back. Four methods: full Fisher-Yates random, reverse consecutive pairs, interleave two halves, or shuffle within blocks of three. Every click produces a new random order (for random + block modes); the deterministic modes always give the same output for the same input.

Input
Ready
Output
Live

Four shuffle methods for different needs

Random (default) is a full Fisher-Yates shuffle using `Math.random`. Every possible permutation of the list is reachable with equal probability (modulo the weakness of `Math.random`, which is fine for non-cryptographic uses - raffles, test ordering, playlist mixing). Run the tool twice on the same input and you get two different orders.

Reverse pairs swaps positions 1&2, 3&4, 5&6, and so on - a deterministic rearrangement. Interleave halves splits the list in two and zips them together (`[a1, b1, a2, b2, …]`) - useful when you want to mix a sorted list with another without fully randomising.

Block shuffle (groups of 3) shuffles items within each consecutive three-item window. Good when you want a "small random perturbation" rather than full chaos - the list is roughly still in original order, but adjacent neighbourhoods are mixed up. For cryptographic-grade randomness, use a dedicated RNG tool - `Math.random` is not suitable for security purposes.

How to use shuffle a list

  1. 1Paste your list into the input panel
  2. 2Pick Method: Random (default), Reverse pairs, Interleave halves, or Block shuffle
  3. 3Output updates immediately; click the textarea (or type) to trigger a fresh random pass in Random / Block modes
  4. 4Copy or download the shuffled result

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 this tool actually does

Four method modes, each with a distinct algorithm.

Random mode: full Fisher-Yates shuffle

Classic uniform-random shuffle using `Math.random`. Every permutation reachable with equal probability. Not cryptographically secure - use a dedicated RNG for raffles that involve money or legal accountability.

Reverse pairs: deterministic pair swap

Swaps items (1↔2), (3↔4), (5↔6), etc. If the list has odd length, the last item stays put. Deterministic - same input always gives the same output. Useful for predictable "mix a bit without randomness" rearrangements.

Interleave halves: zip two sorted halves together

Splits the list at its midpoint and zips the two halves like interleaving playing cards. Given `[A B C D E F]`, yields `[A D B E C F]`. Useful for mixing an ordered list with another without losing the ordering entirely.

Block shuffle (groups of 3)

Divides the list into consecutive 3-item windows and Fisher-Yates shuffles within each window. The list stays "roughly" in original order with local scrambling - a softer random than full shuffle.

Runs in your browser

All randomness comes from `Math.random`. Your list never leaves the page - useful for shuffling internal data (employee names, customer segments) you would not paste into a remote service.

Worked example

Random method (default) - output varies on every click. Below is one possible result.

Input
Alice
Bob
Charlie
David
Eve
Frank
Output
David
Alice
Frank
Charlie
Bob
Eve

Settings reference

How each method shapes the output (using six-item input `A B C D E F`).

Setting What it does Effect on the sample
Method: Random (default) Full Fisher-Yates shuffle; every permutation possible Non-deterministic - different order each run
Method: Reverse pairs Swap (1↔2), (3↔4), (5↔6) `B A D C F E`
Method: Interleave halves Split at midpoint, zip the two halves together `A D B E C F`
Method: Block shuffle (3) Fisher-Yates within each 3-item window First 3 scrambled, last 3 scrambled; no cross-window movement

FAQ

Is the shuffle cryptographically secure?
No. `Math.random` is not designed for security. Use this for raffles, playlist ordering, test-data randomisation, teaching - not for anything where prediction or manipulation matters. If you need a cryptographically-secure shuffle, use `crypto.getRandomValues` directly via a dev console or a dedicated RNG service.
Does each click give a different order?
Random and Block shuffle modes give a new order on every run. Reverse pairs and Interleave halves are deterministic - the same input always produces the same output.
What happens with an odd-length list in Reverse pairs?
The last item stays put. With `[A B C]`, you get `[B A C]`. The tool only swaps complete pairs from the start.
Why is the block size fixed at 3?
Three is the smallest window size that produces visible scrambling while keeping items close to their original positions. Two windows would essentially be a long-distance reverse-pairs; four or more is close enough to full random that you might as well use Random mode. If you need a different block size, shuffle the whole list and then re-sort groups of N.
How do I pick one random item instead of shuffling the whole list?
Use the Pick random item tool - pick 1 or more items, optionally with repeats.