Home / Sokoban solver
Browser puzzle tool

Sokoban Solver Online for Small Box-Pushing Boards

This Sokoban solver lets you paste a small ASCII board, search legal pushes in your browser, and receive a move string when the board can be completed. It is designed for checking a puzzle layout, testing a custom level, or understanding why a board is invalid without uploading the board anywhere.

Use the Sokoban Solver

Enter one board using the symbols below. The tool checks the player, boxes, goals, walls, and simple corner deadlocks before it searches. Choose Solve board to start.

Keep spaces inside the board. A small board is safer and easier to read than a pasted screenshot.

Enter a board and choose Solve board.

Result

The move sequence and search details will appear here.

#Wall
@Player
$Box
.Goal
*Box on goal
+Player on goal

What the result means: the solver returns a direction string using U, D, L, and R. It counts walking and pushing moves separately so you can compare routes without treating every step as a box push.

How to use this Sokoban solver

  1. Draw the board as text, keeping one row per line and spaces inside the walls.
  2. Check that every box has a goal and that the board has exactly one player.
  3. Run the solver. A successful result shows the move string, total moves, pushes, and states checked.

The search happens locally in the page. No board is sent to a server, and the page does not need a download, account, or installer. For a larger puzzle, use the returned sequence as a clue and continue the reasoning manually rather than forcing the browser to search an enormous state space.

Sokoban board format

The solver accepts the common compact symbols used by ASCII box-pushing levels. A space is walkable floor, while a hash is a wall. The player and boxes must be placed on walkable cells. Use a goal under a box or player when you need to show a completed square.

SymbolMeaningUse it when
#WallThe cell cannot be entered.
spaceFloorThe player or a box can occupy the cell.
.GoalA box should finish on this cell.
$BoxA movable box is on ordinary floor.
@PlayerThe starting player position.
*Box on goalA box already occupies a goal.
+Player on goalThe player starts on a goal.

Example input and output

#####
# . #
# $ #
# @ #
#####

What to expect

This one-box example needs one upward push. More complex boards may contain several walking steps before each push. The output is a compact direction string, so copy it into a note if you want to replay the route in a game.

When the search cannot prove a route within its safe limit, that is not the same as proving the level impossible. Reduce the board or use the strategy in the Sokoban levels guide.

Supported boards and limits

This is a small-board Sokoban solver, not a promise of a shortest solution for every published level. It uses a bounded browser search and prunes obvious non-goal corner deadlocks. The limits keep the page responsive on desktop and mobile devices.

CheckCurrent boundaryWhat happens at the boundary
BoxesUp to 4The page returns a clear size message instead of running indefinitely.
Board shapeUp to 16 rows × 24 columnsUse a smaller cropped board for a focused test.
Symbols#, space, ., $, @, *, +Other characters are rejected so a typo does not change the puzzle silently.
Search states120,000 visited statesThe result reports that the safe search limit was reached.

A deadlock can be more subtle than a box in a corner. Two boxes can seal a corridor, a goal can occupy the only standing square, or a player can lose access to the correct side of a box. The solver catches simple corners, but its limit message is a reason to inspect the board—not a guarantee that the puzzle has no mathematical solution.

Use the solver when you have a compact board representation and want a concrete route. Use the What Is Sokoban? guide when you need the rules and deadlock vocabulary, and use the Zeek the Geek walkthrough when you are playing a specific Part One level. You can also play a Zeek puzzle pack online after checking a route here.

Sokoban solver FAQ

What is a Sokoban solver?

It is a search tool that explores legal box pushes and returns a route when every box can reach a goal. This page works on small ASCII boards directly in the browser.

Can it solve every Sokoban level?

No. It is intentionally bounded to keep the page responsive. Large or difficult levels may need a dedicated solver, a smaller test position, or manual reverse planning.

Why do boxes and goals have to match?

A standard Sokoban board needs one goal for each box. If the counts differ, the input is not a complete board for this solver.

Does the board leave my browser?

No. The search runs in the page with JavaScript. The board is not uploaded by this tool.

Where can I learn the strategy behind the moves?

Read the Sokoban levels guide for goal order, standing squares, and deadlocks, then test the idea with a small board here.

Ready to test a board?

Paste a small ASCII level, solve it locally, and compare the result with your own route planning.

Open the solver