How to play dots and boxes
Dots and boxes is a pencil-and-paper game for two or more players. You start with a grid of dots, and players take turns drawing a single line between two dots that sit next to each other. Whoever draws the fourth and final side of a square claims that square, or “box,” and then must draw another line. When every line has been drawn, the player with the most boxes wins. You may know it as the dot game, boxes, or squares; many people first played it on the back of a school notebook or a restaurant placemat.
On this page you can play dots and boxes online against the computer at three levels, or pass one phone, tablet or computer around for a game with two, three or four people. Nothing to download and no account needed.
Drawing lines

On your turn, draw exactly one line in any empty spot. A line always connects two dots that are next to each other horizontally or vertically. Diagonal lines are not allowed, and neither is a long line that stretches past a dot. On the game board, the empty spots are shown as faint dotted lines. You don’t need to tap precisely on the dots: the line closest to where you click or tap is drawn, which makes the game comfortable to play with a finger on a small screen.
Completing a box

When a line completes all four sides of a box, the player who drew that fourth side claims it. The box is shaded in that player’s color and marked with their symbol (● ▲ ■ ◆), so the score is easy to see even for color-blind players. Completing a box earns you another move right away. This extra move is not optional: you must draw another line. If that line completes another box you go again, and your turn only ends when you draw a line that doesn’t complete a box. A single line can finish two boxes at once, and then you claim both.

The move to avoid is the third side of a box. Once a box has three sides, the next player simply adds the fourth side and takes it. In the early part of the game, good players only draw “safe” lines: lines that don’t give any box its third side.
How the game ends and who wins

The game ends when the last line is drawn and every box has an owner. Count the boxes; the player with the most wins. On a board with an odd number of boxes, such as 3×3 or 5×5, a two-player game can never be a tie. On 4×4 and 6×6 boards the score can finish level, and the game is a draw.
Dots and boxes rules and variations
Because it’s a paper game, dots and boxes has never had one official rulebook, and players usually agree on the board size and small details before they start. You can pick one of these four setups, or choose Custom to combine a board size from 3×3 to 6×6 boxes with the taking rule and border option you like.
| Setup | Boxes | Taking | What it’s like |
|---|---|---|---|
| Standard | 5×5 (25) | Optional | The most common size, with plenty of room for strategy |
| Small board | 3×3 (9) | Optional | Over in a few minutes; great for learning |
| Large board | 6×6 (36) | Optional | Long chains appear, so games are deeper |
| Must take boxes | 5×5 (25) | Required | No declining boxes, so it’s simple to follow |
Under the standard rules you are never forced to take a box. If a box has three sides, you may complete it or draw a line somewhere else instead. That freedom is what makes the double-cross strategy below possible. With “Must take boxes,” whenever a box can be completed you have to complete it (the game won’t let you draw anywhere else). It’s a friendly way to play with younger players or anyone trying the game for the first time.

Another popular house rule is to draw the whole outer border before the game begins. Those lines belong to nobody, and players only fill in the inside. Because the edge boxes already have one or two sides, safe moves run out much sooner and the fight over boxes starts early.
Dots and boxes strategy: tips to win
1. Never draw the third side of a box
This is the foundation of every other tip. Before you draw a line, look at the one or two boxes it touches and count how many sides each already has. If both have one side or fewer, your line brings them to at most two, and it is safe. If either box already has two sides, your line hands it to your opponent.
2. Take free boxes, then check your next line
When your opponent leaves a box with three sides, it’s usually right to take it. Remember that you must draw again afterwards, so before you grab everything in sight, check whether a safe line will still be available once you have finished.

3. When safe lines run out, give away the shortest chain
Sooner or later every safe line is gone and any move gives something away. By then the board has usually split into corridors of boxes called chains. Draw one line into a chain and your opponent can complete the boxes one after another, all the way to the end. If you have to open something, open the shortest chain, so you lose as few boxes as possible.

4. Use the double-cross
This is the move that separates beginners from experienced players. Suppose your opponent opens a long chain. If you take every box, you then have to draw another line, and that line opens the next chain for your opponent. Instead, take all but the last two boxes, then draw the line at the far end of the chain, leaving a two-box domino with three sides on each box. Your opponent takes those two boxes with one line, but must then move again and open the next long chain for you. You give up two boxes to win control of everything that follows. The single line that takes both boxes is called a double-cross, and the trick of declining the last two boxes is often called “all but two.”
Short chains of one or two boxes work differently: there is no room to leave two boxes behind, so whoever opens a short chain keeps control. That is why experienced players care so much about which chains are long (three boxes or more) and which are short.
5. Count ahead with the long chain rule
When both players know the double-cross, the game is usually decided by who is forced to open the first long chain. Mathematicians summed this up as the long chain rule: on a board with an even number of dots, such as 5×5 boxes (6×6 dots), the player who moves first wants the number of long chains to be even, and the second player wants it to be odd. In practice, count the safe moves left and try to make sure you draw the last one. You can adjust the count early by creating or breaking up a chain, or even by giving away a single box on purpose to change the turn order.
6. Practice on the small board
A 3×3 game takes only a few minutes, which makes it perfect for trying out chains and the double-cross. Use the Hint button whenever you are unsure: a blue dotted line shows the move the computer would choose after looking several moves ahead.
Dots and boxes FAQ
Do you have to draw another line after completing a box?
Yes. Completing a box always gives you another move, and you cannot pass. That rule is what makes the endgame interesting: sometimes every remaining line gives boxes to your opponent, and you still have to draw one.
Do you have to take a box when you can?
Not under the standard rules. You may leave a three-sided box and play elsewhere, and the double-cross depends on exactly that choice. If you prefer a simpler game, choose the “Must take boxes” setup.
Which computer level should I choose?
If you are new to the game, start with Easy. It often misses boxes it could take, sometimes draws a third side by mistake, and has no plan for the endgame. Normal usually knows the double-cross but still overlooks a free box now and then. Hard looks several moves ahead and tries to arrange the chains so that you are the one who has to open the long ones. It rarely slips, so keep a close eye on how long each chain is.
Can three or four people play?
Yes. Choose “Friends” as the opponent and pick the number of players, and two to four people can share one screen and take turns. The order is red, blue, green, then yellow. The name tags above the board and the colored frame around it show whose turn it is. If you stop in the middle, you can pick up where you left off with Continue, as long as you use the same browser on the same device.
Can I undo a move or get a hint?
Turn Undo on in the settings, and the Undo button takes back your lines one at a time (any lines the computer drew in between are taken back too). The Hint button shows a suggested line as a blue dotted line. The number of hints and undos you used appears on the result screen.
What is the best first move in dots and boxes?
Early in the game almost every line is safe, so the first few moves matter less than they seem. What matters is the shape the board takes as safe moves run low. Try to steer the position toward the number of long chains that suits you, and avoid creating a long chain that you will be forced to open.
The history of dots and boxes
The earliest known description of dots and boxes comes from the French mathematician Édouard Lucas, who published it in the late 19th century under the playful name la pipopipette. Lucas is also remembered for another puzzle that you can play on this site, the Tower of Hanoi. Since then the game has spread around the world under many names. In German-speaking countries a similar game is played on squared paper as Käsekästchen, “little cheese boxes.”
It looks like a simple doodling game, but it attracted serious attention from mathematicians in the 20th century. Elwyn Berlekamp, John Conway and Richard Guy analyzed it in their book Winning Ways for Your Mathematical Plays, and Berlekamp later wrote a whole book about it, The Dots and Boxes Game: Sophisticated Child’s Play. Chains, the double-cross and the long chain rule all come from that work. Even today, perfect play on large boards is not fully known, so there is always something new to discover, whether you are playing a quick game on the small board or a long battle on 6×6.