Play Sokoban Online

Push every crate onto a glowing goal. You can push but never pull, so one careless shove can leave a crate stuck for good. 100 levels in ten worlds, from the Beginner Cup to the Sky Cup, with barrels that slide and sand that gets in the way.

Created by Brian Hamilton

Moves
0
Time
0:00
Goals
0 / 0
Best
–

Arrow keys, swipe, or tap where you want to go

How to play Sokoban

Move the worker around the warehouse and push every crate onto a goal square. The level is finished the moment every goal has something on it.

  • Walk into a crate to push it one square. You cannot pull, and you cannot push two things at once.
  • Barrels are pushed the same way, but they keep sliding until a wall, a crate, another barrel or sand stops them.
  • Sand stops crates and barrels. You can walk on it, and it is gone once you have, so after that anything can be pushed across.
  • A barrel on a goal counts, just like a crate.
  • Finish quickly for a medal: every level has a gold, silver and bronze time. The clock starts with your first move. A level solved with a hint counts as done, but earns no medal until you solve it on your own.
  • Levels open one at a time, and a world opens when you have finished every level in the one before it.

Controls: arrow keys or W A S D to move, Z or Backspace to undo, R to restart. On a phone, swipe across the board to take one step, or tap any square to walk there; tap a crate next to the worker to push it. Hint restarts the level and plays the first third of a solution, then two thirds, then all of it. Your progress and best times are kept in this browser.

Nearly half the floor is a dead end for a crate

You can push a crate but never pull it, so some squares are traps: once a crate is on one, no run of pushes will ever get it to a goal. A corner is the obvious case. To move a crate out of a corner the worker would have to stand inside a wall to get behind it. Walls are the subtle case. A crate against a wall can still slide along it, but nothing can push it away from the wall again, so if there is no goal anywhere along that wall, the crate is finished the moment it touches.

Level 1 with every dead square crossed outLevel 1 at the start: two crates, two goals and the worker. Red crosses mark the 19 of its 43 floor squares from which a crate can never reach a goal: the nine corners, and the squares along walls that have no goal on them, including the whole top row. Neither crate starts on one.
Level 1, with its 19 dead squares crossed out. Nine are corners; the other ten line walls that have no goal on them, including the whole top row. Neither crate starts on one, and neither needs to go near one.

Measured on all 100 levels: of the 2,702 floor squares that are not goals, 1,231 are dead for a crate, which is 45.6%. 885 of them are corners and 346 lie along walls. In 57 levels at least two squares in five are dead. No crate starts on one, so every crate that ends up on a dead square was pushed there.

The count treats each crate alone and counts sand as floor, because you can always walk sand away. Other crates only make things worse.

The habit that follows: before you push a crate against a wall, look along the wall for a goal. If there is none, don't.

Two crates side by side against a wall are stuck for good

A dead square is about one crate on its own. Crates also trap each other. Put two crates next to each other along a wall and neither can move again: each could only be pushed sideways, along the wall, and to push either one the worker would have to stand where the other one is. The same goes for any two-by-two block made of crates, barrels and walls, as long as one of the pieces in it is off a goal. Sand does not count as a wall here, because the worker can stand on it.

Two crates side by side against a wallA small room with two crates touching each other along the top wall. Each crate could only be pushed sideways, and the square the worker would need to stand on is the other crate. Searching every position the worker can reach, 19 in all, neither crate ever moves.
Two crates touching along the top wall. We tried every position the worker can reach in this room, all 19 of them, and neither crate moves in any.
One crate against a wallThe same room with a single crate on the top wall. It can be pushed left or right along the wall, shown by arrows, but nothing can push it down off the wall, because the worker would have to stand inside the wall. It stays on the top row for good, and the top row has no goal.
One crate on the same wall can slide left and right, but it never leaves the top row, and there is no goal on it.

Neither picture looks like a disaster when you make the push, which is the danger. The cure is Undo, straight away: the moment a crate lands against another along a wall, take the push back. Undo has no limit and costs nothing but time.

Sand is a wall you remove by walking on it

Sand is one of two things this game adds to classic Sokoban. It stops crates and barrels dead, but the worker can walk on it, and once they have, it is gone. Level 2 teaches it. The first crate sits on the top row with three squares of sand between it and its goal. Push it straight away and it travels two squares and stops against the sand. Walk the worker across the sand first, and the same pushes run it all the way home.

Level 2 after the sand has been walked awayLevel 2 after 17 moves. The worker has walked across the three squares of sand on the top row, shown as dashed outlines, and is back beside the crate on that row. An arrow shows the crate pushed six squares to the goal at the end of that row. With the sand still there, the same pushes would have stopped the crate after two squares.
Level 2 after 17 moves. The sand on the top row has been walked off (the dashed squares), so six pushes take the crate onto the goal at the end of the row. With the sand still there, it would have stopped after two.

Clearing sand is not always right, though. In the stored solutions for the 37 levels that have sand, 65 of the 263 sand squares are still there when the level is finished, spread over seven levels, and 13 barrel pushes stop against sand. A patch of sand can be the stopper you need later. Walking on it cannot be taken back except with Undo, so before you cross it, ask whether anything will need to stop there.

A barrel stops only where something stops it

The other addition is the barrel. You push it like a crate, but it keeps rolling until the next square is a wall, a crate, another barrel or sand. That turns the usual question round. You do not choose how far a barrel goes; you choose what will be in its way.

Level 3 before its last moveLevel 3 after 41 moves: three barrels already sit on goals and the fourth is in the bottom row with the worker beside it. An arrow shows the last push: the barrel slides three squares left and stops on the corner goal, against the wall. The dashed square it crosses held sand, which the worker walked off at move 4; with the sand still there, the barrel would have stopped beside it, one square short of the goal.
Level 3 before its last move. The barrel slides three squares onto the corner goal and the wall stops it there. The dashed square held sand, which the worker walked off at move 4; left in place, it would have stopped the barrel one square short.

Walls do most of the stopping, which is why goals in corners and against walls are the easy ones for a barrel. A goal out on open floor needs a stopper put beyond it first, and getting the stopper there is usually the real puzzle.

What stopped the 135 barrel pushes in the stored solutions to the 100 levels. The average slide was 2.5 squares and the longest 14; 59 pushes moved the barrel just one square, because something was already waiting beyond it.
Stopped byPushesShareOf those, stopped on a goal
A wall8764%55
Another barrel1914%14
A crate1612%14
Sand1310%2

Ten worlds, and where they get hard

The levels come in ten worlds of ten, and a world opens when every level in the one before it is done. The early worlds teach sand and barrels; the last four are almost pure crate pushing, and much longer.

The ten worlds. Moves are for the stored solution the hint replays, as a median over the world's ten levels.
WorldLevelsCrates and barrelsWith barrelsWith sandMovesGold time
Beginner Cup1–101–576560:30
Forest Cup11–202–842470:27
Cave Cup21–302–733550:32
Desert Cup31–402–6710830:45
Glacier Cup41–502–747780:45
Mountain Cup51–603–34572232:15
Ruins Cup61–703–13111461:30
Clockwork Cup71–803–6011351:30
Harbor Cup81–904–6101822:15
Sky Cup91–1004–8001882:00

The jump comes in the Mountain Cup. Its last level, Level 60, has 34 pieces: 18 barrels that start on goals and 16 crates that have to be fitted in among them without knocking a barrel off. More pieces do not always mean a harder level, though. Across the whole game, 141 of the 474 crates and barrels start on a goal already, and leaving them there is often the point.

Race the clock, or watch the route

Every level has a gold, silver and bronze time, shown under the board, and the clock starts with your first move rather than when the level opens. Finish all ten levels in a world and your ten best times are added up for a cup: gold on the Beginner Cup is 6:40 for the lot. Your best times are kept in this browser.

Stuck? Hint restarts the level and plays the first third of a stored solution; press it again for two thirds, and a third time for all of it. It is the same route the app's hints use, and it is a route that works rather than the quickest. A complete search solves Level 6 in 25 moves where the hint takes 33, and Level 1 in 23 where it takes 24, so you can beat it. A level finished after a hint still opens the next one, but it earns no medal until you solve it on your own.

Sokoban, the warehouse keeper

Sokoban is Japanese for warehouse keeper (倉庫番). Hiroyuki Imabayashi wrote the first version, and his company Thinking Rabbit published it in 1982. Licensed versions have appeared under other names since, Boxxle on the Game Boy among them, and the whole family is often just called box-pushing puzzles. Deciding whether a Sokoban level can be solved at all is PSPACE-complete (Culberson, 1997), which is the formal way of saying there is no known shortcut past trying things.

The 100 levels here come from Cargo Shuffle, our own Sokoban game for Android, with the same ten worlds, sand and barrels. Get it on Google Play if you would like them on your phone. For other Sokoban apps worth installing, see our guide to the best Sokoban games.

Stuck on a Sokoban level from somewhere else? Paste it into the Sokoban solver, which finds the fewest pushes and plays the solution back step by step, or tells you the level cannot be solved.

More puzzles that punish a careless move

Choose a level