On this page: Rules · Is it a draw? · Easy, Medium and Hard · Buttons and scores · Strategy · FAQ
Tic Tac Toe 4x4 rules: get 4 in a row
Tic Tac Toe 4x4 is a game for two players, X and O, on a board of 4 rows and 4 columns. You win by filling a whole row, a whole column or one of the two long diagonals with your marks. The board has 10 such lines: 4 rows, 4 columns and 2 diagonals.
- X and O take turns marking one empty square. A mark stays where you put it.
- Four of your marks in a row, a column or a long diagonal win the game at once. This page draws a line through them.
- Three in a line wins nothing. You need all four squares.
- If all 16 squares are full and nobody has four in a line, the game is a draw.
- Who moves first switches with every new game.


Other 4x4 rules
Not every 4×4 game uses these rules. Wikipedia's article on tic-tac-toe says a 4×4 win can also be four in a diamond or four marks that make a square. This page counts only straight lines, with no squares, corners or diamonds. Marks never vanish here; the version where the oldest mark disappears is on the Infinite Tic Tac Toe page and is played on a 3×3 board. The classic 3-in-a-row game is on the home page.
Is 4x4 Tic Tac Toe a draw?
With perfect play, 4x4 Tic Tac Toe is a draw. We checked it ourselves: a complete game-tree search on this page's rules (it visited 9,009,914 positions) finds no forced win (a win the other side can't stop) for either side, and every one of the 16 opening squares leads to a draw. Jos Uiterwijk's 2019 paper on 4-in-a-row, which solved boards by computer search, lists 4×4 as a draw too, along with 4×5 through 4×8. The first board with four rows where the first player wins is 4×9.
Real games don't always end level, because the AI levels don't play perfectly and people don't either. In 100,000 games where both sides picked squares at random, with X moving first every time, X won 31.6%, O won 26.8% and 41.6% were draws. A game lasted 14.6 moves on average out of a possible 16, 52% filled the whole board, and the shortest took 7 moves.

Easy, Medium or Hard: how the AI plays
With vs AI picked, you play the computer. You are X unless you pick O next to Play as; that switch waits for the next game. With 2 Players picked, two people share one phone, tablet or computer. There is no network play, so you can't play someone on another device. The first move changes sides with every new game.
| Level | How the AI picks a square | In our test games on 4×4 |
|---|---|---|
| Easy | Random, among the squares next to marks already on the board. It does not look for wins or blocks. Its first move is the square at row 3, column 3. | Won none of 100 games against Hard (lost 89, drew 11) and none of 400 against Medium (lost 346, drew 54). Against a player clicking squares at random: won 53 of 200, drew 82, lost 65. |
| Medium | Takes a win when it has one, blocks your four when you have three and the fourth square is open, otherwise picks at random among its three best-scored squares. | Won 346 of 400 games against Easy and drew 54. Drew all 400 against Medium. Against random clicks: won 165 of 200, drew 35, lost none. |
| Hard | The same win and block checks, then a search ahead for up to 0.7 seconds. | Won 89 of 100 games against Easy and drew 11. Drew all 100 against Medium and all 20 against Hard, every one of them the same game on our test machine. Against random clicks: won 180 of 200, drew 20, lost none. |
Easy suits learning the rules. Hard never lost in these tests, but it is a time-limited search, not a proved perfect player, and we have not measured it against strong human players. Its first three moves use the full 0.7 seconds: across 320 Hard moves in 40 games, the median thinking time was 7 ms, the 95th percentile 701 ms and the longest 702 ms, and from the 9th move of a game on it needed 10 ms or less. The board still waits about 0.35 seconds before it shows any AI move. We ran the games with this page's game code in Node.js on an Intel Xeon E5-2696 v3.

Tic Tac Toe 4x4 strategy
One of your opponent's marks in a line ends that line for you, and the board has only 10 lines.
- The 4 corners and the 4 middle squares each sit on 3 lines. The 8 edge squares sit on 2. We counted this from the 10 winning lines.
- When your opponent has three in a line and the fourth square is empty, take that square now. When you have three, take the fourth.
- Aim for two lines that each hold three of your marks and an empty fourth square. Your opponent can block only one. Hard treats two open threats as lost for the side that faces them.
- Against a careful opponent, expect a draw.
In short: you need all four squares of a line, so block threes and build two threats at once. The game at the top of this page starts on Medium; switch to Easy to learn the rules first, or try the 5×5 board, which also needs 4 in a row.
Tic Tac Toe 4x4 FAQ
How do you win Tic Tac Toe 4x4?
Fill a whole row, a whole column or one of the two long diagonals with your marks. Four in a line wins at once; three in a line wins nothing.
Is 4x4 Tic Tac Toe a solved game?
Yes. With perfect play from both sides it is a draw. We ran a complete game-tree search on this page's rules, which visited 9,009,914 positions, and found no forced win for either side. Jos Uiterwijk's 2019 paper "Solving Strong and Weak 4-in-a-Row" reports the same draw from its own computer search, and finds that boards with four rows stay drawn up to 4×8.
Does the first player always win 4x4 Tic Tac Toe?
No. In our search, all 16 opening squares lead to a draw when both sides play perfectly. When both sides pick squares at random, the first player does a little better: in 100,000 games with X first, X won 31.6%, O won 26.8% and 41.6% were draws.
Can you play 4x4 Tic Tac Toe against the computer?
Yes. Pick vs AI and choose Easy, Medium or Hard. Hard searches ahead for about 0.7 seconds at most per move.
Can two people play 4x4 Tic Tac Toe on one device?
Yes. Pick 2 Players and pass the phone, tablet or computer between turns. There is no network play, so this page can't connect two devices.
Is Tic Tac Toe 4 in a row the same as Connect Four?
No. On this page you can mark any empty square of a 4×4 board, and marks stay where you put them. The goal of four in a row is the same idea, but the board and the way you place marks are different.
Do squares, corners or diamonds count as a win?
Not on this page. Only four in a straight line win: a row, a column or a long diagonal. Wikipedia's article on tic-tac-toe says some 4×4 versions also count a diamond or a square, so check the rules before you play elsewhere.
Does the game save my score?
Yes, in this browser on this device. There is one score for each level and one for 2 Players, and they stay after you close the page. If your browser blocks site storage, nothing is saved, and a private window forgets the scores when you close it.
Does Tic Tac Toe 4x4 fit on a phone screen?
In an emulated 390×844 phone window the whole board fits, with squares 89 px wide and no sideways scrolling. We have not tried it on a real phone.
Last checked on : a script clicked through five games against Easy (all won), one against Medium (a draw) and one against Hard (lost, clicking at random), and we played two full 2 Players games, in headless Chrome at 1280×800. We also checked the board in an emulated 390×844 window. The test games, the 100,000 random games and the 9,009,914-position search ran on this page's game code in Node.js 24 on an Intel Xeon E5-2696 v3.
Sources, read on November 16, 2026: Jos W.H.M. Uiterwijk, "Solving Strong and Weak 4-in-a-Row", IEEE Conference on Games 2019 (4×4 to 4×8 are draws, 4×9 is a first-player win); Wikipedia, "Tic-tac-toe" (diamond and square wins on 4×4).