Sokoban

Sokoban - Push the Boxes

Moves: 0Pushes: 0Boxes: 0/0Best: -

How to play: Use WASD or arrow keys to walk. Walk INTO a box to push it (only if the space behind is empty). Push every box onto a target square (marked with a glowing dot) to win the level. Z or the Undo button reverses your last move. Mobile: use the directional buttons. Best move count saves locally per level.

About Sokoban

Sokoban (Japanese for “warehouse keeper”) is a transport puzzle invented by Hiroyuki Imabayashi in 1981. You play a worker in a warehouse who must push boxes onto target spots. The catch: you can only PUSH, never pull, and only one box at a time. Boxes can’t be pushed against walls or other boxes. One careless push can ruin a level by trapping a box in a corner. The game looks simple but it’s been mathematically proven PSPACE-complete — some Sokoban puzzles are genuinely as hard as any computational problem.

Our online version ships with 10 hand-crafted levels, full undo, and per-level best-move tracking saved locally.

How to Play

  1. Use WASD or arrow keys to walk through the warehouse.
  2. Walk INTO a box to push it. The space directly behind the box must be empty.
  3. Boxes turn green when sitting on a target square.
  4. Push every box onto a target to clear the level.
  5. Press Z or click Undo to reverse moves — use it freely.
  6. Use the level dropdown to pick any unlocked level. Best-move count saves per level.

Strategy Tips

  • Plan from the targets backward. Look at where boxes need to END, then figure out the order to push them there.
  • Beware of corners. A box pushed into a corner that isn’t a target is permanently stuck — hit Reset.
  • Beware of walls. A box pushed against a wall (where the target isn’t on that wall) often becomes unreachable.
  • Order matters. Sometimes you must place certain boxes first because their targets are blocked by other boxes’ future paths.
  • Undo is your friend. Sokoban tournaments use undo freely — it’s not cheating, it’s how the puzzle is played.
  • Look for one-way paths. Some squeezes only work in one direction. Identify them early.

A Brief History

Hiroyuki Imabayashi created Sokoban in 1981 at Thinking Rabbit, a Japanese puzzle company. It’s been ported to virtually every platform that has a screen — PCs, consoles, calculators, even watches. Mathematicians have studied it: deciding whether a Sokoban level is solvable is PSPACE-complete, putting it in the same complexity class as some of the hardest computational problems known. The Sokoban community has produced thousands of fan-made levels, with some 50,000+ puzzles published over the decades.

Frequently Asked Questions

Can I pull boxes?

No. You can only push. This is the core constraint that makes Sokoban hard.

Can I push two boxes at once?

No. If a box is directly in front of another box, you cannot push the first one (it would need to push the second, which Sokoban doesn’t allow).

What if I get a box stuck in a corner?

Hit Undo (Z) repeatedly to back out, or click Reset to restart the level. Stuck boxes are unrecoverable.

Are all levels solvable?

Yes. Every level has at least one solution. Some have many solutions with different move counts.

How does the move count compare across levels?

Optimal solutions for these levels range from about 15 moves (easy levels) to 60+ moves (hardest). The best-move tracker shows your record per level.

Can I play on mobile?

Yes. A directional pad appears below the canvas on touch devices.

What’s the difference between moves and pushes?

A move is any step you take. A push is a step where you also push a box. Tournament Sokoban scores tracks both — lower is better in either.

Why are some levels so much harder than others?

Sokoban difficulty depends on tightness of the level (how much room you have), number of boxes, and how interlocked their targets are. The hardest levels often have only a single solution path.


Skip to Accessibility Panel