7x7 Tic Tac Toe: get 4 in a row, free vs the AI or a friend

7x7 tic tac toe is tic tac toe on a 7×7 board, 49 squares. On this page four in a row wins, and you can play it in your browser, free and with no account, against the AI on three levels or with a friend on the same device.

More games

On this page: Rules · Easy, Medium and Hard · Buttons and scores · Strategy · FAQ

7x7 tic tac toe rules: how to play

7x7 tic tac toe is a game for two players, X and O, on a board of 7 rows and 7 columns. On this page, you win by placing four of your marks in a row, across, down or diagonally. If all 49 squares fill up with no four in a row, the game is a draw.

  1. Players take turns placing one mark on any empty square.
  2. Four marks in a straight line win at once. A line of five, six or seven also wins.
  3. Marks stay where they are; there is no moving or removing them.
  4. A full board with no winner is a draw.
7×7 board with X marks on the diagonal from row 3, column 3 to row 5, column 5, two O marks in row 3, and the text O's turn
X has three in a diagonal and both ends are empty. O can block only one end, so X completes four on the other.

This page always plays four in a row, and the How to play panel in the game says "Get 4 in a row on the 7×7 board".

7×7 board where X won with four marks on a diagonal, a line through them, three O marks beside the top X, the text X wins! and the score X 1, Draws 0, O 0
X wins with four on the diagonal in a 2 Players game. O's three marks, in the same row as X's top mark, did not make four.

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.

X opens the first game. After that, the first move changes sides with every new game, so in some games the AI moves first. The game starts on Medium; pick Easy or Hard to change it.

LevelHow the AI picks a squareIn our test games
EasyA random empty square next to a mark already on the board, or the centre on an empty board.Lost 20 of 20 against Hard and 200 of 200 against Medium.
MediumTakes a winning square, else blocks yours, else picks one of its 3 best-scoring squares at random.Won 200 of 200 against Easy; lost 19 of 20 against Hard.
HardTakes a win or blocks, then searches ahead for up to 0.7 seconds per move.Won 20 of 20 against Easy and 19 of 20 against Medium.

New to four in a row? Start on Easy: it plays a random square next to the marks on the board.

Hard is the strongest choice on this page. In Node.js test runs, a Hard move took a median of 4 to 12 ms and at most 659 ms. In the browser we saw 656, 488, 1 and 0 ms on its four moves in one game. Hard has no guarantee of perfect play, and we have not measured it against expert human players.

7×7 board on a phone-sized screen where O won with four marks stacked in one column, a line through them, AI wins, and the score You 0, Draws 0, AI 1
A game against Hard on a 390×844 phone-sized screen (emulation). The AI built four in a column while we stacked marks beside it, and it finished first.

Undo, New game and scores

  • Undo takes back your last move. Against the AI it also removes the AI's reply. In 2 Players it takes back one move at a time. Once a game is over, Undo is off.
  • New game clears the board and starts the next game right away.
  • The Board button opens the picker below, so you can switch to another size, and the speaker button turns sound on or off.
  • On a keyboard, press Tab to reach the board, move with the arrow keys across the 49 squares, and press Enter or Space to play a square. Screen readers hear each square's row and column.
Board picker open over an empty 7×7 board, with Classic, Infinity, 4×4, 5×5, 6×6, 7×7 and 100×100 tiles and 7×7 selected
The Board picker. The 7×7 tile is selected.

The score line shows wins for each side and the draws. It is kept in this browser on this device, with one score for each level and one for 2 Players on the 7×7 board, and it is still there the next time you open the page. There is no account. If your browser blocks site storage, the score is not kept. The whole 7×7 board fit on a 390×844 phone screen at about 51 px per square when we loaded the game in emulation.

7x7 tic tac toe strategy

The centre square is on the most lines. A 7×7 board has 88 lines of four; the centre sits on 16 of them, and a corner on 3. Mark the middle squares early.

  • Build an open three: three in a row with an empty square at each end of the line. If your opponent can't win first, they can block only one end, and you complete four on the other.
  • Block your opponent's two in a row early when the line has room to grow, including two marks with one gap (O_O), before it becomes an open three, because blocking one end of an open three is not enough.
  • Look at diagonals and columns as well as rows; the winning lines in the shots above are a diagonal and a column.

On this page, going first helps. In 100,000 games of random moves on this page's rules code, the first mover won 53.5% and the other side 46.5%, and 0.04% were draws. A random game lasted 27.9 moves on average; the shortest win in the sample took 7 moves, and a full board took 49.

For the theory, Jos Uiterwijk's 2019 paper on 4-in-a-row solved these boards by computer search: four in a row is a first-player win on 5×6 and every larger board, 7×7 included, and a draw on 5×5. Wikipedia's article on m,n,k-games (games where two players take turns marking an m-by-n board and the first to get k in a row wins) lists the same results, and says that 7×7 with five in a row is a draw. Try 5×5, 6×6, 100×100 or the classic 3×3 game.

7x7 Tic Tac Toe FAQ

How many in a row do you need to win 7x7 tic tac toe?

Four. On this page, four of your marks in a row, across, down or diagonally, win the game. Five, six or seven in a row also win, because the line only has to be at least four long.

Who wins 7x7 tic tac toe with perfect play?

The first player. Jos Uiterwijk's 2019 paper "Solving Strong and Weak 4-in-a-Row" used a computer search to show that four in a row is a first-player win on a 5×6 board and on every larger one, and it also solved every board from 5×6 up to 10×10 directly as a win, 7×7 included. We did not repeat that search. With five in a row instead of four, 7×7 is a draw: Wikipedia credits that result to a 2018 computer search by Wei-Yuan Hsu and coauthors.

Can 7x7 tic tac toe end in a draw?

Yes. If all 49 squares fill up and nobody has four in a row, the game is a draw. Draws are rare on this page: in 100,000 games of random moves on its rules code, 36 were draws, and in 200 games of Medium against Medium, 6 were.

Does going first help on a 7x7 board?

Yes, on this page's game. In 200 games of Medium against Medium, the side that moved first won 168. Hard against Hard played the same 11-move game every time, and the first mover won it.

Can I play 7x7 tic tac toe against the computer?

Yes. Pick vs AI and choose Easy, Medium or Hard. In our test games Hard beat Easy 20 times out of 20 and beat Medium 19 times out of 20.

Can two people play 7x7 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 the page can't connect two devices.

Can I play 7x7 tic tac toe online?

Yes, in your browser. The game runs on this page, free and with no account, on a phone, tablet or computer. You play the AI or a friend sitting next to you.

What is the difference between 5x5, 6x6 and 7x7 tic tac toe here?

The board size. All three need four in a row. A 5×5 board has 28 possible lines of four, a 6×6 board has 54 and a 7×7 board has 88. With perfect play, 5×5 is a draw, and 6×6 and 7×7 are first-player wins, according to Uiterwijk's 2019 computer search.

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 on the 7×7 board. If your browser blocks site storage, nothing is saved.

Last checked on : we played one complete 2 Players game and opened the Board picker in Chrome at 1280×800, and played one game against Hard at 390×844 (emulation). The test games (20 each of Hard against Hard, Medium and Easy, 200 each of Medium against Easy and Medium against Medium) and the 100,000 random games 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 (5×5 is a draw; every board from 5×6 up to 10×10, 7×7 included, is a first-player win); Wikipedia, "m,n,k-game" (7×7 with five in a row is a draw, citing Hsu and coauthors, 2018).

Rate this game

Your rating