Tool
Playlist Shuffler
A shuffle that refuses to stack two tracks by the same artist together.
Playlist Shuffler
0 tracks by 0 artists.
Shuffle a tracklist under one constraint: no two consecutive tracks by the same artist. Paste the list as Artist - Title, one per line.
A genuinely random shuffle groups an artist's tracks together far more often than feels right, which is why no major music app has used one for years. The tool shows you the difference by running a plain shuffle alongside and counting the clashes in each.
When one artist dominates the list, some back-to-back pairs are unavoidable and the tool says so rather than pretending it spread them out.
How the Playlist Shuffler works — and why it's fair
The constrained shuffle is a greedy pass over a uniformly shuffled pool. At each position, the tool takes the set of remaining tracks whose artist differs from the one just placed, and picks uniformly from that set. If no such track exists, it picks from the full remainder and marks the result as not clean.
That greedy approach is not the only way to do it and is the right trade here. A proper constraint solver would find a valid arrangement in some cases where greedy fails, at the cost of being much slower and — more importantly — of being deterministic in a way that makes repeated shuffles of the same list produce similar orderings.
The comparison against a plain shuffle is generated on the same run and counted, because the clustering effect is genuinely hard to believe until you see the numbers. For a twenty-track list with four tracks each by five artists, a uniform shuffle averages about three same-artist adjacencies; the constrained version has zero unless the arithmetic forbids it.
The arithmetic that forbids it is worth stating precisely: separating k tracks by one artist needs k−1 others to sit between them, so it is possible exactly when k ≤ (n+1)/2. Nine tracks by one artist in a fifteen-track list needs eight separators and has six, so at least one adjacency is forced however the rest are arranged. Eight of fifteen is the boundary case and just fits.
This is the same reason your music app's shuffle stopped being random. The change is well documented: a uniform shuffle produced complaints about clustering, so the apps introduced spacing constraints, and the result is a shuffle that is measurably less random and feels considerably more so. That gap between what is random and what feels random is the whole subject.
Tracks without a recognisable Artist - Title separator are treated as their own artist, so a list of bare titles shuffles uniformly with no constraint applied — which is correct, since with no artist information there is nothing to space out.
When the Playlist Shuffler is fair — and when it is not
What it does guarantee
- Every track appears exactly once — the constraint changes the order, never the contents.
- At each position the choice among eligible tracks is uniform, so the constraint does not favour particular tracks.
- When the constraint cannot be satisfied, the result is marked as not clean rather than presented as clean.
What it does not
- It is deliberately less random than a uniform shuffle. Not every ordering is reachable, by design.
- Greedy placement is not a solver. It can fail on a list where a valid arrangement exists.
- It spaces artists only. It knows nothing about tempo, key, mood or era.
Two worked examples
20 tracks, 5 artists, 4 each
- A uniform shuffle averages about 3 same-artist adjacencies across the 19 gaps.
- The constrained shuffle produces 0, and reports the comparison figure alongside.
- Both orderings contain exactly the same 20 tracks.
15 tracks, 8 by one artist
- 8 tracks by one artist among 15 leaves only 7 others to separate them.
- By the pigeonhole principle at least one adjacency is unavoidable.
- The tool produces the best arrangement it found and marks it as not clean.
Ordering that has to feel right
Party and event playlists are the direct case, and the failure mode is specific: three tracks by the same artist in a row reads to a room as a mistake by whoever made the playlist, regardless of how the order was produced.
DJ and radio-style sets use the same constraint as a baseline and then rearrange by hand for energy, which is the honest workflow — the tool handles the mechanical spacing problem and leaves the musical judgement alone.
It is also the clearest available demonstration of the difference between random and random-feeling, which makes it useful for teaching. The side-by-side clash count does in one click what an explanation does badly.
For an unconstrained shuffle of any list, the order randomizer runs a plain Fisher-Yates pass. For a deck of cards specifically, the deck shuffler covers that, and the guide on how playlist shuffle works goes into what the music apps actually changed.
Frequently asked questions
Why does a real random shuffle feel wrong?
Because it clusters. With five artists and four tracks each, a uniform shuffle averages about three same-artist adjacencies, and listeners read those as a fault in the playlist.
Is this shuffle still random?
Less so, deliberately. Orderings with adjacent same-artist tracks are unreachable, which means not every ordering is possible.
When can it not avoid a clash?
When one artist has more than (n+1)/2 of the tracks. Nine of fifteen cannot be separated by any arrangement — that is a counting bound, not a tool limitation.
How do I know if the constraint was satisfied?
The result says so explicitly when it could not be, and the clash count is printed for both the constrained and the plain shuffle.
What format should the list be in?
Artist - Title, one per line, with a space-hyphen-space separator. Lines without it are treated as their own artist and shuffle uniformly.
Does it consider tempo or mood?
No, only artist. Energy sequencing is a musical judgement the tool has no information to make.
Is this how Spotify shuffles?
It is the same family of idea — spacing constraints rather than uniform randomness. The specific algorithms differ and are not published in detail.
Can I space out by album or genre instead?
Not on this page. The key is the artist portion of each line, so relabelling your lines is the available workaround.
Why show the plain-shuffle comparison?
Because the clustering effect is genuinely hard to believe until you see the two numbers side by side.
Related tools
Order Randomizer
Shuffle any list into a fair random order — presentation order, turn order, anything.
Card Deck Shuffler
Shuffle a standard 52-card deck and deal hands — with the 52! number made concrete.
Turn Order Generator
Straight, reversing, or snake order across rounds — first-player advantage, handled.