Klotski puzzle

Klotski puzzle online

Slide the wooden blocks until the big red square escapes through the gap. 12 levels from a 8-move warm-up to the classic layout (81 moves, level 10) and beyond. Free, no sign-up, made for touch.

Klotski puzzle — First steps

Moves 0 · Fewest 8

First steps

Drag a block with your finger (it can turn corners), or tap a block and then an arrow. Get the big block to the exit.

How to play klotski

  1. Find the big block and the exit. The red 2×2 block starts at the top. The gap in the bottom edge of the wooden frame is the exit; the puzzle is solved when the big block sits right above it.
  2. Slide one block at a time. Drag any block with your finger or mouse. A block can slide into empty squares and even turn a corner in one drag, but it can never jump over another block or rotate.
  3. Or tap, then choose a direction. Tap a block to select it (dots show where it can go), then tap an arrow or an empty square. On a keyboard, the arrow keys move the selected block.
  4. Count your moves. Moving the same block again straight away does not add a move, so a long slide or an L-shaped slide counts as one. Try to match the fewest-moves number shown above the board.
  5. Undo, reset or ask for a hint. Undo steps back, Reset returns to the start, and Hint plays the next move of a shortest solution from your current position.

Why the classic takes 81 moves (and how moves are counted)

Klotski numbers only make sense once you agree what a “move” is. We ran a breadth-first search over the classic layout three times, once per rule:

  • 81 moves — one block moved any distance, including around a corner, is one move. This is the usual rule and the one this game uses.
  • 90 moves — every straight slide counts, so an L-shaped slide is two moves.
  • 116 moves — every square a block travels counts.

The search treats blocks of the same shape as interchangeable. From the classic start, 25,955 different positions can be reached, and in 964 of them the big block is already at the exit. The position farthest from any solution needs 93 moves — our level 12, “Longest road”, starts there. Want to see every move? Step through the 81-move klotski solution.

Klotski strategy that actually helps

  • Work backwards from the exit: the big block needs a 2×2 hole directly below it, so ask which blocks must leave that area and where they can go.
  • The wide block is the usual blocker. In the classic layout it sits right under the big block; most of the early moves exist only to get it out of the way.
  • Keep the two empty squares together. Two separate gaps move small blocks around; a 1×2 gap is what lets tall and wide blocks move at all.
  • Use the small blocks as filler. They can go almost anywhere, so park them in corners you won’t need soon.
  • Expect to move the big block sideways and even upwards. On the longer layouts it has to step aside to let blocks pass.
  • Repeat good patterns. Once you find a short sequence that moves the big block one row down, you will use it again later in the solve.

All levels

4 levels are traditional layouts with well-known names (齐头并进, 指挥若定, 兵分三路, 横刀立马); for each, our search gives the same fewest-moves count that is widely published. The other 8 are our own layouts, picked from the search so the difficulty climbs steadily. Tap a level number to open it.

LevelStartNameFewest moves
1
First stepsoriginal8
2
Open doorsoriginal13
3
Narrow passoriginal23
4
Crossbeamsoriginal32
5
The long way roundoriginal43
6
Gatekeepersoriginal53
7
Side by side齐头并进 · Qí tóu bìng jìntraditional layout60
8
The commander指挥若定 · Zhǐ huī ruò dìngtraditional layout70
9
Three roads兵分三路 · Bīng fēn sān lùtraditional layout72
10
The classic opening横刀立马 · Héng dāo lì mǎtraditional layout81
11
Deep retreatoriginal88
12
Longest roadoriginal93

Where klotski comes from

Sliding block puzzles with one big block and an exit are played around the world under different names. In China the same 4×5 board is 华容道 (Huarong Dao), after the story in which Cao Cao escapes along the Huarong path; the blocks are often labelled with his name and those of the generals who block his way. The word klotski is generally traced to the Polish word for wooden blocks.

Klotski is different from the 15 puzzle, where numbered square tiles are put in order. If you enjoy klotski, try our general sliding block puzzle with other board sizes and exits, or a packing puzzle such as the 8×8 wooden block puzzle and the tetromino puzzle.

FAQ

What is the minimum number of moves for classic klotski?

81 moves, if sliding one block any distance (even around a corner) counts as one move. Our breadth-first search checked every reachable position and confirmed it. If each straight slide counts as a move the answer is 90, and if every square counts it is 116.

Which layout is the classic one?

Level 10. The big block starts top centre between two tall blocks, a wide block sits under it, two more tall blocks stand at the sides and four small blocks fill the bottom, leaving two empty squares. In Chinese it is called 横刀立马 (Héng dāo lì mǎ).

Is every level solvable?

Yes. Every start position in the table below was solved by our search, which also records the fewest moves in three different counting styles. Levels are sorted from 8 to 93 moves.

How is a move counted in this game?

One block moved is one move, however far it goes. If you pick up the same block again right after, it is still the same move. Hints and undo follow the same rule.

What is the difference between klotski and the 15 puzzle?

In klotski the blocks have different sizes and the goal is to move one special block to an exit. In the 15 puzzle all tiles are 1×1 squares with numbers and the goal is to put them in order. Both are sliding puzzles, but they are solved very differently.

Does it work on a phone or iPad?

Yes. The board is built for touch: drag blocks with a finger, or tap a block and then an arrow if you prefer precise moves. Your level, position and best scores are saved on your device.