Rubik's Cube Solver

Paint your cube's colors, click Solve, and watch a near-optimal, move-by-move animated solution. Free, and it runs entirely in your browser — nothing is uploaded.

Paint your cube, or click Scramble to try the solver instantly.

Solution

How to use it

  1. Click a sticker to cycle its color, matching each face of your physical cube. Use the face buttons (U, D, L, R, F, B) or drag the cube to look around.
  2. No cube on hand? Click Scramble to load a random valid state instantly.
  3. Click Solve. The solver checks your colors first, then finds a near-optimal move sequence.
  4. Press Play to animate the solution automatically, or use Back / Step to move through it one turn at a time.

To time your own solves instead of watching the animation, use the Rubik's Cube timer with its ao5 and ao12 averages. For the method behind the answer, see how the Rubik's Cube solver works. The Rubik's Cube tools hub lists both, and LK Forge's puzzle solvers and analyzers cover Sudoku, word search, chess and more.

Frequently asked questions

How do I use the Rubik's Cube solver?

To use the Rubik's Cube solver, click each sticker to cycle its color until it matches your physical cube, using the face buttons or a drag to look around. Then click Solve to get an animated, move-by-move solution. If you have no cube to hand, click Scramble to load a random valid state instantly. Play animates the whole solution, while Back and Step walk through it one turn at a time.

Do I need to already know how to solve a cube?

No — the Rubik's Cube solver needs no prior knowledge of how to solve a cube. It works out every move for you and plays the sequence back automatically, or you can step through it one turn at a time. Each move is labeled in standard cube notation, so you can also read it as a written solution. Following the animation a few times is a reasonable way to start learning the turns yourself.

What color scheme does the solver expect?

The solver expects the standard Western color scheme: white opposite yellow, red opposite orange, and green opposite blue. The center sticker fixes each face's color, so centers cannot be recolored. If your cube uses a different scheme, rotate it in your hands until the centers line up with the ones on screen before you start painting. The solution is the same sequence of turns either way, because only the relative arrangement matters.

Is my cube's color data uploaded anywhere?

No — the colors you paint are never uploaded anywhere. Everything, including the solving algorithm itself, runs locally in your browser. Nothing you paint is sent to a server, and there is no account for it to be attached to. Closing the tab discards the cube state entirely.

Why does it say my cube state is invalid?

The solver checks that each color appears exactly nine times and that the six center stickers are untouched before it tries to solve. An invalid state usually means a mis-painted sticker, so a color has ten faces somewhere and eight somewhere else. If a scrambled real cube still won't solve, double check each sticker against the physical cube, one face at a time. A cube with a swapped or twisted piece from being taken apart can also be genuinely unsolvable.

How many moves is the solution?

The solution length depends on the scramble, but a two-phase algorithm finds a near-optimal sequence, typically well under 25 moves however scrambled the cube is. That is close to, but not always exactly, the shortest possible solution. Every 3x3 position is solvable in at most 20 moves in the half-turn metric, a result known as God's number. The solver trades those last few moves for speed, so the answer arrives in a fraction of a second.