Games › Tower of Hanoi

Play Tower of Hanoi Online

Shift the whole tower from the first peg to the last, one disc at a time. Free to play right here, with no download.

▶ Play Tower of Hanoi
Advertisement

How to play Tower of Hanoi

All the discs start stacked on the left peg, biggest at the bottom. Move them one at a time onto another peg, and never place a disc on top of a smaller one. Get the whole tower onto peg 3 to win. Every extra disc doubles the work: 3 discs take at least 7 moves, and 8 discs take at least 255.

Controls

  • Phone: tap a peg to pick up its top disc, then tap another peg to drop it. You can also drag a disc.
  • Keyboard/mouse: click or drag discs, or press 1, 2 and 3 to pick up and drop on a peg. Esc puts a lifted disc back.

Tips

Move the smallest disc every other turn, always in the same direction around the pegs, and make the only other legal move in between. With an odd number of discs, start by moving the smallest disc to peg 3; with an even number, to peg 2. Stuck? Tap Show me to watch the shortest solution from where you are. Your best move count for each size is saved in the browser.

More free games