← All Games

Tic-Tac-Toe

How to play Tic-Tac-Toe

Tic-Tac-Toe is a free 2 players game by Extensive Harmony that you play in your web browser. Play with a friend or against the computer (easy or unbeatable). First to three in a row wins. It works on desktop and mobile — no download, no sign-up.

Goal

Get three of your marks in a row — horizontally, vertically, or diagonally.

Controls

  • Click / Tap a cell – Place mark
  • Buttons under the board – 2 players, or the computer (easy / unbeatable)

Tic Tac Toe strategy: how not to lose

Tic Tac Toe (noughts and crosses) is a solved game: with perfect play from both sides it is always a draw. That makes the rules of good play short and easy to learn.

  1. Win if you can. If you have two in a line and the third square is empty, take it.
  2. Block if you must. If your opponent has two in a line, take the third square before anything else.
  3. Make a fork. A fork is a move that creates two lines of two at once. Your opponent can only block one, so you win next turn.
  4. Stop their fork. If your opponent could make a fork next move, take that square first, or force them to block you somewhere else.
  5. Take the centre, then a corner. When nothing above applies, the centre square is part of four lines, and corners are part of three.

Winning as X: the corner trap

Start in a corner. If O answers on an edge or in a corner instead of the centre, you can almost always force a win by taking another corner and setting up a fork. If O takes the centre, play the opposite corner and wait for a mistake.

Common mistakes

  • Answering a corner with an edge. As O, the only safe reply to a corner opening is the centre.
  • Attacking before blocking. Making your own two in a row doesn't help if your opponent wins on the next move.
  • Opening on an edge. It's the weakest first move and lets O take control.

Want a bigger board and more strategy? Try Four in a Row against the computer.

Want every opening worked out? Our guide to winning tic tac toe lists the only safe reply to each first move and explains why there are 255,168 possible games.

Patterns to recognise

  • Opposite corners. X in two opposite corners and O in the centre: O must now play an edge, not a corner. A corner reply lets X make a fork.
  • Three corners. If you hold three corners and the edge squares between them are empty, two of your lines each need just one more square. That’s a fork: your opponent can block only one.
  • The forced block. Sometimes the best defence is an attack: make two in a row so your opponent must block, and choose it so their block doesn't create a threat of their own.
  • Every game ends in nine moves or fewer. With only nine squares, the game is short, so it's a good one to play several rounds in a row and swap who goes first.

Playing against the computer

The buttons under the board switch between three modes. 2 players is the classic game on one device. Against the computer you always play X and move first, and the computer answers as O.

  • Easy completes three in a row whenever it can, but otherwise picks a free square at random and never blocks you. A player who never misses a winning move beats it in 99.5% of games.
  • Unbeatable looks ahead to the end of the game before every move. We played it through all 681 different games a player can play against it: it lost none, won 498 and drew 183. The best you can do is a draw, which makes it a good way to practise the defence above.

The mode you choose is remembered on your device.

Tic Tac Toe with children

It's often the first strategy game children learn. Let them play X first, point out when there's a winning or blocking move, and explain forks once they stop missing simple threats. When every game between you ends in a draw, they've learned perfect play — time to try Four in a Row.

Did you know?

  • One of the earliest computer games was a tic-tac-toe program called OXO, written in 1952 by Alexander Douglas on the EDSAC computer at the University of Cambridge.
  • Counting rotations and reflections as the same, there are only 765 essentially different positions in tic-tac-toe, which is why computers solved it so early.
  • Tic-tac-toe is secretly the same game as “Pick 15”: players take turns picking numbers from 1 to 9, and the first to hold three that add up to 15 wins. Arranged in a 3 × 3 magic square, those triples are exactly the lines of the board.

Frequently asked questions

Is Tic Tac Toe free to play online?

Yes. Tic Tac Toe runs in your web browser for free, with no download, installation or account.

Can two people play on one device?

Yes. Choose 2 players under the board, and X and O take turns on the same phone, tablet or computer. X always moves first.

Can I play against the computer?

Yes. Choose Computer: easy or Computer: unbeatable under the board. You play X and move first. The unbeatable computer never loses, so a draw is the best result against it.

Can you always win at Tic Tac Toe?

No. If both players make no mistakes, every game ends in a draw. You win by spotting your opponent's mistakes and by setting up two threats at once.

What is the best first move?

A corner. It gives the opponent the most chances to go wrong. The centre is also strong. An edge square is the weakest start.

What do Tic Tac Toe and Noughts and Crosses have in common?

They are the same game. Noughts and crosses is the British name, and some people call it Xs and Os.

Keep playing

Read more

The First Video Games: From OXO to Tennis for Two and Spacewar!

More 2 Players games

Part of our games for seniors and games for kids collection.

New to browser games? See why playing in your browser beats installing apps.

Embed Tic-Tac-Toe on your website

Teachers, bloggers and site owners can add this game to a page for free. Copy the code below; please keep the credit link.