Get 3 in a row - across, down, or diagonally - to win
The computer is really strong, so try to get a draw!
Your wins and losses are saved in your browser
FAQ
Q. Is Tic-Tac-Toe free to play? A. Yes, it is completely free. There are no fees or in-app purchases.
Q. Is this the same as noughts and crosses or Xs and Os? A. Yes - this game goes by many names: tic-tac-toe, noughts and crosses, and Xs and Os. They are all the same game.
Q. Do I need to download or install anything? A. No, you don't need to. Just open your browser and start playing right away.
Q. Can I play on my phone? A. Yes, you can. Just tap a square on your phone (or click on a computer) to place your O, so it's easy to play comfortably on mobile too.
Q. Is there a trick or strategy to win at Tic-Tac-Toe? A. The CPU in this game always picks the best move using an algorithm called minimax, so if both players play perfectly, the game actually ends in a draw. Try taking the center or a corner square first, and watch out for letting your opponent set up a fork, meaning two winning lines at once - that will help you reach a draw more often.
Q. Can I choose a difficulty level? Can two people play against each other? A. There's no difficulty setting - the CPU always plays at its strongest level using the minimax algorithm (though it picks randomly among equally good moves, so each game plays out a little differently). There's also no two-player mode, so your opponent is always the computer.
Want to build this game yourself?
This game is built with plain HTML, CSS and JavaScript.
See how it works — step by step, or straight from the source.