Tic-tac-toe
Line up your marks before your opponent does. Pick one of three difficulty levels, play with a friend on the same device, or try the bigger boards.
Your turn
A game is in progress. Start a new one?
Select a square, or use the arrow keys and Enter. On 3x3, the number keys 1 to 9 follow the numeric keypad layout.
How to play
- Players take turns placing a mark on a free square.
- Whoever lines up 3 marks (4 on the 4x4 and 5x5 boards) horizontally, vertically, or diagonally wins.
- If the board fills up with no line, it is a draw.
- The X is drawn with two strokes and the O with a circle, so you can tell them apart without relying on color.
How to use it
- Choose the mode (against the computer or two players), the level, and the mark you want to play with.
- Select a free square to place your mark. You can also move with the arrow keys and press Enter, or use the number keys 1 to 9 laid out like a numeric keypad.
- The first player to line up three marks horizontally, vertically, or diagonally wins. On 4x4 and 5x5 boards you need four.
- If you make a mistake, use Undo. Then select New game to keep going with the scoreboard.
Frequently asked questions
Can you win on the Impossible level?
On the 3x3 board, no: the computer works through every possible move and never loses. The best you can do is a draw. On the 4x4 and 5x5 boards that level is called Expert: the computer looks several moves ahead, but it is not perfect and it can be beaten.
How do the levels work?
On Easy, the computer plays almost at random and sometimes slips up. On Medium, it wins when it can, blocks your lines, and prefers the center and the corners. On Impossible (Expert on 4x4 and 5x5), it calculates moves ahead and almost never makes a mistake.
Can I play with a friend?
Yes. Choose the two-player mode and take turns on the same device. The scoreboard counts the wins for X, the wins for O, and the draws.
Who goes first in each game?
You can choose to start yourself, to let the computer start, or to take turns every game. Whoever starts always moves first, whether they are X or O.
What are the 4x4 and 5x5 boards?
They are variants with more room where you have to line up four marks. They make for longer games with more strategy.
How to win at tic-tac-toe
- If you go first, play in a corner or in the center: those squares are part of the most lines.
- If the computer starts in a corner, answer in the center. Answering in another corner or on an edge loses in a few moves.
- Look for moves that create two threats at once (a fork): your opponent can only block one.
- Always block your opponent's line when it is missing just one mark.
Why 3x3 always ends in a draw
The 3x3 board is a solved game: with perfect play from both sides, the game ends in a draw. That is why on the Impossible level the best you can get is a tie, and any mistake of yours gets punished. On the Medium level the computer wins if it can, blocks, and prefers the center and the corners, but it does not plan forks, so you can beat it with a double threat.
4x4 and 5x5 boards
On the larger boards you have to line up four marks. Games are longer and forks are harder to see. On 4x4 it pays to take the four center squares, which are part of the most lines; on 5x5 the center and the diagonals are worth more than the edges. At that size the computer uses the Expert level: it calculates several moves ahead, but it is not perfect, so there is room to beat it.
Names of the game
Tic-tac-toe is also known as noughts and crosses, Xs and Os, or three in a row, depending on the country. It is one of the oldest known games: a version of it was already played in the Roman Empire with stones on a marked board.
Shortcuts
On the 3x3 board, the number keys 1 to 9 follow the layout of a numeric keypad: 7 is the top-left corner, 5 is the center, and 3 is the bottom-right corner. If you prefer another logic game, try Minesweeper or 2048.
Updated on September 29, 2026