Saved

Press the star next to a tool's name to save it.

All my tools

Tic Tac Toe

Play tic tac toe online free against an unbeatable computer, an easy computer or a friend on the same device, with a running score.

Restored your last values ·

Tap a square to place your mark. Get three in a row, column or diagonal to win.

The game runs in your browser. Nothing is uploaded.

Tic tac toe

–

Recent results

Play tic tac toe online, free, against the computer or a friend on the same device. Choose an unbeatable computer, an easy computer, or two-player mode, pick X or O, and tap a square to place your mark. Get three in a row, a column or a diagonal to win. The score is kept as you play, so you can see who's ahead after a few rounds.

How to play tic tac toe

  1. Choose who to play against: the unbeatable computer, the easy computer, or a friend.
  2. Choose X or O. X always goes first.
  3. Tap an empty square to place your mark.
  4. Take turns until someone gets three in a line or the board is full.
  5. Press New game to play again; the score carries on.

About the game

Tic-tac-toe, known as noughts and crosses in British and Commonwealth English and Xs and Os in Canada and Ireland, is a paper-and-pencil game for two players who take turns marking the spaces of a three-by-three grid, one with Xs and the other with Os. A player wins by marking all three spaces of a row, column or diagonal. It's a solved game: with best play from both players, every game ends in a draw.

Why the unbeatable computer always draws or wins

The unbeatable mode looks ahead through every possible move to the end of the game, a method called minimax, and chooses the move that's best whatever you do. Because perfect play always leads to a draw, the best you can do against it is a draw. Try it as a challenge: if you ever lose, you'll know exactly which mistake you made. The easy computer is better for children and beginners. It takes a winning move or blocks yours when it spots one, but otherwise plays at random, so you can win.

A winning strategy

A player can play a perfect game by choosing, each turn, the first available move from this list, used in Newell and Simon's 1972 tic-tac-toe program:

  1. Win: if you have two in a row, place the third.
  2. Block: if your opponent has two in a row, play the third square yourself.
  3. Fork: create two ways to win at once, so your opponent can only block one.
  4. Block a fork: stop your opponent from setting one up.
  5. Center: take the middle square.
  6. Opposite corner: if your opponent is in a corner, take the opposite one.
  7. Empty corner, then empty side.

Tic tac toe by the numbers

When the board is considered without rotations and reflections, there are only 138 different finished positions. If X always moves first, 91 of those positions are wins for X, 44 are wins for O and 3 are draws, often called a cat's game. Even so, with perfect play from both sides, the game is always a draw, which is why it's a favorite first example in computer science of a game a program can play perfectly.

Tips for beginners

  • Start in the center or a corner when you go first.
  • Always check for a block before making your own move.
  • Look for forks: two lines that share an empty square.
  • Practice against the easy computer, then try to draw against the unbeatable one.

Playing with children

Tic tac toe is a great first strategy game. It teaches taking turns, planning ahead and recognizing patterns, and a game takes about a minute. Two-player mode lets a parent and child play on the same phone or tablet, and the score line gives a gentle reason to keep playing.

Your privacy

The game runs entirely in your browser, with no account, no download and nothing uploaded.

Playing second as O

When the computer or your friend plays X and goes first, your job is mainly to avoid losing. If X takes the center, take a corner. If X takes a corner, take the center: an edge or the wrong corner can let X set up a fork. After that, block every two-in-a-row and watch for forks before they happen. Against the unbeatable computer, a draw is the best possible result for O, so every draw means you played a perfect game.

Variations to try

Once regular tic tac toe always ends in a draw, players often move on to related games. Some play on bigger grids, where you need four or five in a row. Others play a version where each player has only three marks and moves them around once they're all placed. These variations need more planning and are a natural next step after you've mastered the classic three-by-three game here.

Keeping score

The score line under the board counts wins and draws in the current session. Changing who you play against or which mark you play starts a fresh count, so each matchup has its own score. Press Reset score to start over at any time.

Common mistakes

  • Forgetting to block two in a row.
  • Starting on an edge, which gives the opponent easier forks.
  • Playing too fast. Check every line before you tap.

What next

Use this often? Add Tic Tac Toe to your Home screen.

Frequently asked questions

How do you win tic tac toe?

Get three of your marks in a row, a column or a diagonal before your opponent does.

Can you beat the unbeatable computer at tic tac toe?

No. It plays perfectly, and with perfect play on both sides tic-tac-toe always ends in a draw.

Who goes first in tic tac toe?

X always goes first. Choose X to start, or O to let the computer or your friend start.

What is the best first move in tic tac toe?

The center or a corner. Both give strong chances to set up forks later.

Can I play tic tac toe with a friend?

Yes. Choose A friend and take turns tapping on the same device.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Fun & Lifestyle Tools