Push boxes onto goal squares — 20 levels from Easy to Expert
Sokoban is one of the most beloved logic puzzle games ever created, and its simple rules hide extraordinary depth. Invented in 1981 by Hiroyuki Imabayashi and published by Thinking Rabbit in 1982, the name 'Sokoban' comes from the Japanese word for 'warehouse keeper' (倉庫番). Your role is exactly that: a warehouse worker who must push wooden crates onto designated storage locations. The challenge? You can only push boxes, never pull them. And if a box gets pushed into a corner with no way out, you will need to undo your moves or restart the level entirely. This free browser implementation features 20 hand-crafted levels that progress from trivially simple to genuinely challenging expert puzzles. No account required, no downloads, and your progress is automatically saved in your browser so you can pick up right where you left off. The game works equally well on desktop with keyboard controls and on mobile devices with the on-screen directional pad. Every level has been designed to teach a new concept or technique, creating a natural learning curve that makes Sokoban accessible to newcomers while still engaging experienced puzzle solvers. What makes Sokoban so enduring after more than four decades? The game has exactly the right balance of accessibility and difficulty. The rules can be explained in thirty seconds: move the character using the arrow keys, push boxes onto the orange target squares, and solve the puzzle. Yet despite these simple rules, even seemingly small grids can harbor remarkably deep strategic challenges. Players must think not just about where to push a box, but about whether their current position will allow them to reach the correct pushing angle for every subsequent box. Planning multiple moves ahead is essential, and developing an intuition for which sequences of pushes are feasible is a skill that takes time to build. This implementation includes several features to make your experience as smooth as possible. An unlimited undo system lets you reverse any number of moves without restarting, which is critical for exploring different strategies without frustration. A goal-highlighting toggle brightens the target squares to help you visualize the end state. Deadlock detection identifies the common corner-trap scenario where a box can no longer be pushed to any goal, alerting you early so you can undo before digging deeper into an unsolvable state. The move counter and push counter let you track your efficiency; the push count in particular is a favorite metric among competitive Sokoban players because minimizing pushes requires a deeper understanding of the puzzle than minimizing total moves. Each level in this collection has been designed to introduce or reinforce a specific puzzle concept. The early levels (1-7) build foundational skills: pushing a single box onto a goal, repositioning before pushing, and managing multiple boxes without blocking yourself. The middle levels (8-14) add complexity with tighter spaces, multiple boxes that must be handled in a specific order, and the ever-present danger of trapping a box in an unreachable corner. The advanced levels (15-20) are for serious puzzle solvers who have internalized Sokoban fundamentals and are ready for intricate, multi-step solution paths. Sokoban has inspired decades of competitive play. The canonical 'Original' collection by Thinking Rabbit contains 90 levels, and the global Sokoban community has since created hundreds of thousands of additional puzzles. Top players compete on specialized websites to achieve the lowest possible move and push counts for each level — a pursuit that requires deep algorithmic thinking and careful planning. Our 20-level set follows the same progressive difficulty tradition, offering a complete and satisfying journey from the very first box push to expert-level mastery. Whether you are completely new to Sokoban or returning after years away, this game offers a clean, distraction-free puzzle environment that respects your time and intelligence. There are no advertisements interrupting gameplay, no paywall blocking later levels, and no artificial difficulty spikes designed to frustrate you into watching ads. Just pure, classic puzzle-solving at its finest.
Understanding Sokoban
What Is Sokoban?
Sokoban is a single-player logic puzzle game invented by Hiroyuki Imabayashi in Japan in 1981. The player controls a warehouse keeper on a grid-based map. The goal is to push all wooden crates (boxes) onto designated storage locations (goal squares marked with orange dots). Movement is orthogonal — up, down, left, or right — one cell at a time. Boxes can only be pushed, never pulled. If a box is adjacent to the player and the cell on the far side of the box is empty, the player can push the box by moving into it. If two boxes are adjacent, neither can be pushed in that direction. The level is complete when every box rests on a goal square. A position is a 'deadlock' when a box is trapped such that it can never reach any goal — the most common deadlock is a box wedged in a corner with walls on two perpendicular sides and no goal at that corner.
How Does the Game Work?
The Sokoban grid uses six distinct cell types encoded in the industry-standard XSB format: walls (#), empty floor (space), goal squares (.), the player (@), the player standing on a goal (+), a box ($), and a box already placed on a goal (*). Each move the player makes is validated against these rules: the destination cell must not be a wall; if a box occupies the destination, the cell beyond the box must be empty floor or a goal. The game tracks two separate counters: moves (every player step, including pushes) and pushes (only steps that displace a box). Win detection occurs when the count of boxes-on-goals equals the total number of boxes. The undo system stores a full grid snapshot before every move, allowing any number of moves to be reversed. Deadlock detection checks whether any non-goal box occupies a corner position — a box is in a simple corner deadlock when it is blocked by walls on one horizontal side AND one vertical side simultaneously.
Why Is Sokoban Good for Your Brain?
Sokoban is widely recognized as an excellent exercise in spatial reasoning, forward planning, and problem-solving. Unlike games of chance, Sokoban is entirely deterministic — every puzzle has a definitive solution, and finding it requires logic rather than luck. The game develops working memory, as players must mentally simulate multiple future states to evaluate whether a move is safe. It trains pattern recognition, helping players learn to identify dangerous configurations (potential deadlocks) before they occur. Research in artificial intelligence has studied Sokoban extensively as a benchmark for planning algorithms because it is PSPACE-complete — theoretically complex enough to challenge even sophisticated computer solvers. For human players, the satisfaction of solving a difficult level comes from the same cognitive machinery used in engineering, architecture, and strategic planning. Regular puzzle-solving has been associated with maintained cognitive flexibility and improved executive function.
Tips and Strategies
New Sokoban players quickly discover that the hardest part is not making moves — it is making the right moves in the right order. Here are key strategies to improve your game. First, always think about which side of a box you need to be on to push it to a goal, and plan your path to reach that position before pushing. Second, never push a box into a corner unless there is a goal there — corners are the most common deadlock trap. Third, when handling multiple boxes, think about which ones restrict the others and solve the most constrained boxes first. Fourth, use the unlimited undo feature freely — trying different approaches and backing out when they fail is a normal and effective strategy, not a sign of failure. Fifth, learn to recognize 'frozen box' patterns: a box that is blocked by both a wall and another box on perpendicular sides can be just as stuck as one in a corner. Sixth, if you feel stuck, step back mentally and count how many valid pushing approaches each goal square has — sometimes the puzzle has only one possible solution path.
How to Play Sokoban
Understand the Grid
The game board shows walls (dark squares), floor tiles (light beige), goal squares (orange dots), your character (blue circle), and boxes (brown crates). Your mission is to push every brown box onto an orange goal square to turn it green. The level is complete when all boxes are green.
Move and Push
Use the arrow keys or WASD on keyboard to move your character in any of the four directions. Walk into a box to push it — the box moves one square in the same direction as your movement. You cannot pull boxes, and you cannot push a box into a wall or another box. Plan your approach carefully before pushing.
Use Undo Freely
If you make a bad push, press U or Ctrl+Z to undo your last move, or click the Undo button. You can undo as many moves as you like all the way back to the start. If a box gets stuck in a corner with no goal there (the game will warn you), undo until the box is free or press R to restart the entire level.
Track Progress and Optimize
Your move count and push count are displayed at the top. Completing a level saves your best score to the browser. Try replaying levels to beat your best move count — this is where Sokoban's replay value shines. Use the Level Select panel to jump to any level and the goal highlight toggle (H key) to make target squares more visible.
Frequently Asked Questions
What is the difference between moves and pushes in Sokoban?
Moves count every step your character takes, whether you are just walking around or pushing a box. Pushes count only the steps where your movement displaces a box — so pushes will always be less than or equal to moves. Competitive Sokoban players often try to minimize both counters independently, and the two metrics can lead to very different optimal solution paths. Minimizing moves is generally easier to reason about for beginners; minimizing pushes often requires more sophisticated planning because you need to minimize how many times each box changes direction.
What is a deadlock and how do I avoid it?
A deadlock occurs when a box reaches a position where it can no longer be pushed to any goal square. The simplest and most common deadlock is a corner deadlock: a box wedged into a corner formed by two walls, with no goal square at that corner. Once a box is in a corner deadlock, the level cannot be completed and you must undo or restart. To avoid deadlocks, never push a box into a corner unless there is a goal there, and be cautious about pushing boxes along walls — a box stuck between a wall on one side and another box on the perpendicular side can be just as trapped as a corner deadlock.
Is my progress saved between browser sessions?
Yes. The game uses your browser's localStorage to save which levels you have completed and your best move and push scores for each completed level. This data persists across browser sessions as long as you use the same browser on the same device and do not clear your browser data. The data is stored locally on your device and is never uploaded to any server — there are no accounts or logins required. If you want to reset your progress, clearing your browser's site data for this page will erase the saved state.
Why can't I push two boxes at once?
This is one of the fundamental rules of Sokoban and the source of most of its strategic depth. When your character pushes a box, that box must be able to slide one square in the direction of the push. If another box occupies that destination square, the push is blocked — you cannot chain-push multiple boxes simultaneously. This rule forces players to carefully sequence their pushes so that boxes arrive at goals one at a time without blocking each other's paths. The inability to move multiple boxes at once is what makes Sokoban a planning puzzle rather than an action game.
How do the keyboard shortcuts work?
Arrow keys and WASD both move your character in the four cardinal directions. U or Ctrl+Z (Cmd+Z on Mac) undo the last move. R restarts the current level to its initial state. H toggles the goal-highlight feature, which brightens the orange target squares so they are easier to see. The question mark key (?) toggles the keyboard controls reference panel. You can also click the control buttons below the game grid for the same actions, and the on-screen D-pad appears automatically on smaller screens for mobile play.
What is the best strategy for harder levels?
For medium and hard levels, the most important skill is working backwards from the solution. Look at each goal square and ask: which direction must the box approach this goal from? That approach direction determines where you need to be standing to make the final push, which in turn constrains how you reach that position. For levels with multiple boxes, identify the most constrained box — usually the one with the fewest valid approach directions — and solve it first. Use the unlimited undo feature aggressively to explore different push sequences without fear of permanently ruining a level. If you feel completely stuck, try the goal-highlight toggle (H key) to make targets more visible and mentally walk through the end-state you need to create.