Tower of Hanoi

Free online puzzle game · Plays instantly in your browser · Works on mobile & desktop

Tower of Hanoi gameplay screenshot

▶ Play Tower of Hanoi Now

The timeless disk-stacking puzzle, reimagined with smooth animations and a glowing violet-to-teal disk palette. Move the whole tower one disk at a time, never stacking a bigger disk on a smaller one. Pick 3 to 8 disks, race the move counter against the mathematical optimum, and beat your own best.

About Tower of Hanoi

Tower of Hanoi is a classic mathematical puzzle invented in the 19th century. You start with a stack of graduated disks on the left peg, largest at the bottom, and must rebuild the entire stack on another peg. The only rules: move one disk at a time, and never set a larger disk atop a smaller one. The minimum number of moves needed is exactly 2^N - 1, so a 3-disk tower takes 7 moves while an 8-disk tower demands a disciplined 255. This build adds satisfying lift-and-drop animations, a live timer, an optimal-move target, persistent best scores for every disk count, and a watchable auto-solver that plays the perfect solution.

How to play Tower of Hanoi

Choose how many disks you want (3 to 8) using the selector. The full stack begins on the left peg. Drag the top disk of any peg and drop it onto another peg, or use the keyboard to lift and place. A disk can only land on an empty peg or on top of a larger disk. Keep going until the entire tower is rebuilt on either of the two right-hand pegs. Your move count is shown alongside the optimal target (2^N - 1); finish in exactly that many moves for a perfect run. Use Undo to take back a slip, New game to restart, and Auto-solve to watch the optimal sequence demonstrated.

Controls

Mouse / touch: drag the top disk of a peg and drop it onto another peg. Keyboard: Left/Right arrows (or A/D) select the source peg; Up (or W) lifts the top disk; while lifted, Left/Right aim at a target peg; Down or Enter drops it (aiming back at the source cancels the lift); Esc cancels a lift. Shortcuts: R new game, U undo, S auto-solve, M mute.

Tips & tricks

Frequently asked questions

How do you play Tower of Hanoi?

Choose how many disks you want (3 to 8) using the selector. The full stack begins on the left peg. Drag the top disk of any peg and drop it onto another peg, or use the keyboard to lift and place. A disk can only land on an empty peg or on top of a larger disk. Keep going until the entire tower is rebuilt on either of the two right-hand pegs. Your move count is shown alongside the optimal target (2^N - 1); finish in exactly that many moves for a perfect run. Use Undo to take back a slip, New game to restart, and Auto-solve to watch the optimal sequence demonstrated.

What are the controls for Tower of Hanoi?

Mouse / touch: drag the top disk of a peg and drop it onto another peg. Keyboard: Left/Right arrows (or A/D) select the source peg; Up (or W) lifts the top disk; while lifted, Left/Right aim at a target peg; Down or Enter drops it (aiming back at the source cancels the lift); Esc cancels a lift. Shortcuts: R new game, U undo, S auto-solve, M mute.

Is Tower of Hanoi free to play online?

Totally free. You can play Tower of Hanoi in the browser without paying, downloading or signing up for anything.

Can I play Tower of Hanoi on mobile?

Yes. Tower of Hanoi works in any modern mobile browser with full touch support, so it plays on phones and tablets as well as on a laptop or desktop — nothing to install.

Who made Tower of Hanoi?

Tower of Hanoi was built in-house by the GameStudioHub team using open web technology (HTML5), which is why it runs instantly without any download.

More free puzzle games

Tower of Hanoi is one of many free puzzle games on GameStudioHub. Browse the whole Puzzle collection, or head back to the home page to explore every category.