Free classic games for your browser

Dots and Boxes

Take turns drawing a line between two dots; close the fourth side of a box to claim it and move again.

Loading Dots and Boxes…

Dots and boxes is a pencil-and-paper game, also known as dots and squares, in which two players take turns drawing lines between neighbouring dots. Whoever draws the fourth side of a box claims that box and moves again. This free dots and boxes game runs online in your browser, with no download or sign-up: play against the computer or with a friend on the same device.

The board is a square grid of boxes, from 3×3 up to 6×6. You can choose one of three computer levels, Easy, Medium or Hard, or switch to two players. The game sends nothing over the network. Your board, your moves and your running score are kept in your browser, so they stay on your device.

How to play dots and boxes online

  1. Open Opponent and choose “vs Computer” (the default) or “2 players”, where two people take turns on one device.
  2. If you chose “vs Computer”, pick a Level: “Easy”, “Medium” (the default) or “Hard”. Then pick Who starts: “You start” (the default) or “Computer starts”.
  3. Choose a Board size: “3×3 boxes”, “4×4 boxes” (the default), “5×5 boxes” or “6×6 boxes”. Changing Opponent, Level, Who starts or Board size starts a new game.
  4. Draw a line by clicking or tapping anywhere inside a box next to the side you want. The game picks the nearest open side of that box, so you do not need to hit a thin line. With a mouse, the line under the pointer previews in your colour.
  5. To claim a box, draw its last open side. You keep the box and move again.
  6. Watch the stat chips and Boxes left. The chip of the player to move has an outline.
  7. If you are stuck, press Hint (H). It highlights the line the Hard computer would play, but it does not draw it, and it works only on your turn.
  8. Press Undo (U / Ctrl+Z) to take back moves. Press New game (N) to start again.

With a keyboard, the arrow keys move a blue cursor over the lines and box centres. Press Enter or Space to draw the cursor line. F turns on fullscreen, and Esc leaves it.

How does dots and boxes work?

Players take turns drawing one line between two neighbouring dots, either horizontal or vertical. A line that is already drawn cannot be drawn again, and a box is claimed only when its fourth side is drawn. A board of n×n boxes (a 4×4 dots and boxes board, for example) has (n+1)×(n+1) dots and 2n(n+1) lines, which gives 24, 40, 60 or 84 lines for boards of 3×3 to 6×6 boxes.

Dots and boxes game rules

When your line completes a box, you score it and must move again. One line can complete two boxes at once. That is worth 2 points, and the same player still moves again. A completed box is filled with its owner’s colour and marked with the owner’s initial. Player 1, who starts, is blue, and player 2 is orange.

The game ends when every line is drawn. The player with more boxes wins. If the scores are equal, the game is a draw. Draws are possible on 4×4 and 6×6 boards, because those have an even number of boxes (16 and 36).

Dots and boxes game strategy

A line is “safe” if it does not give the opponent a box, which means it does not leave any box with three sides drawn. Early in the game, play safe lines and avoid drawing a third side of a box. Each time you give away a box, your opponent can take it and move again.

Boxes that are linked in a row, each with two sides drawn, form a chain. Once one end of a chain is opened, the other player can take every box in it. Chains of three or more boxes are the ones that decide most games.

Dots and boxes winning strategy

Late in the game, every remaining line usually gives something away. The player who has to open the next chain normally loses control. The player in control takes all boxes except the last two, then makes the double-dealing move. That means drawing the far end of the chain, so the opponent can take only the last two boxes but must then open the next chain.

A line that completes two boxes at once is called a double-cross. A common rule for who wants control counts the dots together with the double-crosses. The first player wants that total to be even, and the second player wants it odd. The number of dots is (n+1)², which is 16, 25, 36 or 49 for boards of 3×3 to 6×6 boxes.

Dots and boxes strategy 4x4

A 4×4 board has 25 dots, 40 lines and 16 boxes, and it is the default size here. There are fewer lines than on larger boards, so the opening ends sooner. Count the chains as they form, and decide early whether you want an odd or even number of long chains, using the dot-count rule above. The Hard computer switches to exact endgame search earlier on this board than on bigger ones.

Dots and boxes strategy 5x5

A 5×5 board has 36 dots, 60 lines and 25 boxes. The opening lasts longer, and several chains can form before anyone has to open one. Keep a rough count of the chains of three or more boxes, and avoid opening a long chain while safe lines remain.

Dots and boxes strategy 6x6

A 6×6 board has 49 dots, 84 lines and 36 boxes. Most of the game is the opening, so the endgame comes late and is hard to plan from the start. Stick to safe lines, and check each new chain as it forms. On this board, Hard plays a random safe line in the opening, so its exact control comes only near the end.

Frequently asked questions

Is dots and boxes free, and do I need to sign up?

Yes, it is free. It runs in your browser, and the page does not ask you to create an account.

Can I play dots and boxes on a phone?

Yes. The board scales to the width of the screen, so it fits a 375 px phone. Tap anywhere inside the box next to the side you want, and the game picks the nearest open side for you. On a 6×6 board each side’s tap zone is about 50 px wide.

Is my dots and boxes game saved?

Yes. The game in progress is saved in your browser after every line, along with your settings. Your win, loss and draw tally is kept too, and New game does not reset it. Clearing your browser data removes both.

Can I play dots and boxes with a friend?

Yes. Set Opponent to “2 players”. You take turns on the same device, and the colours are blue for Player 1 and orange for Player 2.

Can I undo a move?

Yes. In 2 players, Undo takes back one line at a time, and you can repeat it. Against the computer, Undo removes the computer’s lines since your last line, then your last line, so you can change your last decision.

What does Hard do differently from Medium?

Hard plays everything Medium does, and it never draws a third side while a safe line exists. Once about 20 lines or fewer remain, it searches the rest of the game and gives up boxes in the order that keeps control.

More games

  • Tic Tac Toe is a short two-player game of marking a grid, a simpler contest than dots and boxes.
  • Reversi is a two-player board game in which you flip your opponent’s pieces to your colour.
  • Mancala is a two-player game of moving seeds around a row of pits.
  • Hangman is a word-guessing game for one player.
  • Dice Game is a game that depends on rolling dice.
  • Minesweeper is a one-player puzzle of clearing a grid while avoiding hidden mines.
  • Hearts: a trick-taking card game against three computer players where you avoid hearts and the queen of spades.