Play Tic Tac Toe Online

Play free against the computer or with another person on the same device—no download, account, or sign-up required.

Game board

Choose Opponent

Vs Computer · Medium · saved on this device

Wins

0

Losses

0

Draws

0

Win streak / best

0 / 0
Options

Medium looks for wins and blocks, then prefers the centre and corners.

Keyboard: arrow keys move around the board; Enter/Space plays. Keys 19 select squares.

Advertisement

How to Play Tic Tac Toe

Two players alternate placing X and O on a 3×3 grid. X traditionally goes first; the Vs Computer options can change the starting side. The first player to complete a horizontal, vertical, or diagonal line of three marks wins. If all nine squares fill without a winning line, the round is a draw.

The eight winning lines

  • Top, middle, or bottom row (3)
  • Left, centre, or right column (3)
  • Top-left to bottom-right diagonal (1)
  • Top-right to bottom-left diagonal (1)

Play modes

Vs Computer: choose Easy, Medium, or Unbeatable in Options, then tap an empty square. 2 Players — Same Device: share this screen and take turns; this is pass-and-play, not remote online multiplayer.

Strategy Examples

The dashed square is the recommended move. “Load this position” opens the example as a two-player practice board.

Block two in a row

X must take the top-right square. Creating a new threat elsewhere would let O win across the top row.

Create a fork

Bottom-left gives X two next-move threats: the left column and bottom row. O can block only one.

Defend opposite corners

When X owns opposite corners and O has the centre, O should take a side—not another corner—to avoid an X fork.

Force the draw

O can occupy either empty square without opening a winning line. X fills the last square, so careful defence secures a draw.

AI Difficulties

Easy

Chooses randomly from every valid empty square. It does not deliberately win or block.

Medium

Takes an immediate win, blocks your immediate win, then prefers the centre, corners, and sides. It does not search the full game tree.

Unbeatable

Uses minimax with alpha–beta pruning to check every legal continuation. It cannot be beaten; perfect play against it ends in a draw.

Privacy and Saved Data

The game runs entirely in your browser and sends no moves, names, or records to a game server. Preferences and records by opponent and difficulty are stored in local browser storage when available. Reset Records clears those results on this device.

Brief history and classroom ideas

Noughts and crosses has long been used to introduce game trees and decision-making. Donald Michie’s 1963 paper described a trial-and-error device that learned the game with matchboxes and coloured counters. A commonly quoted count of 255,168 refers to possible complete game sequences, not “legal positions.”

For a short classroom activity, ask learners to identify all eight winning lines, explain why a move blocks a threat, or compare the choices made by Medium and Unbeatable.

Sources: Wolfram MathWorld: Tic-Tac-Toe; Michie, The Computer Journal (1963); University of Göttingen: MENACE; IEEE CIG 2006 proceedings. Reviewed 18 July 2026.

Frequently Asked Questions

Is this Tic Tac Toe game free?

Yes. The game is free to play, with no download, payment, account, or sign-up required.

How does two-player mode work?

Choose 2 Players — Same Device, then take turns placing X and O on this device. It is local pass-and-play, not a remote online room.

Can Unbeatable Tic Tac Toe be beaten?

No. Unbeatable checks the complete game tree with minimax. Perfect play can force a draw, but the computer will not lose.

Who goes first?

X always moves first in two-player mode. Against the computer, open Options to choose whether you, the computer, or alternating sides start.

How does Undo work?

Against the computer, Undo normally removes your move and the computer reply. In two-player mode it removes one move. After a result, Undo also reverses that result in the saved record.

Are scores and settings saved?

Yes, when browser storage is available. Records and preferences stay only on this device and can be reset from Options.

Does it work on phones?

Yes. The board scales to narrow phone screens and supports touch without horizontal scrolling.

Can I play with a keyboard?

Yes. Tab enters the board, arrow keys move between squares, and Enter or Space places a mark. Number keys 1–9 also choose squares from top left to bottom right.

Explore more tools