PB
Available
grid_view
lock Free · Private · In-Browser

Tic-Tac-Toe

Play tic-tac-toe against a minimax opponent or switch to two-player mode.

How to play: place X in an empty square and complete a row, column, or diagonal.

Play a complete tic-tac-toe game

This Tic-Tac-Toe board supports both a local two-player mode and a computer opponent. In computer mode, you play X and the browser chooses O moves with minimax, which means careless moves are punished and perfect play usually ends in a draw.

The board checks rows, columns, and diagonals after every move, highlights the winning line, and reports draws when all nine cells are filled. Reset starts a fresh round without changing the saved local score.

Pick single-player to face an unbeatable computer or two-player to share the device with a friend. X always moves first, the winning line is highlighted when the game ends, and Reset clears the board for a new round.

Local game state

The game runs fully in your browser and stores only a simple local score. It does not use a server, matchmaking, or a live leaderboard, so it is a quick playable page rather than an account-based game.

Frequently Asked Questions

Can I beat the computer?

In single-player mode the computer uses a minimax strategy and plays perfectly, so the best you can force is a draw.

How do I play against a friend?

Switch to two-player mode and take turns on the same device. The board alternates X and O and detects the winner automatically.

What do the highlighted squares mean?

When someone wins, the three squares forming the winning line are highlighted so the result is easy to see.

Does it save anything?

Only a simple local record of results in this browser. Nothing is uploaded.

Take it further
Fun & Games

Browser-based tests, solvers, and games you can use privately online.

Learn More arrow_forward