Tower of Hanoi for teachers

An interactive board you can put on a course page or a slide: free, no ads, no sign-up, nothing to install.

Embed it

Paste this where your page accepts HTML (most learning platforms have an “HTML” or “embed” option in their editor). Change disks=4 to the size you want, from 3 to 10. The height of 720 fits up to 6 disks with the solver controls open; use 840 for 7 to 10 disks.

<iframe src="https://playhanoi.com/embed?disks=4" title="Tower of Hanoi: interactive board" width="100%" height="720" style="border:0;max-width:760px" loading="lazy"></iframe>
<p><a href="https://playhanoi.com/">Tower of Hanoi</a> by Play Hanoi</p>

What your students will see

The board counts moves, shows the fewest possible, and tells the student how many moves are left from wherever they are. Shuffle makes a random position and Solve from here plays the shortest solution one move at a time, which you can pause and step through.

Options

Settings in the address
SettingValuesExample
disks3 to 10 (default 4)/embed?disks=6
pegs3 or 4 (default 3)/embed?disks=5&pegs=4

Anything else in the address is ignored, and a value out of range falls back to the default.

In class

Good to know