Tic-Tac-Toe
Play noughts and crosses against the computer on three levels, or take turns with a friend on the same screen.
Your tally for each opponent is saved in this browser only, using local storage. It is never sent anywhere. Use Tab to move between squares and Enter or Space to place your mark.
How to play
Two players take turns placing their mark, X or O, in a square of a three by three grid. The first to line up three of their own marks in a row, across, down or diagonally, wins. If all nine squares are full and nobody has a line, the game is a draw. X always moves first. Choose to play as X to go first, or as O to let the computer start.
The three computer levels
- Easy picks any open square at random, so it often misses a chance to win or block you.
- Medium wins if it can, blocks you if you are about to win, and otherwise picks a random open square.
- Unbeatable looks at every way the game could continue and always chooses a move that gives the best result. The best you can get against it is a draw. It picks at random among equally good moves, so its games still vary.
Choose Two players to take turns with a friend on the same device. Wins are then counted for Player X and Player O.
Tips for winning
- Corners and the centre are the strongest opening squares, because they sit on more lines than the edges do.
- If your opponent opens in a corner, the centre is the only reply that avoids a loss against perfect play.
- The way to beat Medium is a fork: a move that creates two winning threats at once. It can only block one of them.
- Before every move, check two things: can I win now, and must I block?
Good to know
- Your tally is stored on your device in your browser's local storage, kept separately for each opponent. Clearing your browser data removes it, and the reset button clears it for the opponent you have selected.
- It works with the keyboard. Each square is a button with a spoken label giving its row, column and contents.
- Need to pick who goes first in another game? Use the Coin Flipper or the Dice Roller.
Frequently asked
Can I beat the unbeatable level?
No. With correct play from both sides Tic-Tac-Toe always ends in a draw, and the unbeatable level never makes a mistake. If you draw against it, you played perfectly.
Who goes first?
X always goes first. Choose X to move first yourself, or O to let the computer open the game. In two-player mode, Player X starts.
How does the computer choose its moves?
Easy uses random choices. Medium follows two simple rules: win if possible, otherwise block. Unbeatable works through every possible continuation and picks among the best moves.
Where is my tally saved?
In your browser's local storage on this device, one tally per opponent. It is not uploaded. If you clear your site data or use a private window, it will be lost.
Can two people play on one device?
Yes. Choose Two players and take turns tapping or clicking squares. The game announces whose turn it is.
Last updated: October 2026