Play gin rummy with a friend, or with real people
Press Private room and you get a four-letter code and a link. Send either one to whoever you want to play and they are sitting opposite you — no account, no app, no email address on either side, and nothing to install. If you would rather play a stranger, Find an opponent drops you into the oldest gin rummy room that is waiting; if nobody is waiting it opens one for you and seats the next person who goes looking. Live games count toward a rating; bot games do not, because a browser can lie about its own score and we would rather label that than launder it.
A dropped connection does not end the game. Refresh the page, close the laptop, lose signal in a tunnel — the same link puts you back in your own seat with the hand, the score and the history exactly where you left them. While you are away the house bot covers your turns so your opponent is not sitting in front of a dead table, and it hands the seat straight back the moment you return.
Nothing here is sold, and that is the whole difference
We captured the field before building this. The paid mobile gin rummy apps — Gin Rummy Plus, Gin Rummy Stars, Grand Gin Rummy 2, Gin Rummy Classic — are all built on a coin economy, and the App Store reviews are dominated by three complaints: that the deal is rigged, that there is a video advert between every hand, and that losing your coins locks you out of the tables until you buy more. One reviewer of Gin Rummy Stars sums the last one up in a sentence: "Even after paying for no ads, I cannot play unless I buy credits." The ad-free tier on Gin Rummy Classic is a subscription, around five dollars a month.
So: there are no coins here, no chips, no buy-in, no energy, no daily limit and no
advert between you and the board. There is nothing to buy on this page. Our full notes on
what each rival charges for, with the reviews quoted and dated, are in the repository at
bar/ginrummy/LOG.md.
To be fair to the free web games we are actually judged against — cardgames.io, solitaired.com and playok.com are genuinely free, need no account and have no coins. They are not the ones the reviews above are about, and we would rather say so than let a complaint about a coin economy do work against a site that has none. cardgames.io in particular does compute your melds and your deadwood and prints them in a strip under the table — we checked, mid-game, rather than assuming. What it does not do, and what this page is built around, is show you the arrangement on the cards themselves, tell you what a specific discard would leave you with before you commit to it, or offer any way to check that the deal was not chosen. It also carries banner advertising; this page carries none.
A gin rummy shuffle you can actually check
Every card game online gets the same accusation and gives the same non-answer. Players say the deal turns against them; operators reply that their random number generator is secure. Both can be true at once, which is exactly the problem — a secure generator says nothing about the code that decides when to call it. The complaint is unfalsifiable from your side of the screen, and that is what makes it corrosive. It is worth reading what the developer of one of the biggest gin rummy apps wrote about it: they describe turning a wave of cheating accusations around by replying to the reviews. That is managing a perception, not answering a question.
So this table does not ask you to believe anything. Before a single card is dealt it publishes SHA-256 of a secret seed — the commitment — in the panel beside the board, and you supply a seed of your own. Every shuffle is a pure function of those two values and the hand number, and of nothing else: not the score, not who is winning, not whether you are one hand from the game. When a hand has been scored we hand you that hand's seed. When the game ends we hand you the master seed. You hash it, check it matches the commitment you were shown at the start, and re-derive the exact 52-card order and the exact ten cards you were dealt. Press Check the deals and the page does it in front of you; press Copy the receipt and you get every input, every output and the derivation in twelve lines, so you can redo it in any language you like without our code in the room.
The derivation is deliberately small enough to re-implement: hash master : n to
get the hand's seed, hash handSeed : yourSeed : n : counter for a stream of bytes,
then run an ordinary Fisher–Yates over the numbers 0 to 51 taking each swap index from the next
byte — rejecting the few values at the top of the byte range that would make low cards very
slightly likelier, because 256 is not a multiple of 52 and that skew is precisely the
"predictability somewhere" a suspicious player would be right to look for. A card is
rank × 4 + suit. The deal comes off the top of the array: the non-dealer takes
deck[51], deck[49] … deck[33], the dealer takes
deck[50] … deck[32], the upcard is deck[31], and the stock
is deck[30] downward.
In a live game both seats commit before either one opens. The dealer hashes its master seed before it can see your seed, and you hash yours before you can see the dealer's hash. Neither side can go fishing for a pair that suits them, so neither side picked this deal — that is a fact about the arithmetic, not a promise about us. Even who deals the first hand falls out of the two committed halves rather than out of somebody's coin flip.
And here is what it does not prove, because a hash that reassures without proving anything is worse than no hash at all. Against the bot the whole thing runs in your own tab — there is no server, so this proves the deal was fixed before the first card and matches the seed, and it proves nothing about a machine somewhere else. In a live game one seat derives the deck, which means that browser is holding the seed while the hand is played: the protocol proves nobody chose your cards, not that a modified opponent client could not look at them. Hiding a hand from the computer that dealt it is a different problem — mental poker — and we have not built it. The same protocol on our dice has a SHA-256 self-test against the published FIPS 180-4 vectors; it is the same hash function this page uses, so you can satisfy yourself the hash is really SHA-256 before you trust anything computed with it.
How to play gin rummy
Gin rummy is a two-player game with an ordinary 52-card pack, invented around 1909 and credited to Elwood Baker. It is a race to 100 points, played one hand at a time.
Each player is dealt ten cards. One more goes face up — the upcard — and the rest becomes the stock. On your turn you draw one card, either the top of the stock or the face-up card on the discard pile, and then throw one card away. You always end your turn holding ten.
You are arranging those ten cards into melds. A set is three or four cards of the same rank — 7♠ 7♥ 7♦. A run is three or more consecutive cards in one suit — 4♣ 5♣ 6♣ 7♣. A card can be in one meld or the other, never both. Whatever is left over is your deadwood, and it is worth points against you: an ace is 1, a face card is 10, everything else is its pip value.
When your deadwood adds up to 10 points or less you may knock: discard face down, lay out your melds, and the hand ends. If all ten of your cards meld and your deadwood is zero, that is gin, and it is a different and better thing.
The upcard at the start of the hand — which variant this is
House rules differ here, so we say which one we implemented: the non-dealer has first refusal of the upcard; if they refuse, the dealer may take it; if both refuse, the non-dealer draws from the stock and play proceeds normally. That is the rule given at Pagat and it is the standard tournament sequence. Bicycle's published rules skip the dealer's second refusal entirely, which is why you will find the two-step version on some sites.
Knocking, gin, and the undercut — the three rules everyone gets wrong
Knocking needs 10 or less, and gin is not just a very good knock. Going gin pays a bonus on top of the opponent's entire deadwood, it cannot be undercut however good their hand turns out to be, and — the part that catches people — the opponent may not lay any cards off onto your melds.
The undercut is the rule most implementations get backwards. If the player who did not knock ends up with deadwood equal to or lower than the knocker's, they undercut: the defender scores the difference plus the undercut bonus, and the knocker scores nothing at all. Equal counts. Bicycle's official rules say it plainly — "If there is no difference, the 10 point bonus remains" — and our engine has a named test for exactly that case, because "less than" and "less than or equal" are one character apart and change who wins the hand.
Laying off is not a filter, it is a search. When somebody knocks, the defender may push their own deadwood onto the knocker's melds — a fourth card onto a set, a card at either end of a run. It chains: laying your 9♥ onto their 10♥-J♥-Q♥ opens the slot your 8♥ needs. And it can change which arrangement of your own hand is best, because a card locked inside one of your own melds cannot be laid off at all. Our engine searches both together; a worked example where the arrangement flips is in the test suite.
One reviewer of a major gin rummy app filed a one-star review titled "CHEATS AFTER KNOCKING", complaining that "I have repeatedly seen my opponent add to my melds after I knock in order to get the extra undercut points." That is not cheating — it is the lay-off rule, correctly applied. It is a fair measure of how badly this game is explained by the products people actually play, and it is the reason this page spells the rule out.
When the stock runs low
When a discard leaves exactly two cards in the stock and nobody has knocked, the hand is dead: nobody scores and the same dealer deals again. That changes the endgame, because a player sitting on 11 deadwood late has to decide whether to gamble on one more draw or settle for a hand worth nothing to either side. Pagat records a variant in which the other player may take that final discard to go gin or knock; that variant is not implemented here.
Scoring, in full
| What happened | Who scores | Points |
|---|---|---|
| Knock, and the defender has more deadwood | The knocker | the difference |
| Knock, and the defender has equal or less — an undercut | The defender | difference + bonus |
| Gin — all ten cards meld | The knocker | their whole deadwood + bonus |
| Stock down to two cards, no knock | Nobody | 0, same dealer re-deals |
| Each hand won — the box or line bonus, added at the end | Whoever won it | 25 |
| Winning the game | The winner | 100 |
| Shutout — the loser never scored at all | The winner | total doubled |
The bonuses are the one thing the published rules genuinely disagree about, so this page lets you pick rather than pretending there is one right answer. Pagat and Bicycle/USPC both give gin 20, undercut 10. Hoyle-derived rules and the North American convention used by the AAAI gin rummy research contest give 25 and 25. Pagat also records a middle version at 25 and 20. All three are in the scoring picker on the start screen; the default is 25/25.
Boxes are why you can lose the race and win the game. The player who crosses 100 first stops the game, but 25 points per hand won is then added to both sides — so somebody who won seven small hands can finish ahead of somebody who won three big ones. It is also what makes the shutout so expensive.
The arithmetic underneath, and where it is checked
The hard part of gin rummy is not the rules. It is a single optimisation asked ten times a minute: what is the smallest deadwood these ten cards can be arranged into? A card can serve a set or a run and not both, which makes the obvious answers wrong. Hold 7♠ 8♠ 9♠ together with 7♥ 7♦ 7♣ and the four-of-a-kind of sevens looks like the biggest meld on the table — take it and you have destroyed a run worth 24. The right answer melds 45 points, not 28. A greedy biggest-meld-first solver gets that hand wrong, and gets about one random hand in 400 wrong, sometimes by 30 deadwood points.
So this engine ships two independently written solvers and the test suite makes them agree. One works on four 13-bit rank masks with a precomputed run table; the other materialises every legal meld in the hand and walks every valid subset of disjoint melds. They share no code path. The suite requires them to agree on every one of the 1,961,256 ten-card hands that can be dealt from a 24-card A-to-6 deck, on every one of the 184,756 from a 20-card 9-to-K deck, on a curated set of adversarial hands, and on hundreds of thousands of random full-deck hands.
Two independent implementations agreeing is the anchor here because there is no published table to check against. We looked: OEIS has no sequence for rummy melds or deadwood, the AAAI/EAAI gin rummy research papers publish agent win rates rather than deal-time combinatorics, and Pagat, Bicycle and Hoyle are rule books.
Two numbers we can check, and one famous mistake
There are 15,820,024,220 distinct ten-card gin rummy hands. Not 15,820,024 — that figure is short by a factor of exactly one thousand, it was printed in John Scarne's Encyclopedia of Card Games in 1983, and it is still repeated. Our suite computes the binomial coefficient in exact integer arithmetic and asserts the full number, because "we walked every hand" and "we walked every thousandth hand" are not the same claim.
And exactly 136,694 of those hands are gin on the deal — about one deal in 115,733. That figure has been published twice, by two amateur enumerations, and they disagree: 51,200 in one, 136,694 in the other. Our engine computes it a third way, constructively — every fully-melded ten-card hand can be refined into melds of size 3, 4 or 5, so the only shapes are {5,5} and {4,3,3} — reproduces 136,694 including the intermediate sub-total of 526 for the two-runs-of-five shape, and therefore says which of the two published counts is wrong. The constructive argument is itself checked, on decks small enough to brute-force every single hand, against a solver that has never heard of it.
The honest ceiling. Walking all 15,820,024,220 hands is not something this suite does. The solver runs at several million hands a second here, so the full walk is roughly half an hour of pure computation — far more than a check that runs before every build can spend, and the suite prints the measured rate and the projection rather than implying the walk happened. The exact deadwood distributions we publish are over the two reduced decks; the distribution over the real 52-card pack is a large random sample with its sampling error stated. As far as we can tell nobody has published either, so those tables are ours and are labelled as computed rather than as verified.
Strategy, briefly
The knock is the decision, and patience wins
Knocking as soon as you legally can is the instinct, and it is measurably wrong. We ran it: a bot that knocks at 10 or less as soon as it may loses to an otherwise identical bot that waits for a knock of 3 or less about 58% of the time, and to one that holds out for gin about 66%. The reason is in the scoring — knocking with ten wins a handful of points and exposes you to an undercut worth 25 plus the difference, while gin is worth 25 plus their entire hand. Knock small, or knock late when the stock is running out.
The discard pile is the whole information channel
Everything you take off the pile, your opponent sees, and everything you throw tells them what you are not collecting. That is the only information either of you has. Watch what they pick up: a card of the same rank, or one or two either side of it in the same suit, is the last thing you want to hand them. Our Hard bot does exactly this and nothing more sophisticated, and it is worth about six points of win rate — if the weight is small. We measured that too, holding everything else fixed: a small penalty took the bot from 62% to 68% against Medium, and doubling it dropped it to 60%. In a separate sweep with no knock rule at all, weights of 0.5, 1.5 and 3.0 scored 53%, 40% and 29%. Avoiding a dangerous card costs you real deadwood, so the moment the model is allowed to overrule the count, it loses.
Throw high early
A king in your hand at the end is ten points; a king in your hand at the start is ten points and a card you probably will not use. Deadwood you are still holding when someone else knocks is what loses hands, so get rid of the expensive orphans while the stock is deep and there is still time to draw replacements.
What this table does and does not do
It plays standard two-handed gin rummy to 100. Oklahoma gin (where the upcard sets the knock limit), Hollywood scoring, three-handed gin and partnership gin are not implemented, and the page says so rather than letting you find out.
When several arrangements tie for minimum deadwood, the knocker lays down the canonical one. A human knocker could in principle pick a tied arrangement that gives the defender fewer places to lay off; this engine does not, and does not pretend to. It is a real shortfall and it is small — it can only matter when two arrangements score identically.
And a phone is tight, measured rather than glossed. Mid-turn you hold eleven cards and they all have to be on screen at once, which at 390px is a 27-pixel card — well under the ~44px a fingertip wants. There is no layout that fixes that; eleven cards is eleven cards. What we do instead: the tappable area of each card claims the gaps either side and reaches above and below it, and a tap only picks a card up — nothing is thrown until you press the button that names it. So a mis-tap costs you one more tap and can never cost you the wrong discard.
What each bot level actually does
None of them search ahead. Gin rummy asks a player for three decisions — where to draw from, what to throw, and when to knock — and that is all each level decides. Every win rate below was measured over hundreds of games with the seats swapped, so a seat advantage cannot be read as strength.
Easy throws one of its loose cards at random and knocks the moment it legally can. It never asks which loose card costs least, which is exactly the mistake a person who has just learned the rules makes. Medium beats it 97% of the time.
Medium re-solves its whole hand for every possible discard and throws whichever card leaves the least deadwood behind. No memory, no patience.
Hard does that, and adds two things that were measured into place rather than assumed: it tracks every card you take off the discard pile and penalises throwing anything near it, and it waits for a good knock instead of taking the first legal one. It beats Medium 65% of the time.
The honest limit on that number. 65% means Hard beats our Medium. It is not a claim that Hard is a strong gin rummy player, and the tuning turned up a warning worth repeating: the opponent-model penalty gains about six points against Medium and loses twelve against a patient opponent that does not use one. A policy tuned against a single opponent is not evidence of general strength. There is a real research literature on gin rummy agents (the AAAI/EAAI Gin Rummy Undergraduate Research Challenge) and we have not played against any of it.
Questions people ask
How do you play gin rummy?
Ten cards each. Draw one card — the top of the stock or the face-up discard — then throw one away. Build sets of three or four of a rank, and runs of three or more in a suit. Whatever does not meld is your deadwood. Knock when your deadwood is 10 or less, or go gin when it is zero. First to 100 points wins.
What does knocking mean?
Ending the hand with 10 or less deadwood. You discard face down, lay out your melds, and the other player lays out theirs and lays off what they can onto yours. Whoever has less deadwood scores the difference.
What is an undercut?
When the defender's deadwood turns out to be equal to or lower than the knocker's. The defender scores the difference plus the undercut bonus and the knocker scores nothing. Equal counts as an undercut — that is the half most implementations get backwards.
What is the difference between gin and knocking?
Gin is zero deadwood. It pays a bonus on top of the opponent's whole hand, it cannot be undercut, and no laying off is allowed against it. A knock of 1 to 10 can be undercut and does allow laying off.
What does laying off mean?
Adding your own deadwood to the knocker's melds — a fourth card to a set, a card at either end of a run. It chains, and it is not allowed when the knocker goes gin.
How many gin rummy hands are there?
15,820,024,220 ten-card hands. Exactly 136,694 of them are gin on the deal, about one in 115,733. Our test suite computes both.
What happens when the stock runs out?
When a discard leaves two cards in the stock and nobody has knocked, the hand is dead. Nobody scores and the same dealer deals again.
Can I play gin rummy online with a friend?
Yes — Private room gives you a four-letter code and a link, and whoever you send it to is at the table. No account, no app, no email on either side. Find an opponent pairs you with a stranger instead.
Is the deal rigged?
Not here, and you can check rather than believe. The hash of a secret seed is published before the deal, you add a seed of your own, the seed is handed over afterwards, and the exact shuffle re-derives from it. In a live game both seats commit before either reveals, so neither side can pick the deal. What it does not prove is set out in full above.
Is this gin rummy free?
Yes. Three bot levels, live play against people, every hand, no account, no coins, no chips, no buy-in, no daily limit, no adverts between you and the board. Nothing here is locked and nothing is sold.