Tower of Hanoi Unblocked

Move the whole ring stack to the right peg without placing big rings on small ones.

Tower of Hanoi

About Tower of Hanoi

Three pegs, a stack of colorful rings and one strict rule: a bigger ring can never sit on top of a smaller one. Tower of Hanoi is a centuries-old logic puzzle, and this version challenges you to move the full stack from the left peg over to the right. It's easy to learn and surprisingly tricky to do well.

You carry one ring at a time, and a counter shows your moves next to the lowest possible total, so you always know how close you are to a perfect solve. It begins with three rings, but you can add more for a much longer puzzle. Stuck? A built-in solver plays out the ideal sequence so you can watch the pattern and then try it yourself.

How to play Tower of Hanoi

  1. Choose a peg to pick up the ring on top.
  2. Move to another peg and drop the ring there.
  3. Set rings down only on bare pegs or on rings bigger than themselves.
  4. Rebuild the complete tower on the far right peg.
  5. Try to match the minimum move count, then add another ring.

Tower of Hanoi controls

InputAction
Left / Right arrows or A / DChoose a peg
Space / Enter / Up / DownPick up or drop a ring
RRestart
Left clickPick up or drop on a peg
TapPick up or drop on a peg

How to play Tower of Hanoi on PC and mobile

On PC, laptop or Chromebook

  1. Press Play on this page – the game loads right here, with nothing to download.
  2. Click Fullscreen under the game for the biggest view. Press Esc to exit.
  3. Click once inside the game so it receives your keyboard input.
  4. Controls: Left / Right arrows or A / D choose a peg; Space / Enter / Up / Down pick up or drop a ring; R restart; Left click pick up or drop on a peg.

On phone or tablet

  1. Open this page in Chrome or Safari and tap Play.
  2. Turn your device to landscape – the game is designed for a wide screen.
  3. Touch controls: Tap to pick up or drop on a peg.
  4. Tap Fullscreen to hide the browser bars.

Tips and tricks

  • If the ring count is odd, send the smallest ring to the right peg first; if it's even, send it to the middle.
  • In a perfect solve, the smallest ring moves every other turn, always circling the same way.
  • On turns when you aren't moving the smallest ring, only one other legal move exists, so make it.
  • Run the solver once on four or five rings to see the rhythm clearly.

Tower of Hanoi FAQ

What's the fewest number of moves?

Take 2 to the power of the ring count and subtract one. Three rings take 7 moves, four take 15 and five take 31.

Does dropping a ring back on the same peg count?

Yes. Every drop adds to the counter, even if the ring lands where it started.

How do I change the number of rings?

Use the plus and minus icons in the corner. You can go down to three rings, and changing the count starts a new puzzle.

Can I play Tower of Hanoi for free?

Yes. Tower of Hanoi is free to play in your browser on The Pizza Edition – no download, install or account needed, and there are no ads inside the game itself.

Does Tower of Hanoi work on Chromebook and mobile?

Yes. Tower of Hanoi runs in any modern browser on Chromebooks, Windows PCs and Macs, and it supports touch controls on phones and tablets.

Who made Tower of Hanoi?

Tower of Hanoi (originally released as Towers of Hanoi) was made by Douile and released as open source under the MIT license. The Pizza Edition hosts the game files on its own servers, so it loads straight from this site.

Credits and license

Original game
Towers of Hanoi
Made by
Douile
Source code
github.com/Douile/tower-of-hanoi
Code license
MIT
Art and sound
MIT (rings and pegs drawn in code; Feather icons, MIT)

Tower of Hanoi runs from this site with small changes, which are listed in “What we changed”. The original license and credits are kept with the game files.

Games like Tower of Hanoi

More puzzle

Explore more categories