Your turn

You0 wins
CPU0 wins

Draws 0

Tic Tac Toe: play free against the computer or a friend

Tic Tac Toe is a two-player game of X and O on a 3×3 grid. On this page you can play it free against the computer on three levels, or with a friend on the same device.

On this page: How to play · Easy, Medium and Impossible · How to win · FAQ

How to play Tic Tac Toe

Tic Tac Toe is also called noughts and crosses, or Xs and Os. It needs two players, or one player against the computer. These are the rules on this page:

  1. The board is a 3×3 grid of nine squares. One side plays X, the other plays O.
  2. Take turns putting your mark in an empty square. A square that is taken can't be played again.
  3. Get three of your marks in a row, across, down or corner to corner, to win. There are 8 such lines.
  4. If all nine squares fill up and nobody has three in a row, the game is a draw, also called a cat's game.
Empty Tic Tac Toe board with Your turn, the score You 0, CPU 0, Draws 0, and the vs Computer, 2 Players, Easy, Medium and Impossible options below it
A new game. Medium is picked on your first visit.

vs Computer or 2 Players

Pick vs Computer to play X against the computer, which always plays O. You can't switch to O. Pick 2 Players to play with someone next to you on the same device: P1 is X and P2 is O. This version has no online play.

If you change the mode or the level during a game, that game is dropped without counting, and a new one starts with X.

Who goes first

There is no single agreed rule for who goes first in Tic Tac Toe. On this page you start the first game as X, then the first move switches sides every game, so the computer opens every second game. In 2 Players, P1 starts the first game and the first move switches the same way. Changing the mode or level, or reloading the page, gives the first move back to X.

Controls

  • Tap or click a square to play it.
  • Number keys 1 to 9 above the letters: 1 2 3 is the top row, 4 5 6 the middle row, 7 8 9 the bottom row.
  • Numeric keypad: the keys follow the keypad, so 7 8 9 is the top row and 1 2 3 the bottom row.
  • Arrow keys move between squares, and Enter or Space plays the square.
Tic Tac Toe board with faint key numbers 3, 4, 6 and 8 in the empty squares
After you use the keyboard, each empty square shows the number key that plays it.

When a game ends, press Play again, or tap the board after about a second.

Score

The score shows the wins for each side and the draws. It is saved in this browser only, one score for each level and one for 2 Players, so it is still there after a reload. There is no account, and if your browser blocks site storage, the score is not kept. Press Reset twice within 3 seconds to clear the score you see; the other scores stay.

Easy, Medium and Impossible: how the computer plays

The three levels differ in how the computer picks its move. It waits about 0.4 seconds after your move before it plays. Your first visit starts on Medium, and the page remembers the level you pick.

LevelWhat the computer doesCan you win?
EasyPlays any empty square at random.Yes. It only blocks you by chance.
MediumWins if it can, otherwise blocks your two in a row, otherwise plays at random. It only looks one move ahead.Yes, it can lose to a fork (one move that makes two threats at once).
ImpossiblePlays a perfect move every time, picked at random among equally good ones.No. A draw is the best result.

You can't beat Impossible on this page. We checked it with a test that plays every possible reply against it, whichever side starts, and it lost none of those games. To hold the draw, answer a corner with the center.

Full Tic Tac Toe board on the Impossible level with the message Draw!, Draws 1 and a Play again button
A draw is the best result against this page's Impossible level.

How to win at Tic Tac Toe

You can't win every time: if neither side makes a mistake, Tic Tac Toe is a draw. It is a solved game, which means the result of perfect play is known for every position. You win when the other side makes a mistake, and these tips help you set one up and avoid your own.

SquareWinning lines through it
Center4
Each corner3
Each edge2

Opening moves

  • Start in a corner. Every first move draws with perfect play, but after a corner the center is the other side's only reply that doesn't lose. Any other reply loses against correct play. We checked each reply with a perfect-play search using this game's rules code.
  • If the other side starts in a corner, take the center.
  • If they start in the center, take a corner. An edge reply loses to correct play.
  • If they start on an edge, you have four safe replies: the center, either corner next to it, or the opposite edge.

Every turn

  1. If you can complete three in a row, do it.
  2. If the other side has two in a row and the third square is empty, block it.
  3. Otherwise, look for a fork: one move that makes two lines that each need one more mark. The other side can block only one.
2 Players game where P1 (X) holds the top-left, center and bottom-left squares and it is P2's turn
A fork: X can win at the top right or the middle left. O can block only one.

Medium follows the first two steps but doesn't see a fork coming, so it can lose to one. In one of our test games on Medium, X blocked in the bottom-left corner and made two threats with the same move. Medium blocked one, and X won down the left column.

Chalk line through three X marks in the left column, with You win!, the score You 1 and a Play again button
Here Medium blocked one of two threats, and X won down the left column.

Tic Tac Toe FAQ

Is Tic Tac Toe free to play here?

Yes. Tic Tac Toe on this page is free to play in your browser, with no sign-up and nothing to download.

Can I play Tic Tac Toe with a friend?

Yes. Choose 2 Players and take turns on the same phone, tablet or computer. This version has no online mode, so you can't play a friend on another device.

Is it possible to beat the computer?

Yes, on Easy and Medium. Easy plays at random, and Medium can lose to a fork because it only looks one move ahead. Impossible never loses on this page, so the best you can get against it is a draw.

Can you always win at Tic Tac Toe?

No. If neither side makes a mistake, the game is a draw, so you win only when the other side slips. A fork, two threats at once, is how you turn a slip into a win.

Is Tic Tac Toe a solved game?

Yes. Perfect play from both sides always leads to a draw. The game is small enough to check every case: there are 255,168 possible games. We counted them with this game's own rules code.

Who goes first in Tic Tac Toe?

There is no single agreed rule. On this page you go first in the first game, and after that the first move switches sides every game. Changing the mode or level, or reloading the page, gives the first move back to X.

Is Tic Tac Toe a skill or luck?

Skill. The rules have no dice, cards or hidden information, so the result comes from the moves. On this page, Easy and Medium add some luck, because the computer picks some of its moves at random.

How many ways can you win at Tic Tac Toe?

There are 8 ways: three rows, three columns and two diagonals.

Does the game save my score?

Yes, in this browser only: one score for each level and one for 2 Players. It stays after a reload. There is no account, and if your browser blocks site storage, the score is not kept.

Can I play Tic Tac Toe offline?

No. This version has no offline mode, and the page will not load without an internet connection.

Last checked on : we played this version on Medium, Impossible and 2 Players in Chrome at desktop size (1280×800) and on a simulated 390×844 phone screen, and ran the game's rule and computer tests (9 of 9 passed).

Sources, read on November 3, 2026: Wikipedia, "Tic-tac-toe" (other names, a draw with best play, no single rule for who goes first); Wikidata, Q210339 (solved game); Wiktionary, "cat's game".