FreeCell
Public domain classic
All 52 cards face up, four free cells, and numbered deals you can replay.
At a glance
- Rules
- FreeCell with one 52-card deck dealt face up into 8 columns, plus 4 free cells and 4 foundations
- Players
- Solo
- Deals
- Each deal has a number from 1 to 1,000,000. The deal box starts with a random number, and typing a number you have used before brings back the same layout
- Controls
- Drag a card or a run onto a column, or tap it and then a glowing spot. A double tap on a top card puts it on its foundation. Ctrl or Cmd and Z takes back a move, Esc opens the menu
- Help
- Undo with no limit, and a hint that points to one legal move
- Auto-move
- Safe cards go up to the foundations by themselves. Pick Manual in the deal box, or turn it off from the menu during play
- Saves
- Wins, deals, best score, best time and total moves, in this browser only
- Cost
- Free, no account
How this FreeCell plays
- All 52 cards start face up. The first four columns hold 7 cards each and the last four hold 6.
- Build the columns down in alternating colours, red on black or black on red.
- Each free cell holds a single card. An empty column takes any card, or any ordered run the game lets you carry.
- Build the foundations up by suit from ace to king. A card on a foundation stays there: this version does not let you take one back down.
- Score: 10 points for every card that reaches a foundation, so a finished deal ends on 520.
- The deal is won when all 52 cards are up. It is only called stuck when no legal move of any kind is left. Shuffling a card between free cells counts as a move, so if you are going round in circles, end the deal from the menu.
How many cards can move at once
A long run moving in one go is a shortcut for a string of single-card moves through the spare free cells and empty columns. The game works out the limit for you: (empty free cells + 1) multiplied by 2 for every empty column. The column you are moving into does not count as empty for this sum.
- Two empty free cells and no empty column: 3 cards.
- No empty free cell and one empty column: 2 cards.
- Two empty free cells and one empty column: 6 cards.
- The same run going into that empty column: 3 cards, because the target column drops out of the sum.
This is why an empty column is worth more than a free cell. A free cell adds one to the first number, while an empty column doubles the whole total.
When the game moves cards for you
With auto-move on, the game looks about every 0.4 seconds, while you have nothing selected, for a card it can put up safely. Aces and twos always count as safe. A higher card goes up by itself only when both suits of the other colour have reached at least one rank below it, and the other suit of its own colour has reached at least two below it. For example, the 5 of hearts goes up on its own once spades and clubs are both up to the 4 and diamonds are up to the 3.
Choose Manual if you would rather place every card yourself. A double tap still sends a top card straight to its foundation.
Planning with the numbers
- Count before you lift a run. Each free cell you fill shrinks the limit, so check the sum before you park a card.
- Empty a column when you can. It doubles the size of run you can carry.
- Find the aces first. Nothing reaches a foundation until its ace is up, and since every card is visible from the start, you can see how deep each ace is buried before you make a move.
- Test a line with undo. Undo has no limit, and the hint ranks moves to the foundations above everything else.
FreeCell shares its game file with Klondike and Spider Solitaire, so the controls, undo and saved stats work the same way in all three.
Known limits
- No keyboard play for moving cards: you need a mouse or touch.
- At phone size (390 by 844) the game frame is 352 pixels wide and each card about 39 pixels wide, so taps need some care.
- Deal numbers come from this game's own shuffle. They do not match the deal numbers of other FreeCell programs.
- A stuck deal is only spotted when no move at all remains, so a hopeless deal may need ending from the menu.
- Play Again after a win opens the deal box first. Deal cards then starts the new table.
- If storage is blocked, the game still runs but your wins and times are lost when you leave.
- Switching tabs pauses the game and opens the menu.
How it was built and checked
- AI tool
- Codex
- First committed
- 2026-10-15, with Klondike and Spider in a batch of nine card games
- Size
- One HTML file of 170 lines, the same file as Klondike and Spider with the mode set to FreeCell, no game libraries
- Rounds of changes
- 1, from the build record
- Checked at build
- The build report: 833,738 rule checks over 300 numbered deals, 11,721 random legal moves with 1,197 undo checks, the move limit tested at its edges, and one complete 52-card winning route scoring 520. It lists browser appearance, touch feel, layout at every screen size and animation as not verified
- Checked since
- 2026-11-11: the same rule test passes again (833,738 checks), and an automated browser check of the local build at desktop size (1280 by 720) and phone size (390 by 844). It dealt deal 4242 with auto-move set to Manual, moved a card by tapping it and then its new column, undid that move, asked for a hint, set up a table with 51 cards on the foundations, won by tapping the last king and then its foundation, and dealt again
- Played on a phone
- 2026-11-11, a full game on a real phone before this page went live
Embed FreeCell on your site
Free to embed. Please keep the credit link.
<div style="position:relative;padding-top:75%;max-width:640px"><iframe src="https://aivibecodedgames.com/games/freecell/" title="FreeCell (free browser game)" style="position:absolute;inset:0;width:100%;height:100%;border:0" loading="lazy" allow="fullscreen" allowfullscreen></iframe></div> <p><a href="https://aivibecodedgames.com/play/freecell/">Play FreeCell free</a> on AI Vibe Coded Games</p>
How it was vibe coded
The opening prompt
Make FreeCell with a standard deck. Eight tableau columns (four with 7 cards, four with 6), four free cells, four foundations. Build the tableau down in alternating colours. Let the player move a sequence of cards at once when there are enough free cells and empty columns, and calculate that limit correctly. Deals are numbered from 1 to 1,000,000 using a seeded shuffle of our own design so any deal number can be replayed, plus a random new deal button. Include auto-move to foundations when safe (toggle), unlimited undo, a hint button, a move counter and timer, and a win animation. Support drag and drop and tap to select. Save wins and best time.
Game controls
- Drag a card, or tap it and then tap where it goes
- Double-tap a card to send it to its pile
- Pick a numbered deal to replay it
The game brief includes touch controls for phones.
Open the game on its own