Rubik's Cube solver

Enter the colors of your scrambled Rubik's Cube and get a solution in about 20 moves on a 3D cube, or go step by step with the beginner's method or CFOP.

Pick a color, then tap the stickers on the 3D cube. Drag outside the cube to turn it around. Hold your real cube white on top, green in front, or paint the centers the way you hold it.

How to enter your cube

Hold your Rubik's Cube with the white center on top and the green center facing you. Keep it that way while you paint. That matches the centers that are already filled in. Holding it another way is fine too: paint the six centers to match and the solver works out the rest. Pick a color from the palette, then tap the stickers on the 3D cube. The six centers never move on a 3x3, so they are already filled in. You paint the other 48 stickers. ðŸŽ¨

On a small phone the flat view is easier. It shows all six sides as a cross, like a cube unfolded on a table. Did you scramble a solved cube by hand? Then type the moves you did instead, for example "R U R' F2". Or scramble the cube in the Rubik's Cube simulator, press Solve, and it is already here.

The six sides of a scrambled cube laid out flat as a cross, a column of six colors on the left with green picked, and a finger tapping a sticker
Flat view shows all six sides at once. Pick a color and tap a sticker.

Smart fill saves you some taps. When one sticker of a piece is still empty and only one color can go there, the solver fills it in. Give it a quick look before you press Solve. A real cube can only reach 1 of every 12 sticker arrangements, as Jaap's Puzzle Page works out, so one wrong sticker makes the whole cube impossible.

What the error messages mean

Turning the sides can never twist one corner on its own or flip one edge on its own. When the solver finds such a thing, it knows a sticker is wrong, or the cube was put back together wrong. It points at the piece and says so in plain words.

MessageWhat it meansWhat to check
"There are 10 white stickers, but every color needs exactly 9."One color is painted too often, another too rarely.Compare each side with your cube. The extra sticker is often next to a center of the same color.
"The corner between the white, yellow and red stickers can't exist on a real cube."Those three colors never share a corner, for example white with yellow.Opposite colors (white and yellow, red and orange, blue and green) are never on one piece. Repaint that corner.
"One corner is twisted."All pieces are in place, but one corner is turned in its spot.A sticker on that corner is probably wrong. If the cube popped, twist the corner back by hand.
"One edge is flipped."An edge sits in its spot with its two colors swapped.Repaint that edge. If the cube popped, take the edge out and put it back the other way.
"Two pieces are swapped."Everything looks fine, but two pieces would have to trade places.The solver can't tell which two, so check all your colors again. If the cube was taken apart, pull out two edges and swap them.
A grey cube where only one corner is lit in red, showing green on top, red in front and white on the right, with a twist arrow and a card that says One corner is twisted
A twisted corner: the solver lights up the piece and says what to check.

Our page about the unsolvable cube shows each of these cases with a picture, and how to fix it on a real cube.

How the solver works in simple words

Optimal mode uses the two-phase algorithm that Herbert Kociemba published in 1992. His own description is on kociemba.org. The idea is to split one hard problem into two easier ones.

Phase 1 turns every piece the right way around and brings the four middle-layer edges into the middle layer. It does not care where a piece sits, only how it is turned. Phase 2 finishes the cube with a small set of moves that keep that order: quarter turns of the top and bottom, and half turns of the other four sides.

That second set has only about 20 billion positions instead of 43 quintillion, so a computer can search it fast. The solver tries many phase 1 paths and keeps the one with the shortest total. Ruwix's page on God's number covers Thistlethwaite's older method and how the 20 move limit was proven. All of it runs in your browser, so your cube never leaves your device.

Optimal, beginner's method or CFOP

Optimal gives you about 20 moves. No position ever needs more than 20, a limit called God's number. Use it when the cube is a mess and you just want it solved. The beginner's method gives you about 120 moves, grouped into the 7 steps of our tutorial on how to solve a Rubik's Cube, with the same algorithms you learn there.

CFOP is the method most speedcubers use. The solver first builds the white cross on the bottom in as few moves as it can. Then it puts the 4 corner and edge pairs of the first two layers in place (F2L). One algorithm turns the whole top yellow (OLL), and one more moves the top pieces to their spots (PLL). That makes about 60 moves. Each step names its case, like "OLL 27 (Sune)", and uses the same algorithm as our CFOP method guide. You can switch between the modes any time without painting again.

  • Optimal: short, no explanation, done in a minute of turning.
  • Beginner's method: longer, each step labeled, you can pause and read why.
  • CFOP: each step shows the case, so you can look it up and practice it.
  • All modes: the step player under the cube turns in sync with you.

Following the solution

The moves appear as big chips under the cube. Press Play and the 3D cube turns with each move. Back and Next step one move at a time. The current move is highlighted with a plain hint, such as "R = turn the right side up, away from you".

A scrambled cube next to a 12 move solution shown as chips: R2 F2 L' D2 U' B D2 L F2 U2 L2 R. The first chip is blue, and play, back and next buttons sit below
Each move is a chip. The blue one is the move to do now.

Hold your real cube the same way as the one on the screen, with the same centers on top and in front. Each letter is one side: F front, R right, U up, L left, D down, B back. An apostrophe means counterclockwise and a 2 means a half turn. The notation page shows every move on a small moving cube.

A tip from our own practice: say the moves out loud as you turn. It is much harder to lose your place that way. If you do, press Back a few times and compare the screen with your cube. ðŸ™‚

Done? Press "Time yourself on this scramble" to send the same scramble to the timer.

Questions people ask

Why does it say my cube is impossible?

Nine times out of ten a sticker is painted wrong. Check the piece the solver highlights against your real cube. The other case is a cube that popped and was put back wrong: a twisted corner or a flipped edge. Turn the piece by hand and it is fixed. Our unsolvable cube page shows every case.

Why isn't the solution the shortest possible?

Most positions have a shortest solution of 18 moves, but finding it means a huge search. The proof that 20 moves always suffice took about 35 CPU-years, as cube20.org reports. The two-phase method gives you 19 to 22 moves in a fraction of a second, which is close enough for a cube in your hands.

Can I use it for a 2x2 or 4x4?

Not yet. The solver works with the 3x3 only. Other sizes are on our list, the 2x2 first.

Does it work with a different color scheme?

Yes. The solver reads the six centers and uses them as the reference. Any scheme works as long as each color appears on exactly 9 stickers and the centers match your cube. If yours has yellow on top, paint it that way and hold it that way.

Why does my old cube pop?

Old cubes have loose screws and sharp inner corners, so a piece jumps out when you turn a side while another side is slightly off. Put it back the right way around, or the solver will report a twisted corner or a flipped edge. A new budget cube with magnets almost never pops. See how to stop pops.