Free Tic-Tac-Toe Online

You play X. The computer plays O. Get three in a row to win.

Your turn (X)
W: 0 D: 0 L: 0

How to Play Tic-Tac-Toe

You always play as X and move first. Click any empty square to place your X. The computer then places its O. The first player to get three of their marks in a horizontal, vertical or diagonal line wins the round. If all nine squares are filled without a winner, the game is a draw.

Easy vs Hard Mode

Easy mode makes random valid moves. Hard mode uses a perfect strategy called minimax, which means it will never lose. Hard mode is still worth playing because the only way to avoid losing is to play perfectly yourself. Use Hard mode to practise finding the correct defensive responses.

Tips

  • Take the centre square on your first move whenever it is available. It gives you the most winning lines.
  • If you can win on this turn, do it immediately. Never delay a winning move.
  • Watch for forks - situations where you create two threats at once. The opponent can only block one.
  • On Hard mode, every draw is a success. The AI plays a perfect game, so draws against Hard are the best possible outcome.

FAQ

Can I beat the Hard AI?
No. On Hard mode the AI uses minimax, a complete game tree search for a 3x3 board. It plays perfectly and will never lose. A draw is the best achievable result against it.
Is my win record saved?
Wins, draws and losses are tracked for your current session. They reset when you close the page. Your all-time best win streak is saved to localStorage and persists across visits.

Try Next