Home › Fun & Games › Sokoban

Sokoban

You are the warehouse keeper: push every crate onto a green goal square. Crates can only be pushed, never pulled, and only one at a time, so one careless push can trap a crate in a corner. Play 60 computer-checked levels or paste in any level in the standard text format.

Last updated:

LevelStarter 1
Moves0
Pushes0
On goal0/0
Fewest pushes–
Best (moves / pushes)–

Level sets

0 / 60 solved

★ = solved with the fewest possible pushes. Progress is saved in this browser only.

Play your own level (standard text format)
Advertisement
Advertisement

How to use the Sokoban

  1. Find the goals. Green rings mark the goal squares. There is one goal for every crate.
  2. Walk into a crate to push it. Use the arrow keys or WASD, swipe on a phone, or tap the square next to you. You can only push, never pull, and never two crates at once.
  3. Plan before pushing. A crate pushed into a corner that is not a goal can never move again and turns red. Press Undo to take the push back.
  4. Tap any free square to walk there along the shortest path without pushing anything.
  5. Cover every goal to solve the level. Try to match the Fewest pushes number, then go to the next level or pick one from the level sets.

Sokoban strategy tips

  • Never push a crate into a corner unless that corner is a goal. A cornered crate can't be pushed again, so the level becomes impossible.
  • Watch the walls. A crate pushed against a wall can only slide along that wall. If there is no goal on that stretch of wall, the crate is lost even though it does not look trapped yet.
  • Avoid 2×2 blocks. Four crates (or crates and walls) forming a square can't be moved. The same is true for two crates side by side against a wall.
  • Fill the deepest goals first. Goals in dead-end pockets are hard to reach once other crates are in place, so push crates there early.
  • Leave yourself room to walk around. You often need to get to the other side of a crate to push it back. Keep a path open behind the crates you are working on.
  • Undo freely. There's no penalty for undoing, and your saved best result only counts the final solution.

Level sets

All 60 levels were made for this page. The generator places goals in a small room, starts with every crate on a goal, and searches all positions it can reach by pulling crates backwards. It keeps the position that needs the most pushes to solve, which guarantees every level has a solution.

SetLevelsCratesFewest pushes
Starter1526 – 12
Easy152 – 310 – 15
Medium153 – 415 – 20
Hard153 – 521 – 29

Sokoban text format

Use these symbols to paste your own levels. Each line of text is one row of the board.

SymbolMeaning
#Wall
@Player (warehouse keeper)
+Player standing on a goal
$Crate
*Crate already on a goal
.Goal square
space, - or _Floor

Frequently asked questions

What are the rules of Sokoban?

You move one square at a time up, down, left or right. When you walk into a crate, you push it one square, as long as the square behind it is empty floor. You cannot pull crates, push two crates in a row, or walk through walls. The level is solved when every crate is on a goal square.

What is the difference between moves and pushes?

Every step you take is a move. A push is a move that also shifts a crate. Sokoban players usually rank solutions by pushes first and moves second, because pushes are the hard part. This game saves your best result in that order.

Are all levels solvable?

Yes. Each of the 60 built-in levels was generated by starting with every crate on a goal and pulling crates backwards, then checked with a full search. The Fewest pushes box shows the exact minimum number of pushes for that level.

How do I know if I am stuck?

The most common dead end is a crate pushed into a corner that is not a goal: it turns red and can never move again. Crates pushed flat against a wall with no goal along that wall are also stuck. When that happens, press Undo until the crate is free.

Can I play classic Sokoban level collections?

Yes. Many level collections are shared in a standard plain-text format where # is a wall, @ the player, $ a crate, . a goal, * a crate on a goal and + the player on a goal. Open Play your own level, paste one level and press Play custom level. The game checks that it is closed and has as many goals as crates.

Who invented Sokoban?

Sokoban was created by Hiroyuki Imabayashi and first published in Japan in 1982. The name means warehouse keeper in Japanese. The rules are simple enough that thousands of fan-made levels have been designed since.

Does it work on phones?

Yes. Swipe on the board to step in a direction, use the on-screen arrow buttons, or tap a square to walk there. The board scales to fit your screen, and progress is saved in your browser.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Car Parking PuzzleSlide the blocking cars and trucks to free the red car. 120 graded levels with hints.Sliding PuzzlePlay the 15 puzzle and 3×3 to 6×6 sliding tile puzzles with numbers or your own photo.Water Sort PuzzlePour colored water between tubes until every tube holds a single color. Endless solvable levels.Tower of HanoiPlay the Tower of Hanoi puzzle with 3 to 8 disks, or watch it solve itself in the fewest moves.SolitairePlay classic Klondike Solitaire with Draw 1 or Draw 3 and undo.Spider SolitairePlay Spider Solitaire online with 1, 2 or 4 suits, hints, unlimited undo and a timer.Play Chess vs ComputerPlay chess online against the computer at 8 difficulty levels.Connect FourPlay Connect 4 online against the computer or a friend.Snake GamePlay classic Snake online with speeds, wall modes and high scores.Tic Tac ToePlay tic tac toe against an unbeatable AI or a friend.Block Puzzle GameClassic falling blocks puzzle game with levels and high score.MinesweeperPlay classic Minesweeper: 3 difficulties, flags, timer and a safe first click.2048 GamePlay 2048 online with swipe controls, undo and best score.Sudoku OnlinePlay free Sudoku with 4 difficulty levels, notes, hints and a timer.Word Guess GameGuess the hidden five-letter word in six tries. Unlimited games, stats and hard mode.HangmanClassic friendly hangman word game with categories, hints and difficulty levels.Memory Card GameFlip cards and match emoji pairs on 4×3 to 6×6 grids, with moves, timer and best scores.Flappy GameTap to flap a round chick through bamboo gaps and beat your high score.Dino Runner GameJump cacti and duck buzzing beetles in an original endless desert runner.Typing GameType the falling words before they land; level up and track your WPM and accuracy.Math Quiz GameTimed mental math rounds with four operations, five levels, streaks and high scores.Flag QuizGuess the flags of all 196 countries in four modes, from multiple choice to timed.Map QuizFind countries on a clickable world map or name the highlighted one, by continent.Periodic Table QuizLearn all 118 elements: quiz symbols, names and atomic numbers or click them on the table.Spelling Bee GameMake words from 7 honeycomb letters, always using the center letter. New daily puzzle.Jigsaw PuzzleTurn a sample picture or your own photo into a 12 to 150 piece jigsaw puzzle and solve it.Mahjong SolitaireMatch pairs of free tiles to clear the Turtle and two smaller layouts, with hints, shuffle and undo.Scrabble Word FinderFind the highest-scoring words from your rack, with blank tiles, patterns and bingo bonus.Wordle SolverEnter your guesses and colours to see every possible answer and the best next guess.Crossword SolverFind words that fit a crossword pattern like c?t from the length and the letters you know.Word Search GeneratorMake a word search puzzle from your words, play it online or print it with an answer key.Pong GamePlay classic Pong online against the computer on 3 levels or with a friend, first to 11.Breakout GameClassic brick breaker game with levels, power-ups and lives. Play with mouse, touch or keyboard.Whack-a-MoleWhack the moles before they hide in 30 or 60 second rounds. Speed increases, best score saved.Simon Says GameRepeat the growing color and sound sequence. Classic memory game with strict mode and high score.CheckersPlay checkers online against the computer or a friend, with kings, undo and hints.ReversiPlay Reversi (Othello rules) online vs a 3-level computer or a friend, with move hints.GomokuGet five in a row on a 15×15 board against a smart computer or a friend.Connect the Dots Flow PuzzleDraw lines to join matching colored dots and fill the whole board without crossings. 5×5 to 12×12.Peg SolitaireJump pegs over each other until only one is left. English, European and triangle boards with hints.Pipes PuzzleRotate pipe tiles to connect every pipe to the source with no leaks. 5×5 to 15×15, wrap mode, timer.Pop It GameVirtual pop-it fidget toy with pop sounds, shapes and colors, plus a two-player last-pop game.Rebus PuzzlesPicture-word brain teasers like MIND over MATTER, with hints, answers and printable sets.Road Crossing GameFrogger-style arcade: hop across busy roads and a log-filled river, grab coins and fill all 5 homes.Spend a Billion Dollars GameSpend a billion (or any fortune) on houses, jets and good causes, then save your receipt.Spot the DifferenceFind 5 to 10 differences between two illustrated pictures, with new scenes every game.US States Visited MapClick US states to mark visited, lived or want to go, see your count out of 50 and save a PNG.Taboo Word Game CardsDescribe the word without saying the forbidden ones: 100+ cards, timer and team scores.Tangram PuzzleDrag, rotate and flip 7 tangram pieces to fill 58 silhouettes, with snapping, hints and kids mode.Ultimate Tic Tac ToePlay 9 nested tic-tac-toe boards vs a Monte Carlo AI or a friend, with a rules guide.US Map PuzzleDrag the 50 states onto the US map. Snapping, timer, labels toggle, regions and an easy kids mode.US Presidents QuizName all 47 US presidencies in order against the clock, match years and facts, or study them.War Card GamePlay the classic War card game vs the computer: flip cards, fight wars, auto-play at any speed.Word Connect GameSwipe letters on a wheel to make words and fill the mini crossword. Hundreds of levels, hints, coins.Word Scramble GameUnscramble jumbled words against the clock. Pick a theme and difficulty, build streaks, use hints.Word Tile Game vs ComputerPlay a crossword board game against the computer: premium squares, tile bag, scoring, dictionary.Chinese Chess (Xiangqi)Play Chinese chess vs the computer at 5 levels or with a friend, with legal move highlights.Battleship GamePlace your fleet and sink the computer's ships in this classic naval guessing game.FreeCellPlay FreeCell solitaire online with the classic numbered deals, undo, hints and auto-move.Mastermind GameCrack the secret 4-color code in 10 tries using black and white feedback pegs.Maze GeneratorCreate random mazes in any size, solve them with the arrow keys, then print or save as PNG.Sudoku SolverType in any Sudoku and solve it instantly, get step-by-step hints and check it has one solution.Bingo Card GeneratorMake printable 75-ball or custom word bingo cards, from 1 to 200 unique cards, as PDF or print.Bingo Number GeneratorFree bingo caller for 75 or 90 balls with a live board, auto-call timer and spoken numbers.Online ScoreboardKeep score for any game: big team scores, game clock, periods, fullscreen and sport presets.Trivia Quiz300+ general knowledge trivia questions in 10 categories. 10-question rounds with a timer and score.Random Riddle Generator150+ riddles with hidden answers in easy, hard and kids levels. Guess, get a hint or reveal.Nonogram PuzzlePlay unlimited nonogram (picross) puzzles from 5×5 to 15×15, each with one unique solution.
See all 141 Online Games →