All Games

Play Tic Tac Toe Game Online

Play Tic Tac Toe game online for free against three AI difficulty levels, win by lining up three Xs in a row before the AI completes its own line of Os. Two players take turns marking a 3x3 grid and the first to place three marks in a horizontal, vertical or diagonal row wins the game. Simple enough for a five-year-old to pick up, yet deep enough that mathematicians have spent decades mapping every possible outcome.

PLAY

TIC TAC TOE

X
X
O
0
Wins
0
Draws
0
Losses

Choose your AI opponent

PLAY

What is Tic Tac Toe?

Tic Tac Toe is a two-player strategy game played on a 3x3 grid where players take turns placing either an X or an O, and the first player to line up three of their marks in a horizontal, vertical or diagonal row wins the match. With only nine cells, two marks and zero room for error, every move matters because a single misplaced X or O can hand your opponent the win, and that tension is what AIFreeForever wanted to preserve, so the game features an AI opponent with three difficulty levels instead of a second-player mode that requires someone next to you.

Tic Tac Toe - Free Online Browser Game

Tic Tac Toe by AIFreeForever

Tic Tac Toe by AIFreeForever is a free browser game you can play instantly on any device. It features three AI difficulty levels, sound effects on every move, a persistent scoreboard that tracks wins, losses and draws, and a polished game-style interface.

What AIFreeForever likes most about Tic Tac Toe is that it teaches strategy in under a minute, because kids pick up pattern recognition, adults rediscover fork traps, and the whole game fits in a coffee break. AIFreeForever added a persistent scoreboard so you can track how you improve over time.

History of Tic Tac Toe

Tic Tac Toe dates back over 3,000 years, with archaeologists finding game boards carved into Egyptian roofing tiles around 1300 BC, while the Romans played a similar version called Terni Lapilli where players moved three stones around a grid instead of placing new marks.

The Xs-and-Os-on-paper format took off in 19th-century England under the name Noughts and Crosses, and North America later adopted "Tic Tac Toe," a name likely borrowed from an 1800s pencil-tossing game called tick-tack-toe.

In 1952 Alexander Douglas coded OXO for his Cambridge PhD, making it one of the first video games, and in 1975 MIT students built a perfect Tic Tac Toe player out of Tinkertoy pieces, proving that even a purely mechanical device could master the game.

Types of Tic Tac Toe

Classic 3x3

Classic 3x3 is the standard two-player game on a 3x3 grid where the first player to get three in a row wins, and this is the version AIFreeForever built because it is the most universally played.

The Standard 3×3 Grid

The board below shows a classic 3x3 game in progress on AIFreeForever, where X has claimed a diagonal line of three marks highlighted in blue to indicate the winning combination.

Classic 3×3 — X wins diagonal
Classic 3x3 - Tic Tac Toe screenshot on AIFreeForever

Classic 3x3 screenshot on AIFreeForever

Ultimate Tic Tac Toe

Ultimate Tic Tac Toe is played on a 9x9 board made of nine smaller 3x3 grids, where winning a small grid claims that cell on the big board and adds layers of strategy the classic version does not have.

Nine Boards Inside One Board

The illustration below shows the Ultimate variant, where each cell of the main 3x3 board contains its own smaller 3x3 grid, and winning one of the small grids claims that cell on the larger board.

Board 1 — X wins
Board 2 — O wins
Board 3 — in play
9 small boards form one big board
Ultimate Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

Ultimate Tic Tac Toe screenshot on AIFreeForever

Misere Tic Tac Toe

Misere Tic Tac Toe uses reverse rules where getting three in a row loses instead of wins, which flips every instinct you have and forces you to think defensively on every turn.

Reverse Rules: Three in a Row Loses

In the Misere variant shown below, getting three in a row means you lose instead of winning, which forces both players to think defensively and avoid completing their own lines.

Misère — avoid three in a row
Getting three in a row means you lose
🔄
Misere Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

Misere Tic Tac Toe screenshot on AIFreeForever

3D Tic Tac Toe

3D Tic Tac Toe is played on a 4x4x4 cube with 64 cells, where four in a row across any axis wins, making it far more complex than the flat version.

Stacked 4×4 Layers in 3D

The 3D variant shown below uses two stacked 4x4 layers representing slices of a cube, where players need four in a row across any axis including vertically through the layers to win.

Layer 1
Layer 2
4×4×4 cube — four in a row across any axis
3D Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

3D Tic Tac Toe screenshot on AIFreeForever

Numerical Tic Tac Toe

In Numerical Tic Tac Toe one player uses odd numbers while the other uses evens, and the goal is to make any row, column or diagonal sum to 15, which adds a math twist to the classic formula.

Odds vs Evens — Sum to 15

In the Numerical variant shown below, one player places odd numbers while the other places evens, and the goal is to fill any row, column or diagonal so its three numbers add up to exactly 15.

9
3
5
1
7
Odds vs Evens — sum to 15
Odd: 1, 3, 5, 7, 9
Even: 2, 4, 6, 8
Goal: any line sums to 15
Numerical Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

Numerical Tic Tac Toe screenshot on AIFreeForever

Wild Tic Tac Toe

In Wild Tic Tac Toe players can place either X or O on any turn, and the first to complete a row of three matching marks wins regardless of which side placed them.

Place Either Mark on Any Turn

In the Wild variant shown below, players are free to place either an X or an O on any turn, which means the first player to complete a row of three matching marks wins regardless of who placed each one.

Wild — place X or O on any turn
Either player can place either mark
or
Wild Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

Wild Tic Tac Toe screenshot on AIFreeForever

5x5 Grid

The 5x5 Grid stretches the board to twenty-five cells and raises the win condition to four in a row, which removes the quick draws that plague the standard 3x3 and opens up enough space for real mid-game tactics to develop.

A Bigger Board That Demands Real Strategy

In the 5x5 board shown below you can see that X has built a diagonal chain of four marks highlighted in blue, which is what it takes to win on this larger grid. The extra cells mean both players have room to set traps and block without the game ending in a draw after a handful of moves the way the classic 3x3 version almost always does.

5×5 — four in a row to win
25 cells, need 4 in a row
Draws are rare on the bigger board
5x5 Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

5x5 Tic Tac Toe screenshot on AIFreeForever

Notakto

Notakto strips the game down to a single symbol where both players place X on every turn, and the player who is forced to complete three in a row loses, which turns every move into a careful act of avoidance rather than aggression.

One Symbol, Two Players, Pure Avoidance

The Notakto board below shows a game where every mark is an X because that is the only symbol either player is allowed to use. Look at how four X marks are scattered across the grid without any three of them lining up, and that is the entire point because the moment someone is forced to complete a row of three they lose. It flips the competitive instinct on its head and turns every single placement into a defensive calculation.

Notakto — both players place X
Only X marks on the board
Completing three in a row loses
⚠️
Notakto Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

Notakto Tic Tac Toe screenshot on AIFreeForever

SOS

In SOS each player chooses to place either the letter S or the letter O on any empty cell, and every time someone forms the sequence S-O-S in a horizontal, vertical or diagonal line they score a point, so the board fills up like a tug of war where both sides are hunting for patterns at the same time.

Hunt for S-O-S Sequences Across the Grid

In the SOS board below the top row is highlighted because someone completed the sequence S-O-S from left to right and scored a point for it. Each turn you choose whether to place an S or an O, and the game keeps going until the entire board is full, so the winner is whoever stitched together more S-O-S patterns by the end rather than whoever moved first.

S
O
S
S
O
S
S-O-S across top row = 1 point
Place S or O each turn
Form S-O-S in any line to score
Most points when the board fills wins
SOS Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

SOS Tic Tac Toe screenshot on AIFreeForever

Infinite Board

Infinite Board throws away the edges entirely and lets players place marks anywhere on an unbounded grid, with the first to connect five in a row winning, which means there is no corner to camp in and no wall to pin your opponent against.

No Walls, No Corners, No Limits

The Infinite Board illustration below uses a dashed border to show that the grid keeps extending in every direction with no edges to stop it. You can see a few X and O marks scattered across a wide open space, and the goal is to be the first to connect five in a row anywhere on that limitless plane. Without corners to anchor a strategy or walls to trap an opponent, every move floats in open territory and the game plays more like Gomoku than traditional Tic Tac Toe.

No edges — board extends forever
Five in a row to win
No corners, no walls
Dashed border = board keeps going
Infinite Board Tic Tac Toe - Tic Tac Toe screenshot on AIFreeForever

Infinite Board Tic Tac Toe screenshot on AIFreeForever

What Makes Our Tic Tac Toe Game Fun?

You are not playing against a random algorithm, because Tic Tac Toe on AIFreeForever lets you pick from three AI difficulty levels so you can warm up on easy, sharpen your strategy on medium or go head to head with an unbeatable hard AI that never makes a mistake.

Every game tracks your wins, losses and draws with a persistent scoreboard, and sound effects play on each move while the board animates with a game-style look that feels like a real app rather than a basic HTML page.

How to Play Tic Tac Toe

1

Choose your mark

You play as X and always go first. The AI plays as O.

2

Place your mark

Click any empty cell on the 3x3 grid to place your X.

3

Get three in a row

Line up three of your marks horizontally, vertically, or diagonally to win.

4

Block your opponent

Watch the AI moves and block them from completing their line.

Tips & Strategy

Always take the center square if it is available because it gives you the most winning opportunities.

If you cannot take the center, go for a corner since corners are the next most powerful positions on the board.

Try to create a fork, which means setting up two simultaneous threats that force a win since the opponent can only block one.

If the opponent takes the center on their first move, always respond with a corner to avoid falling into a losing position.

Tic Tac Toe Statistics & Numbers

Statistic Value
Possible game states 5,478
Possible games 255,168
Unique positions 765
First player win rate (random play) 58.5%
Draw rate (random play) 14.6%
Grid size 3 x 3 (9 cells)
Winning lines 8 (3 rows, 3 cols, 2 diagonals)
Perfect play outcome Always a draw

Fun Facts About Tic Tac Toe

💡

In 1975, MIT students built a Tic Tac Toe computer entirely from Tinkertoy construction pieces, a purely mechanical device that played perfectly.

💡

The first player (X) wins 58.5% of randomly played games, but with optimal play neither side can win.

💡

There are only 765 essentially unique board positions when you account for rotations and reflections.

💡

The center square participates in 4 of the 8 possible winning lines, making it the strongest opening move.

💡

There are 362,880 ways to fill the board, but only 255,168 possible games since many end before all cells are filled.

Tic Tac Toe Online Game Strategy for Winning

Tic Tac Toe is a solved game, meaning that with optimal play from both sides it always ends in a draw, and the center is the strongest opening because it sits on 4 of the 8 winning lines. The hard AI on AIFreeForever uses this exact logic, so beating it means you truly understand the strategy.

The strongest move is creating a fork, which is a position where you threaten two wins at once so the opponent can only block one and the fork guarantees victory. AIFreeForever designed the medium AI to occasionally miss forks so you can practice spotting them before stepping up to hard.

Tic Tac Toe Online Game in Education and Computer Science

Computer science courses use Tic Tac Toe to introduce the minimax algorithm because the game tree is small enough to solve by brute force. The hard AI on AIFreeForever is built on the same principle.

In math education, Tic Tac Toe teaches spatial reasoning and thinking ahead. Those skills transfer directly to games like chess and Go. AIFreeForever improved on the typical browser version by adding sound feedback and move animations so the learning feels interactive, not static.

From the Developers

From the developers

Last Updated: July 3, 2026
100% Free Game Browser Based Game Developed by Experts Tested & Working
Rico Williams, Senior Developer at AIFreeForever.com
Rico Williams
Senior Developer at AIFreeForever.com
(5 years experience with React.Js, Html, CSS, Tool engineering)

We developed the Tic Tac Toe game on AIFreeForever because most browser versions are bare-bones HTML grids with no opponent intelligence and no way to track your progress. We built three AI difficulty levels using the minimax algorithm, added sound effects and move animations, and included a persistent scoreboard that follows you across sessions so every game feels like it counts.

Connect with us for questions, feature requests, or improvements:

What Users Say

Rated 4.8 out of 5 based on 144+ verified user reviews

L

Linkon Patrick

US · Jun 14, 2026

★★★★★

This app is over good to use thanks

M

Mike Baker

US · Jun 12, 2026

★★★★☆

Nice service, seems to be free to use, by watching a short ad. Seems to work as it should.

N

Neetu Parihar

IN · Jun 3, 2026

★★★★★

Awesome tool and great work by developers and the team. Salute to your hardwork and dedication dudes.

A

Artos Publishing

RS · May 22, 2026

★★★★★

The Aifreeforever is simple and easy to use. From the start I didn't have any problems. Especially, I like the opportunity to work with ChatGPT 5 with no limitations.

C

Curtis Baker

US · May 2, 2026

★★★★★

With all these ridiculous prices on the over hyped AI competitors. I can't thank you, Aifreeforever, enough! Thank you for looking out for "We The People!"

M

Mohsen

IR · Jun 10, 2026

★★★★★

it was best experience

Share Your Comments & Feedback

Enjoying Tic Tac Toe on AIFreeForever? Found a bug or have a feature idea? We would love to hear from you.