By Tim King · Updated
Rubik's Cube Solver
3D Cube Visualiser with Move Player and Solver, Free Online
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Rubik's Cube Solver works
This Rubik's cube solver runs entirely in your browser. A Rubik's cube you can turn, scramble and solve in your browser. Type moves in standard notation and press Play to watch them on the 3D cube, press Scramble for a random mix, and press Solve to get a solution of around twenty moves that plays back turn by turn. To solve a real cube, enter its 54 sticker colours as letters and the solver works from that state. Nothing is uploaded and the view saves as a PNG.
The Rubik's cube looks like a toy and behaves like a mathematics problem. It has 43,252,003,274, 489,856,000 reachable positions, about 43 quintillion, yet every one of them can be solved in twenty moves or fewer. A cube solver matters for two groups of people: those with a scrambled cube and no idea where to start, and those learning to solve faster who want to see exactly what an algorithm does. This page serves both, with a 3D cube you can turn, a notation player and a Rubik's cube solver that finds a short solution from any legal state.
A short history in numbers
Ernő Rubik, a Hungarian architecture lecturer, built the first cube in 1974 to teach spatial reasoning, and it went on sale worldwide in 1980. More than 450 million have been sold since. Speed solving took off in the 2000s under the World Cube Association, which now runs thousands of competitions a year; the official single-solve record for the 3×3 fell below 3.2 seconds in 2023. In 2010 a team of researchers, Tomas Rokicki, Herbert Kociemba, Morley Davidson and John Dethridge, used about 35 CPU-years of donated Google computing time to prove that "God's number", the most moves any position needs, is exactly twenty.
Move notation
Each letter turns one face a quarter turn clockwise as you look at that face: U up, D down, R right,
L left, F front, B back. An apostrophe means anticlockwise and a 2 means a half turn, so R U R' U'
is right up, top left, right down, top right, the "sexy move" that appears in countless algorithms.
Slice moves M, E and S turn the middle layers, lowercase letters such as r turn two layers
together, and x, y and z rotate the whole cube. Separate moves with spaces. The tool checks the
whole sequence before playing it and shows an error instead of playing a partial one.
Entering your own cube
Hold the cube with white on top and green facing you, then read the stickers of each face in rows from top left to bottom right, in the order Up, Right, Front, Down, Left, Back. Write each sticker as the letter of the face whose centre has that colour: U for white, R for red, F for green, D for yellow, L for orange and B for blue. That gives 54 letters, nine per face, with the centres always U R F D L B. The tool checks that every letter appears nine times and that the pieces form a real cube.
How the Rubik's cube solver works
The solution comes from Herbert Kociemba's two-phase algorithm, the method behind most cube solving programs. Phase one brings the cube into a subgroup where every edge is oriented and the four middle-layer edges sit in the middle layer; phase two finishes it using only half turns on four faces plus quarter turns of the top and bottom. The search runs in a background thread with pruning tables built when the page loads, which takes a few seconds the first time. Solutions are typically twenty to twenty-two moves: close to God's number, and far shorter than the hundred-plus moves of a beginner's layer-by-layer method. Finding a guaranteed optimal solution is possible but can take minutes per position, which is why practical solvers settle for near-optimal.
Expert tips and pitfalls
Most "impossible" cubes are typos. A single swapped letter produces a corner with two stickers of the same colour or a count of ten of one letter. Recheck the face you entered last, and make sure you read each face with the cube held in the same orientation.
A reassembled cube may be unsolvable. If a cube was taken apart and put back together, or had stickers peeled and replaced, there is a two-in-three chance it cannot be solved by turning at all. Only one in twelve random reassemblies is solvable. If the letters are right but the tool says the colours do not form a valid cube, look for a twisted corner, flipped edge or swapped pair on the real cube and fix it physically.
Use the solver to learn, not just to finish. Speedcubers learn CFOP (cross, first two layers, orientation, permutation), whose last two steps alone have 57 and 21 algorithms. Paste any algorithm from a tutorial, set Turn speed to Slow and press Play moves to see which pieces move. Type the inverse, reversed and with each move flipped, to undo it.
Keep the orientation fixed. Solutions assume white on top and green in front. Rotate the whole cube mid-solution and every following move is applied to the wrong face.
How to read the result
Press Solve and the solution appears as a move sequence in the notation above, played back turn by turn on the 3D cube so you can follow along with a real one. The solution length tells you how efficient it is; anything around twenty is near the theoretical best. The stats also show the current state as a 54-letter facelet string you can copy and paste back later. Press Reset to return to a solved cube. Download PNG renders the current view at up to 4K; turn the cube to show the faces you want and use Fit view to centre it first.
FAQ
Why does the solver say my cube state is invalid?
Usually one or two stickers are misread. Check that each face is entered with the cube held the same way, that the centres are in the order U R F D L B, and that each letter appears exactly nine times. A cube that has been taken apart and reassembled wrongly is also unsolvable, and the tool reports it the same way.
Is the solution the shortest possible?
No. The two-phase method finds a good solution quickly rather than the best one. Most answers are twenty to twenty-two moves, while an optimal solver would find at most twenty but can take minutes per cube. For following along by hand the difference does not matter.
Can I use it for a 2x2 or 4x4 cube?
Only the standard 3x3 cube is supported. The move notation and the solver are specific to the 3x3, so other sizes would need a different model and a different solving method entirely.
Does the cube keep its state if I reload the page?
No. The page starts solved each time. If you want to come back to a position, copy the facelet string from the stats and paste it into the cube state field later, or keep the move sequence that produced it.
See also: all 3D Science tools, Images, Audio, Video & Screen, PDF, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, Tracker Music.
Related tools
Solar System Simulator
3D planets in their real positions for any date, with orbits and time control.
Earth Day And Night Map
3D globe showing daylight and night for any date and time.
Voxel Art Editor
Click blocks into a 3D voxel model and export OBJ or PLY.
3D Text Generator
Extrude text into 3D and download it as a PNG.
STL Viewer
Drop an STL, orbit it, read its size and triangle count, save a PNG.