Skip to content

About

About TowerOfHanoiOnline.com

One puzzle, done properly.

What this site is

TowerOfHanoiOnline.com is a free online version of the Tower of Hanoi puzzle. There is no sign-up, no download, and nothing to install — open the board and play.

Why it was built

Tower of Hanoi has been online for decades, usually as a small applet bolted onto a larger site. Those versions work, but they tend to stop at the minimum: drag a disk, count the moves, reset.

The interesting part of the puzzle is not making a move — it is seeing why a move was wrong. That needs history you can actually navigate, so this site was built around the timeline rather than treating it as an afterthought.

What it currently offers

  • A board from 3 to 15 disks, sized to your screen rather than fixed to a desktop layout.
  • A full move timeline. Scrub back to any earlier position and the board shows exactly that state. Play on from there and the abandoned branch is discarded cleanly.
  • Playback of your own game at four speeds.
  • Hint, Step Forward and Auto Solve, all driven by the same solver — and all working from your current position, not just from a fresh board.
  • Best scores per disk count, saved in your browser. Games finished with Step or Auto Solve don't count.
  • Focus Mode, which clears the page down to the board without disturbing your game.
  • Keyboard and screen-reader support. The board is operable with the arrow keys or 1/2/3, every move is announced, and animation respects a reduced-motion preference.
  • A solver and a calculator — the shortest solution from any position, and the move count for any number of disks.
  • Four variants and a daily challenge — four pegs, a one-way ring, two colours, a random start, and one shared scramble a day.
  • Explanations with the board beside themthe algorithm in six languages, the proof of 2ⁿ − 1, and a lesson plan for teachers.

How it is built

The site is static. Pages are plain HTML, the towers are responsive SVGs, and the disks are drawn with CSS rather than images — so there is very little to download and nothing to wait for.

Your game state never leaves your browser. Best scores and your disk-count preference are kept in local storage; there are no accounts and no tracking of individual games.

What is next

The focus stays narrow: a better board before more pages. The recursion the strategies page describes in words now runs line by line on the algorithm page, beside a live board and its tree of calls.

Play Tower of Hanoi →