U D L R F B turn a face. Hold Shift to turn it back. Arrows swing the view. Z undoes.
Rubik’s Cube Dates, From a Budapest Desk to a Doodle
Ernő Rubik made his first cube from wood in 1974, in Budapest. Forty years later, Google put a working copy on its homepage.
- 1974: Rubik finishes a wooden 3×3 prototype.
- 1975: He gets a Hungarian patent for his Magic Cube.
- 1977: The cube goes on sale in Budapest toy shops.
- 1980: It reaches toy fairs abroad under a new name, Rubik’s Cube.
- 1981: It wins UK Toy of the Year.
- 1982: Minh Thai wins the first world championship in Budapest with a 22.95-second solve.
- 2003: The World Cube Association forms to run official contests.
- 2010: Researchers show that no position needs more than 20 moves, with computer time from Google.
- 19 May 2014: Google runs an interactive doodle for the cube’s 40th birthday.
- 2014: Google adds Chrome Cube Lab, a set of cube toys with open code.
Google called the doodle one of its most ambitious builds. It ran on HTML5 and Three.js, with drag to turn and keyboard shortcuts for speedcubers.
That doodle made the Rubik’s cube game a homepage event for a day. The cube above copies the idea with plain CSS.
How the Rubik’s Cube on This Page Turns
The page uses no images and no 3D library. The cube is 27 small boxes, each with six flat squares that CSS places in 3D space.
A turn grabs the nine boxes in one layer. The page spins them 90 degrees in under a fifth of a second. Then it writes each box’s new spot and facing to memory.
Dragging moves the camera, not the puzzle. Your view swings round, but no sticker changes place.
After each turn, the code checks which way every sticker faces. When all nine on each side match, a banner shows your move count and time.
The same CSS 3D tools spin a whole page in do a barrel roll.
Scramble rules
Scramble makes 25 random turns. No turn undoes the one before it, so the mix stays real.
How many positions there are
A standard 3×3 cube has 43,252,003,274,489,856,000 positions. That is about 43 quintillion, and a perfect solver needs no more than 20 moves for any of them.
Rubik’s Cube Spin-Offs and Variants
Google did not stop at the doodle. Chrome Cube Lab added cube toys of its own:
- 808Cube and SynthCube turn the faces into music makers.
- ImageCube wraps your own photos or GIFs around the cube.
- TypeCube scrambles a text message across the faces.
Its code was open too, so developers could build cubes of their own.
Cube sizes beyond 3×3
The 2×2 Pocket Cube has eight pieces and no centres. The 4×4 Rubik’s Revenge and the 5×5 Professor’s Cube add more layers and more turns.
Notation on this page
| Key | Turn |
|---|---|
| U / D | Top or bottom layer, clockwise |
| L / R | Left or right layer, clockwise |
| F / B | Front or back layer, clockwise |
| Shift + key | Same layer, counter-clockwise |
| Arrow keys | Swing the view |
Clockwise always means as seen when you face that side. For flat puzzles, try Google Tetris or 2048 Google.
Rubik’s Cube Game Not Turning? Fixes to Try
Face Keys Not Turning?
Scroll so the cube sits on screen, then press a face letter. Keys held with Ctrl or Cmd go to the browser, not the cube.
Turns lag behind your presses
Each turn waits in a queue and plays in order. Let the queue finish, or press Reset cube to clear it.
The cube looks flat or broken
Your browser may lack CSS 3D support. Update it, or switch to a current version of Chrome, Firefox, Safari or Edge.
You lost track of the front
Press Reset view. The camera returns to the start angle, with the green face in front and white on top.
The page scrolls when you drag on a phone
Start the drag inside the cube box. Touches outside it scroll the page as normal.
FAQs
Can you still play the Google Rubik’s Cube?
Yes. Google keeps the 2014 doodle in its Doodle archive, so you can open it there. This page also gives you a full 3×3 cube with drag, face turns, a timer and a move counter.
How many moves does it take to solve a Rubik’s Cube?
Any position needs 20 moves or fewer, a limit researchers proved in 2010. Beginner methods use many more moves, because they solve the cube one layer at a time.
Who invented the Rubik’s Cube?
Ernő Rubik, a Hungarian teacher of design, invented it in Budapest in 1974. He called it the Magic Cube, and it first went on sale in Budapest toy shops in 1977.
How many combinations does a Rubik’s Cube have?
A 3×3 Rubik’s Cube has 43,252,003,274,489,856,000 positions, about 43 quintillion. Just one of them is the solved state, so random twisting almost never finds it.