Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Games
  3. Tic-Tac-Toe
Add to favorites

Tic-Tac-Toe

Play tic-tac-toe against the computer at four levels, from Easy to an unbeatable Impossible, or with a friend on the same device. Keeps your score and streaks.

No account, nothing trackedMore gamesJump to full guide

Initializing in your browser…

You might also like

Memory Match

Turn over cards two at a time and find every matching pair. Four board sizes, timed and relaxed modes, eight picture themes and saved best scores.

Wordle

Guess the hidden five letter word in six tries, with green, yellow and grey tiles, a live count of the answers that still fit your clues, unlimited games and saved streaks.

2048 Game

Slide and merge numbered tiles on a 4 by 4 board to build a 2048 tile. Plays with arrow keys or swipes, with ten levels of undo and your best score saved.

A sample round

You are X. You opened in the top-left corner, O replied next to it on the top edge, you took the centre and O blocked the bottom-right corner. It is your move.

Board before your move

X | O | .
. | X | .
. | . | O
What Tic-Tac-Toe produces

Play the bottom-left corner (key 1)

X | O | .
. | X | .
X | . | O

Two threats: the left column and the rising diagonal

The bottom-left corner lines up with your top-left X down the left column, which only needs the middle-left square, and with your centre X along the diagonal, which only needs the top-right square. O has no line of its own to complete, so it can block only one of the two and you win next turn. The mistake was O's first reply: against a corner opening the only safe answer is the centre. On Easy or Medium the computer sometimes makes that slip; on Impossible it always takes the centre and the game ends in a draw.

Three in a row against the computer or a friend

Play tic-tac-toe on a 3 by 3 board against the computer at four levels of skill, or pass the device between two players. The top level never loses, so it doubles as a way to learn perfect play, and every game, score and streak is kept in your browser.

How to play

  1. 1Choose Computer or Two players. Against the computer, pick a difficulty.
  2. 2Optionally choose who moves first and whether you play X or O.
  3. 3Tap or click an empty square to place your mark, or press 1 to 9 on the keyboard.
  4. 4Complete a line of three to win, and block your opponent's lines before they complete them.
  5. 5Press Undo to take back a move, or New game (or N) to start again.

Tips & best practices

  • If the computer takes a corner first, answer in the centre. Any other reply can be forced into a loss.
  • Look for a fork: a move that makes two lines of two at once. Your opponent can block only one.
  • Before every move, check whether your opponent has two in a line. Blocking comes before attacking.
  • Starting second against a strong opponent, aim for the draw and wait for a slip rather than forcing play.

Why play it

  • Learning perfect play

    Play Impossible until you can draw every game, starting first and second. Once you can, you know the whole game.

  • Teaching children strategy

    Easy makes plenty of mistakes, which gives a young player the chance to find a fork and see why it wins.

  • A quick game with a friend

    Two player mode on a phone or tablet, with the session score kept for a best of five.

  • A short break

    A game takes under a minute and there is nothing to install.

Controls and rules

  • Computer opponent at four levels, from Easy to an unbeatable Impossible
  • Two player mode for taking turns on one device
  • Choice of who moves first and which symbol you play
  • Undo that takes back your move and the computer's reply together
  • Keyboard play with a number pad layout, arrow keys, N for a new game and Ctrl+Z
  • A line drawn through the winning three
  • Session scoreboard plus all-time wins, losses, draws and best streak
  • A list of your recent games with level, moves and time
  • Optional sound effects

Examples

  • A fork after a weak reply

    You open in a corner and the computer answers on an edge next to it. Take the centre, and after it blocks your diagonal, a second corner on the same side makes two threats at once.

  • Studying Impossible

    Play ten games first and ten second on Impossible. If every game is a draw, you are playing tic-tac-toe perfectly.

  • Best of five with a friend

    Choose Two players, reset the session score, and the scoreboard keeps count of X wins, O wins and draws.

How it works

The rules. Players take turns putting their mark in an empty square. The first to complete a line of three, across, down or along a diagonal, wins, and if all nine squares fill with no line the game is a draw. With good play on both sides tic-tac-toe always ends in a draw, so a win comes from spotting a mistake: a missed block or a fork, where one move creates two threats at once and only one can be stopped.

Playing the computer. The computer looks ahead through every possible continuation from the current board, so it always knows which moves win, draw or lose. It prefers a quick win to a slow one and puts off a loss for as long as it can, which is how a strong human plays. Difficulty sets how often it deliberately plays a weaker move when one is available: seven times in ten on Easy, about three in ten on Medium and one in ten on Hard. Impossible always plays a best move and cannot be beaten. When several moves are equally good it picks one of them at random, which is why its openings vary from game to game.

Settings. Choose who moves first (you, the computer or a coin toss) and whether you play X or O. In two player mode X always starts and the board simply alternates turns. Undo against the computer takes back your last move together with its reply, so you can try a different idea; with two players it takes back one move. Undo is not available once a game is over, which keeps the score honest.

Keyboard, touch and records. Tap or click a square to play. On a keyboard, keys 1 to 9 map to the squares like a number pad (7, 8 and 9 are the top row), the arrow keys move a highlight and Enter places your mark, N starts a new game and Ctrl+Z undoes. The keys only act while the board is on screen, so they do not get in the way when you scroll down the page. The scoreboard above the board counts this session; the statistics panel keeps your all-time wins, losses, draws and best winning streak against the computer, plus your last games with the level, number of moves and when you played. Everything is stored in this browser only.

Frequently asked questions

Can I beat the computer on Impossible?

No. On Impossible the computer always plays one of the best moves available, and in tic-tac-toe best play is enough never to lose. The best result you can get is a draw.

What does the difficulty change?

Only how often the computer plays a weaker move when a better one exists: seven times in ten on Easy, about three in ten on Medium, one in ten on Hard and never on Impossible. The rest of the time it plays as well as it can.

Why does the computer open in a different square each time?

On an empty board every square leads to a draw with perfect play, so all nine are equally good and it picks one at random. After you take the centre it chooses among the four corners, because an edge reply to a centre opening can be forced into a loss.

What is the best first move?

Every opening draws with perfect play, but a corner gives the opponent the most ways to go wrong: against a corner, the only safe reply is the centre. The centre is the next strongest.

How do the number keys map to the board?

Like a numeric keypad. 7, 8 and 9 are the top row, 4, 5 and 6 the middle and 1, 2 and 3 the bottom, so 5 is the centre. The keys on the top row of the keyboard work the same way.

How does undo work?

Against the computer it goes back to just before your last move, removing the computer's reply as well. In two player mode it removes one move. It is disabled while the computer is thinking and after a game has ended.

Are my statistics saved?

Yes, in your browser's local storage on this device: wins, losses, draws and best streak against the computer, and your recent games. The scoreboard above the board is for this session only.

Related tools and how they differ

  • Mastermind: Another short logic game, where you deduce a hidden code from feedback instead of blocking lines.
  • Memory Match: A quick two-minute game that can also be played with a friend taking turns.
  • Sudoku: A longer pencil-and-paper classic for when three in a row is solved.

Private by design

The game runs entirely in your browser. No account is needed and no gameplay data is collected.