Sokoban

Push every box onto a target square without boxing yourself in.

Sokoban drops you into a cramped warehouse drawn on a grid. Boxes sit on the floor, marked target squares are scattered around, and you play the keeper who walks up, down, left and right. You move a box by walking into it, but you can only push, never pull, and only one box at a time. The round is won when every box rests on a target square. The trap is that walls and boxes never forgive a mistake. Shove a crate into a corner, or flat against a wall where no target waits, and it is stuck for good, because you cannot pull it back out. So Sokoban is really a planning puzzle: you picture the whole route each box will take before you touch it, and often clear the crates in a careful order so that freeing one does not wall off another.

You can play Sokoban free in your browser here - a warehouse grid of walls, boxes and target squares. It is rated logical and moreish, and every bundled level is solvable - reset any time you get stuck. Choose from Easy, Medium or Hard. Your best times and solve counts save automatically, and you can take on the daily challenge whenever you like.

Time0:00
Moves0
Rate Sokoban:

How Sokoban works

In short: Push every box onto a target square without boxing yourself in. The play area is a warehouse grid of walls, boxes and target squares, it is rated logical and moreish, and every bundled level is solvable - reset any time you get stuck.

Key facts about Sokoban

ObjectivePush every box onto a target square. The level is finished the moment all the marked squares are covered, no matter which box ends up on which target.
Play areaA warehouse grid of walls, boxes and target squares
DifficultyLogical and moreish
SolvabilityEvery bundled level is solvable - reset any time you get stuck
Board optionsEasy, Medium, Hard
CategoryLogic puzzle

Learn Sokoban in five steps

The goal - Sokoban

The goal

Push every box onto a target square. The level is finished the moment all the marked squares are covered, no matter which box ends up on which target.

Moving the keeper - Sokoban

Moving the keeper

Use the arrow keys or tap a direction to walk one square at a time. You can only step onto empty floor or a target square, never through a wall or a box.

Pushing a box - Sokoban

Pushing a box

Walk into a box to push it one square ahead of you. There must be empty floor on the far side, you can never pull a box back, and you can only push one crate at a time.

Avoiding dead ends - Sokoban

Avoiding dead ends

A box shoved into a corner, or pinned along a wall away from any target, can never move again. Think through a box's whole path before you commit to the first push.

Winning and resetting - Sokoban

Winning and resetting

Cover every target to solve the level. If you box yourself into a hopeless position, reset and start the layout over, since every bundled level has a clean solution.

Where Sokoban came from

Sokoban was created by Hiroyuki Imabayashi and published in Japan in 1982 by his company Thinking Rabbit. The name means warehouse keeper, and the whole game grew from the plain idea of a worker pushing crates into place on a storeroom floor.

The game arrived first on the Japanese home computers of the early 1980s and spread steadily from there, appearing on machine after machine as programmers rebuilt it and designed fresh level packs. Its clean rules and tiny screen footprint made it easy to carry from one platform to the next.

Over the years Sokoban became far more than a pastime. Its deceptively simple pushing puzzle turned out to be a genuinely hard problem, and it is now a standard example in the study of automated planning and search, a rare case of a warehouse game earning a place in computer science textbooks.

Tips to solve Sokoban faster

💡 Best move: Best move: plan each box's full route to a target before you push it once, because a crate you cannot pull is a mistake you cannot take back.

  1. Clear the boxes in an order that keeps your lanes open, since freeing a crate that later blocks a doorway can trap the ones behind it.
  2. Keep crates off the walls until the final push, because a box flat against a wall can only slide along that wall, so save the move for when the target sits on the wall too.
  3. Never push a box into a corner unless a target sits in that corner, as corners are permanent and one stuck crate loses the whole level.
  4. Make sure you can get behind each box first, because to push a crate north you have to stand south of it, so check you can actually reach the pushing side.
  5. When a level feels jammed, work backwards from the targets: picture each box already home and ask which square it must have been pushed from.

Sharper tactics for Sokoban

  1. Learn to spot dead squares, the cells where a box could never reach a target again, such as most corners and long stretches of wall. Mentally shade them and refuse to push a crate there.
  2. Watch for frozen pairs, where two boxes side by side against a wall lock each other in place. Reading those traps before they form is the heart of expert play.
  3. Order matters more than speed. Sketch a sequence in which no crate ever has to cross a square another crate still needs, and the level unravels without backtracking.
  4. Treat the keeper's position as a constraint, not an afterthought. Sometimes you must send a box the long way round simply because it is the only side you can push from.
  5. On packed levels, park spare boxes on neutral floor to open a lane, then bring them home last. A temporary detour is often the only route through a tight room.

Mistakes that trip people up

  • Pushing boxes before you plan - a crate you cannot pull is a mistake you cannot take back, so trace each box's full route to a target first.
  • Shoving a box into a corner with no target there - corners are permanent, so never push a crate somewhere it can never move again.
  • Clearing crates in a careless order - freeing one box can block the path another needs, so solve them in a sequence that keeps your lanes open.
  • Forgetting you need room behind a box to push it - to push a crate one way you must stand on the opposite side, so check you can reach the pushing square.

Ways to play Sokoban

Classic Sokoban

The original single-keeper game where crates move one at a time on a walled warehouse grid, the form every later version is measured against.

Multi-box packs

Larger levels crammed with many crates and tight corridors, where the order you clear the boxes in becomes the whole puzzle.

Themed skins

Versions that dress the crates and keeper as robots, animals or holiday parcels while keeping the exact push-only rules underneath.

Puzzle twists

Fan-made variants add ice floors that slide a box until it hits something, one-way tiles or portals, bending the classic rules into new challenges.

Sokoban questions, answered

What does the word Sokoban mean?

Sokoban is Japanese for warehouse keeper, which is exactly the role you play. You are the worker pushing crates into their proper storage spots on the warehouse floor, and the whole puzzle is built around that simple job.

Can you pull boxes in Sokoban?

No. You can only push, and only one box at a time, with empty floor needed on the far side. This one-way rule is what makes Sokoban hard, because a crate shoved somewhere wrong can never be dragged back out.

Why is my box stuck?

A box in a corner, or pressed flat against a wall with no target along that wall, can never move again. Since you cannot pull, those positions are permanent, and the usual fix is to reset the level and plan a different route.

Is every Sokoban level solvable?

Every level we bundle has a known, complete solution, so a win is always possible. You can, however, push yourself into a hopeless position, in which case resetting the layout returns you to a solvable start.

What is the best way to start a level?

Study the board before you move. Trace the path each box needs to a target and decide the order to clear them, because the first careless push is often what dooms a level several moves later.

How are the difficulty levels different?

Easier levels use fewer boxes and more open floor, so mistakes are simpler to avoid. Harder levels pack in more crates, tighter corridors and traps where the exact order of your pushes decides everything.

Is Sokoban used in computer science?

Yes. Beyond being a beloved puzzle, Sokoban is studied as a hard search problem, and finding a solution in general is known to be very demanding for computers. It is a popular test bed for planning and artificial intelligence research.

Still curious about Sokoban? Browse the full puzzle FAQ, look up a term such as logic puzzle in the puzzle glossary, or compare Sokoban with the other games in the rules for every puzzle.

Last updated .

More puzzles to try

Slide Puzzle
Slide the numbered tiles into order around one empty square.
Sliding · Easy to learn, hard to master
2048
Swipe to slide tiles, merge matching numbers, and build the 2048 tile.
Sliding · Simple rules, deep endgame
Lights Out
Press cells to flip lights and their neighbours until the whole grid is dark.
Logic · A true logic puzzle
Tower of Hanoi
Move a stack of graduated discs to another peg, never resting a big disc on a small one.
Logic · Elegant and logical
Nonogram
Use the number clues to fill the right cells and reveal a hidden picture.
Logic · Deductive and rewarding
Memory Match
Flip cards two at a time and remember where each symbol hides to make every pair.
Memory · Relaxing but sharp
Block Puzzle
Drag shaped blocks onto the grid and clear full rows and columns before you run out of room.
Blocks · Easy to start, endless to master
Flood It
Flood the whole board with one colour, spreading from the corner in as few moves as you can.
Color · Quick and clever
Word Search
Hunt hidden words in a grid of letters, running in any direction.
Word · Relaxing and searchable
Water Sort
Pour the colours between tubes until each tube holds just one.
Color · Relaxing but tricky
Klotski
Slide the blocks aside to free the big square through the exit.
Sliding · A sliding-block classic
Simon
Watch the colours flash, then repeat the ever-growing sequence.
Memory · A memory endurance test
Rush Hour
Slide the cars and trucks out of the way to drive the red car to the exit.
Sliding · A sliding logic jam
Dot Connect
Connect each pair of coloured dots and fill the whole grid, no crossings.
Logic · Connect-the-dots logic
Peg Solitaire
Jump pegs over each other to remove them, aiming to leave just one.
Logic · A classic board puzzle
Word Scramble
Rearrange the jumbled letters to spell each hidden word.
Word · A quick word game