⭕

Tic Tac Toe

Play Tic Tac Toe against an AI opponent online. Choose difficulty levels and track your wins. Classic strategy game for all ages.

Advertisement
Goes first
X
Draw!
O

Copied

Copy failed. Select the result and copy it manually.

Embed this tool on your website

Use whole pixel dimensions from 1 to 4096.

× px (1–4096)

                        

💡 Integration Tip

Copy the embed code and paste it into your website HTML. The responsive version adapts to all screen sizes automatically.

2.2
11 ratings
✓

Play, method and practical limits

Make a line of three equal marks to win. One-player mode controls X against O; two-player mode alternates marks on this device.

Limits and problems

Easy chooses randomly, medium mixes random choices and minimax, and hard uses minimax. Perfect play can end in a draw.

Occupied cells and ended boards ignore moves. Restarting or switching mode cancels the old AI turn, even if another O turn is waiting.

Game data

Session scores use sessionStorage under tttScores. If it is unavailable, the current board and scores remain usable in memory.

About Tic Tac Toe

Play Tic-Tac-Toe against the computer or a friend. Classic X and O game with multiple difficulty levels. Features score tracking and clean, responsive design.

Use Cases

Quick game with a friend
Playing against AI on different difficulties
Teaching game strategy to children
Passing time with a classic game
Practicing logical thinking

Pro Tips

  • Taking the center square first is often advantageous
  • Watch for opportunities to block your opponent
  • Corners are strategically valuable positions
  • With perfect play, the game always ends in a draw

How to use

1

Choose to play vs Computer or vs Friend

2

Click on a square to place your mark

3

Get three in a row horizontally, vertically, or diagonally to win

4

The game tracks wins, losses, and draws

5

Choose one or two players, difficulty and which mark goes first. Select an empty cell to move.

6

Use New game to replace the board. Reset scores clears the tallies; each finished board counts once.

Frequently Asked Questions

On hard/impossible mode, the AI plays perfectly - you can only draw or lose.

Select "Two Players" mode and take turns on the same device.

Yes, wins, losses, and draws are tracked during your session.

Yes, you can choose who goes first before starting the game.

No. The choice selects the first mark. In one-player mode you still play X; O is the AI.

Popular Tools

No more tools to show
Explore All Tools
FreeWebTools AI