How to use the Rubik's cube solver
This Rubik's cube solver works from the colors of your own cube. Hold it with the white center on top and the green center facing you, then:
- Pick a color in the palette and tap the stickers that have it, on the flat net or on the 3D cube. The counter under each color shows how many you have placed; each one needs 9.
- Fill all six faces. If you are unsure how a face lines up, open I can only see two or three faces under the Solve button.
- Press Solve. The solver checks your cube first, then shows the moves. Press play, or step through them one at a time; an arrow on the 3D cube shows which layer turns next and which way.
Already have a scramble written down, from a timer or a video? Choose Type a scramble, paste it, and the solver applies it to a solved cube for you. It reads standard notation, including slice moves (M, E, S), wide moves (Rw or r) and whole-cube turns (x, y, z).
Reading the moves
Each letter is one face: U top, D bottom, R right, L left, F front, B back. A letter on its own means a quarter turn clockwise as you look straight at that face. A letter with an apostrophe, like R', is a quarter turn counter-clockwise, and a 2, like U2, is a half turn. Keep the cube in the same grip from the first move to the last: the white center stays on top and green stays in front. If you prefer another grip, change it under the solution and the moves are rewritten for it.
How the solver works
It uses Herbert Kociemba's two-phase algorithm, through the open-source cubejs library (MIT license). Phase one turns the cube until every piece is oriented and the middle-layer edges are in the middle layer; phase two then solves it using only moves that keep those properties. Searching both phases together finds a short solution in a fraction of a second. Any position can be solved in 20 moves or fewer (proven in 2010), but finding the very shortest solution takes far longer, so this solver takes the first solution of 22 moves or fewer, found in milliseconds, and then spends up to two seconds looking for one of 20 moves or fewer. In our test of 2,000 random cubes every first solution was 22 moves or fewer; in a test of 300 random cubes with the two-second search, 279 (93%) came out at 20 moves or fewer. Every solution is replayed on a separate cube model to confirm it really solves the cube.
On a phone, press Follow mode after solving: one big move at a time, with its plain-English line and large Back and Next buttons, and the cube always in view.
When the cube cannot be solved
Before solving, the solver checks that your colors describe a cube that can exist: 9 stickers of each color, six different centers in the standard layout, every corner and edge a real piece that appears exactly once, and the twist, flip and swap rules that every real cube obeys. If something is wrong it tells you what and where, for example "two white-green-red corners" or "an edge with two red stickers", and outlines the stickers to check. Most problems are a sticker tapped with a neighboring color; red and orange are the usual pair. If the colors are right, the real cube may have a twisted corner or a flipped edge, which happens when pieces pop out; no sequence of turns can fix that, so twist or reinsert the piece by hand.
A worked example
Type the scramble F R U R' U' F' and press Solve. The solver answers with 13 moves: F U R U' R' F U2 D2 F2 B2 U2 D2 B2. It does not simply undo your scramble; it searches for any short route back. For a long, random scramble expect about 20 moves, sometimes 21 or 22.
Tips
- Enter colors in daylight or under white light: warm light makes red and orange, and white and yellow, hard to tell apart.
- Use the Slow speed for your first solve, and the step buttons to repeat a move you are unsure about.
- For the 2x2 pocket cube, use the 2x2 solver, which always finds the shortest possible solution.
Want to solve it without help next time? How to solve a Rubik's cube teaches the beginner method layer by layer, and the Rubik's cube simulator gives you a virtual cube to practice on. Other twisty puzzles have their own solvers: the skewb, the pyraminx and the square-1.
Solver tested . Found a problem? Tell us.
Questions
Is this Rubik's cube solver free?
Yes. It is free with no sign-up and no download. It runs in your browser, and the colors you enter are not sent anywhere.
How many moves does the solution take?
Usually 20 or fewer, never more than 22. The solver takes its first solution (22 moves or fewer) and then searches for up to two seconds for one of 20 or fewer: in our test of 300 random cubes on a laptop, 279 (93%) ended at 20 moves or fewer. Every turn of a face, including half turns, counts as one move.
Why does it say my cube cannot be solved?
The colors entered describe a cube that cannot exist, most often because one sticker was given the wrong color (red and orange are easy to mix up). The message names the problem and outlines the stickers to check. If the colors are right, a corner on your real cube may be twisted or an edge flipped; twist or reinsert that piece by hand and enter the cube again.
Which way is clockwise?
Clockwise as you look straight at the face being turned. For R, look at the right face from the right; for U, look down at the top. So R turns the front column of the right side upward, and U turns the front row to the left.
Can I scan my cube with a camera?
When your browser allows camera access, a Scan with camera button appears under the net. The pictures are processed on your device and never uploaded. Check the scanned colors before you press Solve.
Do I have to hold the cube with white on top?
No. You can enter it in any grip as long as you keep the same grip for every face and every move; the solver reads which way you held it from the centers. Under the solution you can also pick another grip and the moves are rewritten for it.