Klotski solution

Klotski solution in 81 moves

Looking for a klotski solution? Here is the classic layout in the fewest possible moves, computed by our own search. Press play or step through every move free online, then try it yourself in the klotski game.

Move 0 / 81

Start position

Klotski minimum moves (classic layout)

People ask for klotski minimum moves because published numbers disagree until you fix the ruler. For the classic 4×5 layout (Chinese 横刀立马):

  • 81 moves — one block moved any distance, including around a corner, counts as one. This is the usual published minimum and the replay on this page.
  • 90 moves — every straight slide counts (an L-shaped slide is two).
  • 116 moves — every square a block travels counts.

Our breadth-first search explored 23,845 positions and first hit a solved state at depth 81, so nothing shorter exists under the piece-move rule. Practice on the classic klotski level and compare your count with 81.

About this solution

  • Length: 81 moves, where one block moved any distance counts as one move. Straight slides only: 90. Square by square: 116 at best.
  • The big block moves 9 times; its first move is move 26. Everything before that is making room.
  • 9 of the 81 moves slide a block around a corner, which is why the straight-slide count is higher.
  • This route travels 118 squares in total. Counting square by square, the shortest possible route is 116 squares — a different route, optimised for a different ruler.

Milestones

Five snapshots of the same route. If you lose your way while following along, compare your board with the nearest one.

All 81 moves

Columns A–D run left to right, rows 1–5 top to bottom; squares name a block’s top-left corner. Tap a move to show that position in the player above.

  1. 1.Small block B4 → B5 (down)
  2. 2.Small block D5 → C5 (left)
  3. 3.Tall block D3 → D4 (down)
  4. 4.Wide block B3 → C3 (right)
  5. 5.Tall block A3 → B3 (right)
  6. 6.Small block A5 → A4 (up)
  7. 7.Small block B5 → A5 (left)
  8. 8.Tall block B3 → B4 (down)
  9. 9.Wide block C3 → A3 (left 2)
  10. 10.Small block C4 → D3 (up, right)
  11. 11.Small block C5 → C3 (up 2)
  12. 12.Tall block B4 → C4 (right)
  13. 13.Small block A4 → B5 (right, down)
  14. 14.Wide block A3 → A4 (down)
  15. 15.Small block C3 → A3 (left 2)
  16. 16.Small block D3 → B3 (left 2)
  17. 17.Tall block C4 → C3 (up)
  18. 18.Tall block D4 → D3 (up)
  19. 19.Small block B5 → D5 (right 2)
  20. 20.Small block A5 → C5 (right 2)
  21. 21.Wide block A4 → A5 (down)
  22. 22.Small block B3 → A4 (down, left)
  23. 23.Tall block C3 → B3 (left)
  24. 24.Tall block D3 → C3 (left)
  25. 25.Tall block D1 → D3 (down 2)
  26. 26.Big block B1 → C1 (right)
  27. 27.Tall block A1 → B1 (right)
  28. 28.Small block A3 → A1 (up 2)
  29. 29.Small block A4 → A2 (up 2)
  30. 30.Tall block B3 → A3 (left)
  31. 31.Tall block B1 → B3 (down 2)
  32. 32.Big block C1 → B1 (left)
  33. 33.Tall block D3 → D1 (up 2)
  34. 34.Tall block C3 → D3 (right)
  35. 35.Small block C5 → C3 (up 2)
  36. 36.Small block D5 → C4 (left, up)
  37. 37.Wide block A5 → C5 (right 2)
  38. 38.Tall block B3 → B4 (down)
  39. 39.Tall block A3 → A4 (down)
  40. 40.Small block C3 → A3 (left 2)
  41. 41.Big block B1 → B2 (down)
  42. 42.Small block A1 → C1 (right 2)
  43. 43.Small block A2 → B1 (up, right)
  44. 44.Small block A3 → A1 (up 2)
  45. 45.Tall block A4 → A2 (up 2)
  46. 46.Tall block B4 → A4 (left)
  47. 47.Small block C4 → B5 (left, down)
  48. 48.Big block B2 → B3 (down)
  49. 49.Small block C1 → B2 (down, left)
  50. 50.Tall block D1 → C1 (left)
  51. 51.Tall block D3 → D1 (up 2)
  52. 52.Big block B3 → C3 (right)
  53. 53.Small block B2 → B3 (down)
  54. 54.Small block B1 → B2 (down)
  55. 55.Small block A1 → B1 (right)
  56. 56.Tall block A2 → A1 (up)
  57. 57.Tall block A4 → A3 (up)
  58. 58.Small block B5 → A5 (left)
  59. 59.Small block B3 → B5 (down 2)
  60. 60.Big block C3 → B3 (left)
  61. 61.Tall block D1 → D3 (down 2)
  62. 62.Tall block C1 → D1 (right)
  63. 63.Small block B1 → C1 (right)
  64. 64.Small block B2 → C2 (right)
  65. 65.Tall block A1 → B1 (right)
  66. 66.Tall block A3 → A1 (up 2)
  67. 67.Big block B3 → A3 (left)
  68. 68.Small block C2 → C4 (down 2)
  69. 69.Small block C1 → C3 (down 2)
  70. 70.Tall block D1 → C1 (left)
  71. 71.Tall block D3 → D1 (up 2)
  72. 72.Small block C4 → D3 (right, up)
  73. 73.Wide block C5 → C4 (up)
  74. 74.Small block B5 → D5 (right 2)
  75. 75.Small block A5 → C5 (right 2)
  76. 76.Big block A3 → A4 (down)
  77. 77.Small block C3 → A3 (left 2)
  78. 78.Small block D3 → B3 (left 2)
  79. 79.Wide block C4 → C3 (up)
  80. 80.Small block C5 → D4 (up, right)
  81. 81.Big block A4 → B4 (right)

Klotski strategy and puzzle tips

Looking for klotski strategy, klotski puzzle tips, or how to solve klotski puzzle layouts in general? These ideas transfer from the classic board to every exit-style level in our klotski game and sliding block set:

  • Path first: decide which corridor the big (2×2) block will use to reach the exit before you move anything else.
  • Parking spots: clear one or two side cells that can hold a tall or wide blocker while the corridor opens.
  • Small-block trains: slide 1×1 pieces in pairs so you rotate space without trapping a single cell behind a wall.
  • Don’t rush the big block: its first useful advance usually comes after dozens of setup moves — on this classic route, move 26.
  • When stuck, compare your board with the milestone snapshots above, or press play on the animated 81-move solution.

Want to practice without the full solution visible? Open the classic klotski level and come back here only when you need a hint.

How we found it

Breadth-first search explores positions in order of distance from the start: first every position one move away, then two, and so on. Blocks of the same shape are treated as identical, which keeps the number of positions small. The first time the search reaches a position with the big block at the exit, the route to it is a shortest one. For this layout that happened at depth 81, after 23,845 positions. The same code computes the fewest-moves column for every level in our klotski and sliding block games.

FAQ

What is the shortest klotski solution?

81 moves for the classic layout, counting one block moved any distance (even around a corner) as one move. Our breadth-first search looked at 23,845 positions before reaching the first solved one, which proves nothing shorter exists.

What are the klotski minimum moves for the classic board?

Under the usual piece-move rule, the klotski minimum moves count is 81: slide one block any distance (including around a corner) and that counts as one move. Wikipedia and independent BFS solvers agree on 81. If you count every straight slide separately the minimum is 90; square-by-square it is 116. This page’s replay uses the 81-move ruler.

Why do some sites say 116 or 90 moves?

They count differently. If every straight slide is a move, the minimum is 90; if every square is a move, it is 116. Same puzzle, different ruler.

Is this the only shortest solution?

No. Blocks of the same shape are interchangeable and many moves can be swapped in order, so there are many routes of the same length. This page shows one of them.

How do I read the notation?

Columns are A to D from left to right and rows 1 to 5 from top to bottom. Each move gives the block, the square of its top-left corner before and after, and the directions it slid.

Can I try it myself?

Yes. Open the klotski game, pick the classic layout and follow along, or play without help and compare your move count with this one.

Is this klotski solution free to view online?

Yes. The full step-by-step klotski solution, the animated replay, and the written move list are free in your browser—no sign-up.

Any klotski puzzle tips or strategy before I follow the moves?

Yes. Plan the big block’s path to the exit first, create parking spots for blockers, shuffle small blocks in pairs or ‘trains’, and keep an escape lane open. The strategy section below expands each tip; then use the 81-move replay when you get stuck.

How to solve a klotski puzzle step by step?

Treat it as clearing space, not pushing the big block early. (1) Sketch the path the 2×2 needs. (2) Park tall/wide blockers beside that corridor. (3) Move small blocks in short trains so you never wall off a cell. (4) Only then advance the big block. The animated solution on this page shows one shortest route for the classic layout.