How to play Tower of Hanoi
Move the whole tower of disks from the left peg to any other peg. Only one disk moves at a time, you may only take the top disk of a peg, and a disk may never sit on a smaller disk.
Controls
- Drag the top disk of a peg onto another peg (mouse or touch), or
- Tap a peg to lift its top disk, then tap the destination peg.
- Keyboard: press 1–4 to pick the source peg, then the destination peg. Esc cancels, U undoes.
Scoring
The minimum number of moves for n disks on 3 pegs is 2n − 1 (7 for 3 disks, 1023 for 10). With 4 pegs the puzzle is much shorter; the minimum shown uses the Frame–Stewart formula. Your best moves and best time for each disk count are saved.
Want to see how it's done? Press Demo to watch the computer solve the tower perfectly.
Tip
On 3 pegs, the smallest disk moves every other turn, always cycling in the same direction. With an odd number of disks, move it first to the target peg; with an even number, to the spare peg.
About this tower of hanoi
Move the whole tower to another peg, never placing a larger disk on a smaller one. Play Tower of Hanoi free in your browser on desktop, tablet or phone. It works offline once loaded — perfect for travel. Your progress and best scores are saved on your device. Popular searches: hanoi puzzle.
Tower of Hanoi FAQ
Is Tower of Hanoi free to play?
Yes. Tower of Hanoi is completely free on GamesVora. There is nothing to download or install and you don't need an account.
Can I play Tower of Hanoi offline?
Yes. Once you have opened GamesVora while online, Tower of Hanoi is saved on your device and you can keep playing without an internet connection.
Does Tower of Hanoi work on mobile phones and tablets?
Yes. Tower of Hanoi works in any modern browser on Android phones, iPhones, iPads, tablets, laptops and desktop computers, with touch, mouse and keyboard controls.
Is my progress saved?
Your settings, best scores and statistics are saved in your browser on this device. Clearing your browser data will reset them.
What other games are like Tower of Hanoi?
If you enjoy Tower of Hanoi, try the other games in our Brain & Math collection — they are all free and work offline too.