Contact

Tools  /  JSON  /  Array Shuffler

Array Shuffler

Randomly reorder a JSON array with a real, unbiased Fisher-Yates shuffle -- optionally seeded for reproducible results, with pinned items, range-limited shuffling, random sampling (draw N), and splitting into N random teams/groups.

What this tool does

Paste a JSON array, a comma list, or a newline list, and get it back randomly reordered — or use one of three other modes built on the same shuffle: sampling, range-limiting, and team splitting. Every mode uses a genuine Fisher-Yates shuffle, the standard algorithm for producing an unbiased random permutation.

Why the shuffle algorithm actually matters

A common shortcut, array.sort(() => Math.random() - 0.5), looks like it shuffles correctly but does not: it is statistically biased toward certain orderings, because a sort comparator was never designed to produce a uniform random permutation. Fisher-Yates is the correct approach — each item ends up equally likely in every position. This tool also exposes the naive sort-based method as a labeled comparison option, specifically so the difference is not just a claim but something you can see.

Four ways to shuffle

  • Full shuffle — reorders the whole array, with the option to pin specific positions so those items stay exactly where they are while everything else is randomized.
  • Shuffle a range — randomizes only a slice of the array by position, leaving everything outside that range in its original order.
  • Draw N random items — an unbiased random sample without replacement, for picking a fixed number of items out of a larger list.
  • Split into N groups — divides the array into N teams as evenly as possible, assigned in random order.

Every mode shows a detail view — a position map, a drawn/not- drawn breakdown, or a group assignment — so the result is something you can verify, not just trust.

Reproducible shuffles

Leave the seed blank and every shuffle is different, using real randomness. Type in a seed — any text — and the same seed always produces the same shuffle order for the same input, which matters whenever a randomized result needs to be reproduced later or shared with someone who should see the identical outcome.

Privacy

Parsing and shuffling both happen in your browser. Nothing you paste, drop, or load from a file is sent to a server.

Frequently asked questions

Is my data uploaded anywhere?
No. Parsing and shuffling both run locally in the browser — nothing is sent to a server.
Why does it offer two shuffle algorithms? Is a shuffle not just a shuffle?
The common shortcut of sorting an array with a random comparator looks correct but is statistically biased toward certain orderings. Fisher-Yates is the algorithm that actually produces a uniform random permutation. Both are available specifically so the difference is visible rather than just asserted.
What does a seed do, and why would reproducible randomness be useful?
Leaving the seed blank uses real randomness, so every shuffle differs. Entering a seed makes the same input always shuffle into the same order, which matters for a test that needs to be repeated, a demo that has to look identical twice, or sharing a randomized result with someone who should see the same outcome.
Can some items stay in their original position while the rest are shuffled?
Yes, in Full shuffle mode — list the positions to pin (1-based), and those items stay exactly where they are while everything else is randomized around them.
What is the difference between drawing N items and splitting into groups?
Draw N random items returns a fixed-size random sample from the list, with the rest left out entirely. Split into N groups uses every item, dividing the whole array into N teams as evenly as possible.
Can it shuffle only part of the list and leave the rest alone?
Yes — Shuffle a range randomizes only the positions between a start and end point, leaving everything outside that range in its original order.
Theme Accent