Skip to content

Snake Cube Solver (3D)

Shows step by step in 3D how the 27-cubie elastic snake folds into a 3×3×3 cube; enter the straight/turn pattern of your own snake, also for 2×2×2 and 4×4×4

Loading the tool…

When a child hands you a wooden snake cube (a chain of cubes on an elastic) and neither of you can fold it back into a cube, enter the snake's pattern here and see the folding one cubie at a time, in 3D and as layer plans. The common 27-cubie 3×3×3 snake is loaded from the start, and 2×2×2 and 4×4×4 snakes work too.

How to use

  1. Choose the cube size at the top. Most snakes are "3×3×3", and the solution for the standard 27-cubie snake appears as soon as the page opens.
  2. If your snake has a different pattern, pick it under "Built-in patterns", tap cubies in the "Cubie chain" to switch between straight and turn, or type the number of cubies in each straight run under "Enter as segment lengths" (for example 3, 2, 2, 3).
  3. Each press of "Next" places one cubie. The sentence under the buttons says which cubie goes on which layer and which way the chain continues, and in the "Layer plans" a thick border marks the cubie just placed.
  4. Drag the 3D view to turn it and use the wheel or two fingers to zoom. "View from behind" shows the other side, "Show all" shows the finished cube and "Auto play" runs through every step.
  5. "Another solution" finds the next solution and "Count solutions" counts them all. A 4×4×4 search can take a while, so it only starts when you press "Solve this pattern".

How it works

How to solve a snake cube: read the pattern correctly first

Stretch the snake out and count the cubies from one end. If the elastic runs straight through a cubie it is a straight cubie; if it leaves through a side face it is a turn cubie. A segment length is the number of cubies from an end (or a turn cubie) up to and including the next turn cubie. A turn cubie ends one segment and starts the next, so it is counted in both. That is why every segment of a 3×3×3 snake is 2 or 3, and why the sum of the segment lengths minus (number of segments − 1) must be 27.

The usual mistakes are writing a 2 instead of a 3 and missing a turn cubie. When the count is wrong or the chain does not fold, the tool points to the segment that is most likely wrong, so you only need to recount that part of the real snake.

Tips for folding the snake cube solution

Cubie 1 goes on the bottom layer. Put cubie 1 of the real snake on the table and follow the sentences, turning the next cubie to the right, to the back, up and so on, one cubie at a time. When it gets confusing, check the numbers on each layer in the "Layer plans". The plans are seen from above, with the back at the top.

Colour the cells of a 3×3×3 cube like a chessboard and one colour has 14 cells, the other 13. The chain changes colour with every cubie, so both ends of a 27-cubie snake must sit on the 14-cell colour: a corner or the centre of a face. A start on the middle of an edge or in the very centre of the cube can never work.

How many solutions does a snake cube have

The standard 27-cubie snake (3, 2, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 3) has exactly one solution when turned or mirrored copies count as one. Counting every orientation separately gives 48, because the cube can be turned and mirrored in 48 ways. Among the "Built-in patterns", variant A has 10 solutions, variant B has 6 and variants C, D and E have one each. "Count solutions" checks this for you.

Questions and answers

Snake cube 3x3x3 solution step by step
Choose "3×3×3" and the solution for the standard 27-cubie snake appears. Each press of "Next" says which cubie goes on which layer and which way to turn.
My snake cube has a different pattern
Mark the turn cubies in the "Cubie chain" or type the segment lengths under "Enter as segment lengths". As soon as the chain has 27 cubies the search starts.
It says my pattern does not fold into a cube
Usually one segment was miscounted. If the tool suggests a pattern that folds, press "Use this pattern" and recount the changed segment on the real snake.
Does a snake cube have only one solution
The standard 27-cubie snake has one, counting turned and mirrored copies as one. Some other snakes have 6 or 10, and "Count solutions" counts them.
Does it work for 2x2x2 and 4x4x4 snake cubes
Yes. Choose "2×2×2" or "4×4×4" at the top and enter the pattern. A 64-cubie 4×4×4 search starts when you press "Solve this pattern" and runs for at most 10 seconds.