Play tic tac toe online, free
Tic tac toe is the game almost everyone learns first: two players, X and O, take turns on a 3×3 grid, and the first to get three in a row wins. Here you can play it right in your browser, on a phone, a tablet or a computer. There is nothing to download and no account to make.
You can play against the computer on three levels, Easy, Medium and Hard, or choose 2 players and pass one device back and forth. If the classic board feels too small, switch to a 4×4 or 5×5 board, where you need four in a row. Your settings and your record against the computer are saved on your device, so the game opens the way you left it.
How to play here
Tap or click an empty square to place your mark. Against the computer you are always the red X and you always move first. The computer is the blue O and answers after a short pause. In 2-player mode, X and O take turns on the same screen.
The board glows in the colour of the player whose turn it is, red for X and blue for O, and the matching chip at the top lights up. The chips also keep score for the session: X wins, O wins and draws. A small dot in the corner of a square marks the last move, so you can always spot the computer’s reply.
When someone gets a line, the winning squares light up gold one by one and a line sweeps through them. Then a card offers a rematch. Under the board you will find four buttons. Undo takes back your last move, together with the computer’s answer. Hint lights the square the Hard computer would choose. Show me plays a short demo of the goal and the move. Restart deals a fresh board.
With a keyboard, use the arrow keys to move around the board and Enter to play. On the 3×3 board the number keys 1 to 9 also work, in reading order: 1 is the top-left square and 9 the bottom-right one.
Tic tac toe rules
The game is played on a grid of 3 by 3 squares. X always moves first, then the players take turns, one mark per turn, in any empty square. Marks never move once they are placed.
You win by getting three of your marks in a straight line: across a row, down a column, or along one of the two diagonals. There are eight such lines on the board. If all nine squares fill up and nobody has a line, the game is a draw, sometimes called a cat’s game.
The bigger boards follow the same rules. On 4×4 you need four in a row, across, down or diagonally. On 5×5 you also need four in a row, which gives 28 possible lines, so there are many more ways to build threats and forks.
How to win at tic tac toe (and never lose)
Tic tac toe has a small number of ideas, and once you know them you will never lose a game.
Start in a corner. The centre and the corners are the strong opening squares. The centre sits on four lines, but a corner sets more traps. If X starts in a corner and O answers anywhere except the centre, X can force a win. A good plan is to take the opposite corner next, then use the third corner to make a fork.
Make forks. A fork is a move that creates two threats at once, two lines that each need only one more mark. Your opponent can block only one of them, so you complete the other. Nearly every win between careful players comes from a fork.
Block, then fork. On every turn, check first whether your opponent has two in a row with the third square empty. If so, block it, even if you were planning something else. A strong trick is to block in a way that also makes your own threat, so your opponent has to answer you instead of building.
Avoid the edge opening. An edge square, in the middle of a side, sits on only two lines. It is the weakest first move. It still draws with good play, but it gives you fewer chances to win.
Playing O against a corner. If X opens in a corner, take the centre. If X then takes the opposite corner, do not play a corner yourself: play an edge, which forces X to block and kills the fork. If X opens in the centre, take a corner.
Is tic tac toe always a draw?
Yes, with perfect play. Tic tac toe is small enough that every position has been worked out, and neither player can force a win if the other makes no mistake. Our own check script walks through every possible game to confirm the numbers below.
There are 255,168 possible games if you count every order of moves and stop when someone wins. X wins 131,184 of them, O wins 77,904, and 46,080 end in a draw. X wins more often because X moves first and gets five marks on a full board against O’s four. Those games pass through 5,478 different positions, and 958 of those positions end the game.
Hard on this page plays perfectly on the 3×3 board, so the best you can get against it is a draw. When there are several equally good moves, it picks the one that gives you the most chances to go wrong, so stay alert. The 4×4 and 5×5 boards are also draws with perfect play, but Hard searches only part of the game there, so a careful player can beat it.
Noughts and crosses, XO and other names
The game has many names. In the United States and Canada it is tic tac toe, sometimes written tic-tac-toe. In the United Kingdom, Ireland, Australia and New Zealand it is noughts and crosses, because an O is a nought and an X is a cross. Across the Arab world and in India many people simply call it XO. Whatever the name, the board, the marks and the three-in-a-row goal are the same.
A short history
Games of three in a row are very old. Boards for a related game called terni lapilli, which means “three pebbles”, have been found scratched into stone in Ancient Rome, though its exact rules are not known for sure. Paper and pencil versions with X and O became common much later.
Tic tac toe also has a place in computer history. In 1952 A. S. Douglas, a student at the University of Cambridge, wrote OXO, a noughts and crosses game for the EDSAC computer. A player set moves with a telephone dial and played against the machine on a small screen. OXO is often named as one of the first video games.
Levels and more games
Easy misses some wins and blocks, so children can beat it and learn how lines work. Medium never misses a win or a block and sometimes plays the perfect move, so you need a fork to beat it. Hard never loses on the 3×3 board.
When you want more, try Ultimate Tic Tac Toe, where nine boards sit inside one big board and every move decides where your opponent plays next. Four in a Row drops discs into columns, Gomoku asks for five in a row on a big board, and Football Tic-Tac-Toe turns the grid into a football quiz to play with a friend.
How to play Tic Tac Toe
- Two players take turns, X and O. X moves first.
- On your turn, put your mark in any empty square.
- Get three of your marks in a row across, down or diagonally to win.
- If all nine squares fill and nobody has three in a row, the game is a draw.
- On the 4×4 and 5×5 boards you need four in a row.
Tic Tac Toe tips
Start in a corner
A corner sits on three lines, and it gives the other player the most ways to go wrong. Against a corner, only the centre reply holds the draw for sure. Most first replies on an edge or another corner lose against good play.
Take the centre if they start in a corner
When the other player opens in a corner, put your first mark in the middle. After that, answer each threat as it comes and avoid putting your second mark in a corner if they hold the two opposite corners. Play an edge instead.
Block first, then attack
Before every move, look for two of their marks in a row with the third square empty. Block it. Only when there is nothing to block should you build your own line. A win you were about to make does not matter if they win first.
Make a fork
A fork is one move that makes two threats at once. The other player can only block one, so you win with the other. Corners are the best squares for forks, which is why the corner opening is so strong.
Frequently asked questions
Can you beat the Hard computer?
Not on the 3×3 board. Hard plays perfectly there, so the best you can get is a draw. It also picks the moves that give you the most chances to go wrong. On 4×4 and 5×5, Hard searches a limited number of moves ahead, so a careful player can sometimes beat it.
Is tic tac toe always a draw?
Yes, if both players make no mistakes. Every position of the game has been worked out, and with best play neither side can force a win. That is why games between two experienced players almost always end in a draw.
What is the best first move in tic tac toe?
A corner. The centre is just as safe, but the corner gives the other player more ways to make a mistake. If they answer a corner with anything except the centre, you can force a win with good play.
Who goes first?
Against the computer you are always X, and you always go first, every game. In 2-player mode the first player switches each game, so X starts the first game, O starts the second, and so on. The glowing chip at the top shows whose turn it is.
What is noughts and crosses or XO?
The same game. Noughts and crosses is the usual name in the United Kingdom, Ireland, Australia and New Zealand. XO or X-O is common in the Arab world, India and many other places. The rules are the same everywhere.
How many possible games of tic tac toe are there?
There are 255,168 different complete games if you count every order of moves and stop as soon as someone wins. X wins 131,184 of them, O wins 77,904 and 46,080 are draws. There are 5,478 different positions you can reach, and 958 of them end the game.
How do 4×4 and 5×5 work?
The rules are the same, but you need four of your marks in a row to win. A 4×4 board is very hard to win, because one mark can block a whole line. The 5×5 board gives more room for forks, so it plays like a small game of Gomoku.






