Shuffle a standard 52-card deck — optionally with jokers — using a Fisher–Yates shuffle driven by an unbiased integer source, so no ordering is favoured over another. Useful when there is no physical deck to hand.
Settings
Recent results
Generated locally in your browser — your settings and results never leave this page.
What a shuffle has to achieve
A shuffled deck should be equally likely to be in any of its possible orders, with no arrangement favoured and no trace of the order it started in. That is a stronger requirement than “mixed up”, and it is where most physical shuffling falls short.
The number of possible orders for 52 cards is 52 factorial — roughly 8 followed by 67 digits. Written out it dwarfs the number of atoms making up the Earth. The practical consequence is that a properly shuffled deck is almost certainly in an order no deck has ever been in before, which is a genuinely surprising fact about an ordinary object.
Hand shuffling is worse than it looks
A riffle shuffle interleaves two halves, and interleaving preserves a great deal of structure: cards that were adjacent before are frequently still close afterwards. One riffle barely randomises anything.
The well-known result is that around seven riffle shuffles are needed before a deck is close to properly mixed, and the improvement is uneven — the first few shuffles achieve very little, then the deck becomes well mixed quite suddenly. Most casual play involves two or three shuffles, which leaves real, exploitable structure. Anyone who has noticed cards from the last hand clumping together in the next has seen the effect directly.
Fisher–Yates does it in one pass
The correct algorithm is simple. Walk through the deck from the end; for each position, swap it with a randomly chosen position at or before it. Every ordering comes out with exactly equal probability, in a single pass, with no repeated shuffling required.
The important subtlety is the range of the random choice. A common mistake is swapping each card with any position in the whole deck, which feels equivalent and is not — it produces a measurably biased distribution where some arrangements are more likely than others. The correct version restricts the choice to the unshuffled portion, and the difference is not cosmetic.
The other requirement is the random source. A shuffle is only as unpredictable as the numbers driving it, which is why this tool draws from the browser’s cryptographic generator rather than an ordinary one.
Runs are not evidence of a bad shuffle
People expect a shuffled deck to look evenly mixed by suit and rank, and it does not. Three or four cards of one suit together is ordinary. Two pairs falling near each other is ordinary. A short run of consecutive ranks is less common but entirely unremarkable.
An arrangement that looked evenly distributed by every measure would actually be evidence of interference, because genuine randomness produces clusters. This is the same intuition failure that makes people mistrust random music shuffles for repeating artists.
Reproducible shuffles
Seeded mode makes the shuffle deterministic. The same seed returns the same order every time, which is useful for setting up an identical game state twice, for teaching examples where everyone needs the same deck, or for testing card-handling code against a fixed arrangement.
It is unsuitable for anything competitive, since a player who knows the seed knows the whole deck.
Privacy
The shuffle happens in your browser. Nothing is transmitted, stored or logged.
Cutting and other partial operations
Cutting a deck feels like part of shuffling and does almost nothing. It moves a block of cards from one end to the other, preserving the relative order of everything within each block. A cut on its own leaves a fully ordered deck fully ordered, just starting from a different place.
Its real purpose is procedural rather than mathematical: cutting after a shuffle prevents whoever shuffled from knowing exactly where the top card is. That is a safeguard against manipulation, not an improvement in randomness.
A digital shuffle needs no equivalent, because there is no dealer with knowledge of the order and no opportunity to arrange it. The randomisation is complete in one operation.
How to use the Playing Card Shuffler
- Choose whether to include jokers.
- Shuffle — the whole deck is returned in a new random order.
- Copy or export the order, or shuffle again for a fresh one.
Frequently asked questions
How random is the shuffle?
Every one of the possible orderings is equally likely. The tool uses a Fisher–Yates shuffle driven by your browser's cryptographic random source, which is the standard correct algorithm for this and has no bias toward any arrangement.
How does this compare with shuffling by hand?
Favourably. A riffle shuffle is a poor randomiser on its own, and it takes around seven of them to properly mix a deck — most casual shuffling stops well short, leaving substantial structure from the previous order.
How many orderings does a deck have?
Fifty-two factorial, a number with 68 digits. It is large enough that a genuinely shuffled deck has almost certainly never existed in that exact order before, anywhere, which is a striking way to think about what shuffling does.
What is the difference between this and the card drawer?
This returns the whole deck in a new order, which is what you want when you will deal from it. The drawer deals a specific number of cards and tells you what remains.
Does including jokers change anything?
Only the deck size — 54 instead of 52. They are shuffled in with everything else and are equally likely to land anywhere.
Can I reproduce the same shuffle?
Yes, in seeded mode. The same seed always produces the same order, which is useful for setting up a repeatable game state or a teaching example.
Why does the result sometimes look non-random?
Because clusters are normal. Seeing three cards of the same suit together, or a couple of pairs in sequence, happens far more often than intuition suggests. A shuffle that never produced such runs would be the biased one.