Puzzle Games

Tower of Hanoi

Tower of Hanoi is the classic recursive logic puzzle brought to life by MCR for TapGameHub. Invented in 1883 by French mathematician Edouard Lucas, the challenge looks deceptively simple at first glance — three upright wooden rods and a neat pyramid of color-coded disks stacked from widest at the bottom to smallest at the top on Rod A.

Tower of Hanoi preview

Ready to play?

Play here with no in-game ads. Hosted by TapGameHub; no account or installation required. Progress, where supported, stays in this browser.

Select Play game to start here.

Updated

About Tower of Hanoi

Tower of Hanoi is the classic recursive logic puzzle brought to life by MCR for TapGameHub. Invented in 1883 by French mathematician Edouard Lucas, the challenge looks deceptively simple at first glance — three upright wooden rods and a neat pyramid of color-coded disks stacked from widest at the bottom to smallest at the top on Rod A. Your objective is to rebuild that entire graduated tower on Rod C while following two ironclad rules.

Only one top disk may travel at a time, and a wider disk can never sit on top of a narrower one. Because every larger disk requires clearing all smaller disks onto the spare rod first, the puzzle teaches pattern recognition, recursive planning and clean parity rhythm across six selectable difficulty tiers.

How to play

  1. Pick your desired tower height between 3 disks and 8 disks using the - Disk and + Disk buttons in the header.
  2. Click or tap Rod A (or drag its top disk directly) to lift the smallest disk, then place it onto either Rod B or Rod C.
  3. Continue moving one top disk at a time, using the middle auxiliary rod to temporarily park sub-towers so wider base disks can cross over to Rod C.
  4. Watch the Target badge in the top bar to compare your running Moves count against the theoretical minimum for your current stack size.
  5. Tap Undo if you misplace a sub-tower, or tap Hint to see an arched golden guide showing the exact shortest move from any reachable board position.

Controls

Action Keyboard & Mouse Touch
Pick up or place on Rod A, B, C Click a rod, drag the top disk, or press keys 1, 2, 3 (or A, S, D) Tap source rod then target rod, or drag the top disk
Change stack height Click - Disk or + Disk Tap - Disk or + Disk
Undo last transfer Press Z or click Undo Tap Undo in the top bar
Show optimal next move Press H or click Hint Tap Hint in the top bar
Restart current stack Press R or click Reset Tap Reset in the top bar

Disk tiers and minimum moves

  • 3 Disks (7 moves) introduces the core three-step shuttle pattern in under twenty seconds.
  • 4 Disks (15 moves) and 5 Disks (31 moves) reward remembering which rod your opening disk needs to claim first.
  • 6 Disks (63 moves) and 7 Disks (127 moves) test sustained concentration where a single wrong turn doubles a sub-tower transfer.
  • 8 Disks (255 moves) delivers the full marathon tower, where keyboard shortcuts 1, 2 and 3 let practiced players fly through recursive cycles smoothly.

Strategy tips

  • Match your opening move to odd or even disk parity. When solving for Rod C, open by moving Disk 1 onto Rod C whenever your total disk count is odd (3, 5, 7), and open onto Rod B whenever your disk count is even (4, 6, 8). Getting move one right avoids rebuilding the entire pyramid on the wrong rod!
  • Alternate Disk 1 with the only other legal move. In an optimal run, Disk 1 moves on every odd-numbered turn, and on every even-numbered turn there is only one legal transfer that does not touch Disk 1.
  • Think in whole sub-towers rather than isolated pieces. To free Disk 5 on Rod A so it can land on empty Rod C, picture the entire 4-disk stack above it assembling cleanly on Rod B first.
  • Keep Disk 1 cycling in a consistent direction. Once your opening parity is set, Disk 1 travels around the three rods in the exact same loop order from start to finish.

Frequently asked questions

How many moves are needed for a perfect Tower of Hanoi solve?

Every stack of N disks has an exact mathematical minimum equal to two raised to the Nth power minus one — 7 moves for 3 disks, 15 for 4, 31 for 5, and up to 255 moves for 8 disks.

Can I switch the number of disks whenever I want?

Yes. Use the - Disk and + Disk buttons in the header bar to scale smoothly between a brisk 3-disk warm-up and an endurance 8-disk tower.

How does the Hint button calculate the next move?

The built-in solver evaluates your exact current rod arrangement and points out the shortest valid next transfer toward completing the entire stack on Rod C.

Does the game support both drag-and-drop and single-tap play?

Yes. You can drag the top disk smoothly from rod to rod, tap a source rod then tap a destination rod, or play rapidly on keyboard using keys 1, 2 and 3.

Are my best move counts tracked per disk count?

Yes. Each tier from 3 disks through 8 disks saves its own lowest move record locally, awarding a star badge once you match the mathematical target.

Game not loading or controls not responding? See help with loading, controls and saves.

Search 204 free games

Instant browser play — no download or sign-up.

2048Puzzle GamesA Dark RoomAdventure GamesAstrayPuzzle GamesDesert RacingRacing GamesOpen Tower DefenseStrategy GamesEvolveSimulation GamesChessBoard GamesSolitaireCard GamesHextrisPuzzle GamesRadius RaidAction GamesGem CavernsAdventure GamesFour in a RowBoard GamesCheckersBoard GamesReversiBoard GamesDots and Boxes2 Player GamesAir Hockey2 Player GamesHoop ShotSports GamesMini GolfSports GamesPizza RushCooking GamesStyle StudioDress Up GamesMath SprintLearning & Creative GamesWord SearchLearning & Creative GamesMinesweeperPuzzle GamesSudokuPuzzle GamesFreeCellCard GamesSunny LemonadeSimulation GamesSnakeAction GamesBrick BreakerAction GamesTurbo LapsRacing GamesTreasure MazeAdventure GamesSea BattleStrategy GamesTower BlocksAction GamesUnderrunAction GamesCorner DriftRacing GamesHill BuggyRacing GamesSunset HighwayRacing GamesHexGLRacing GamesSpace HuggersAction GamesBounce BackAdventure GamesLight CoilAction GamesClumsy BirdAction GamesBubble ShooterPuzzle GamesWater Sort PuzzlePuzzle GamesJewelsbackPuzzle Games0h h1Puzzle Games0h n0Puzzle GamesDino GameAction GamesBlock PuzzlePuzzle GamesClassic Pong2 Player GamesGrid DefenderStrategy GamesSpider SolitaireCard GamesFifteen SlidePuzzle GamesNonogramPuzzle GamesSokoban CratePuzzle GamesLights OutPuzzle GamesPipe PlumberPuzzle GamesLaser MirrorPuzzle GamesHashi BridgesPuzzle GamesKakuro SumsPuzzle GamesKenKen CagesPuzzle GamesSlitherlinkPuzzle GamesTangram FitPuzzle GamesUnblock CarPuzzle GamesHexa FillPuzzle GamesFlow ConnectPuzzle GamesPeg SolitairePuzzle GamesTower of HanoiPuzzle GamesUntangle PlanarPuzzle GamesCode BreakerPuzzle GamesStar BattlePuzzle GamesTents & TreesPuzzle GamesGravity MazePuzzle GamesPoly SlicePuzzle GamesChain AtomsPuzzle GamesNeon PinballAction GamesAsteroid DriftAction GamesFruit SliceAction GamesGrapple SwingAction GamesFlip RunnerAction GamesWhack-a-MoleAction GamesRhythm SpikeAction GamesAlien ShieldAction GamesSub Depth ChargeAction GamesSky InterceptorAction GamesKnife ThrowAction GamesColor GateAction GamesWell DiverAction GamesCopter CaveAction GamesLaser Grid DodgeAction GamesRiver HopperAction GamesCloud JumperAction GamesIce DodgeballAction GamesPolarity MagnetAction GamesMahjongBoard GamesGomoku FiveBoard GamesChinese CheckersBoard GamesBackgammonBoard GamesMancalaBoard GamesNine Men's MorrisBoard GamesLudo RaceBoard GamesDominoes ChainBoard GamesHex PathBoard GamesMini ShogiBoard GamesSnakes & LaddersBoard GamesCorridor WallsBoard GamesFox & HoundsBoard GamesPyramid 13Card GamesTriPeaks SolitaireCard GamesYukon SolitaireCard GamesGolf SolitaireCard Games21 StacksCard GamesHearts TrickCard GamesSpades BidCard GamesCrazy EightsCard GamesCribbage 15Card Games8-Ball PoolSports GamesBullseye ArcherySports GamesPenalty KickSports GamesTen-Pin BowlingSports GamesTable TennisSports GamesBadminton CourtSports GamesDarts 301Sports GamesIce CurlingSports GamesSki SlalomSports GamesHome Run PitchSports GamesTrack HurdlesSports GamesClay TargetSports GamesHex ConquestStrategy GamesCard BattlerStrategy GamesNode SiegeStrategy GamesTurn SquadStrategy GamesCastle TrebuchetStrategy GamesAnt TrailsStrategy GamesTraffic ControlStrategy GamesBridge TrussStrategy GamesTrap KeepStrategy GamesMars GridStrategy GamesAuto FormationStrategy GamesHighway OvertakeRacing GamesTrials BikeRacing GamesPrecision ParkingRacing GamesSpeedboat BuoysRacing GamesRail SwitcherRacing GamesIce HovercraftRacing GamesLunar TouchdownRacing GamesSlot CircuitRacing GamesPixel RogueAdventure GamesDeep DiverAdventure GamesFossil DigAdventure GamesWind GliderAdventure GamesStealth GuardAdventure GamesEcho CloneAdventure GamesLighthouse BeamAdventure GamesVine ExplorerAdventure GamesAlchemy CauldronAdventure GamesZero-G SalvageAdventure GamesDeep MinerSimulation GamesPocket FarmSimulation GamesEspresso BarSimulation GamesReef AquariumSimulation GamesMini City GridSimulation GamesCaravan TradeSimulation GamesBelt FactorySimulation GamesOrbit SandboxSimulation GamesHoneycomb HiveSimulation GamesRail NetworkSimulation GamesFlower GeneticsSimulation GamesBurger StackCooking GamesSushi BarCooking GamesWaffle IronCooking GamesRamen TimerCooking GamesSmoothie BarCooking GamesArtisan BakeryCooking GamesGelato ScoopCooking GamesSteamer BasketCooking GamesCozy RoomDress Up GamesPet SalonDress Up GamesCake DecoratorDress Up GamesSneaker StudioDress Up GamesPatio GardenDress Up GamesPortrait MakerDress Up GamesNail Art StudioDress Up GamesSticker ZineDress Up GamesTank Maze Duel2 Player GamesTap Tug2 Player GamesLight Trail Duel2 Player GamesSumo Ring2 Player GamesSlime Volley2 Player GamesWind Cannon2 Player GamesNim Strategy2 Player GamesWord RainLearning & Creative GamesLetter WheelLearning & Creative GamesTone MemoryLearning & Creative GamesFraction PieLearning & Creative GamesCapital QuizLearning & Creative GamesElement MatchLearning & Creative GamesClock AnglesLearning & Creative GamesBinary SwitchLearning & Creative GamesTyping WPMLearning & Creative GamesFlash NumbersLearning & Creative GamesTic Tac ToeBoard GamesBlock Blast PuzzlePuzzle GamesWord GuessLearning & Creative GamesWatermelon MergePuzzle GamesUnblocked Games24 gamesSolitaire12 gamesCar Games14 gamesBlock Puzzle & Merge Games12 gamesWord Games10 gamesBall & Pool Games14 gamesAction GamesArcade · Runners · Shooters · PinballAdventure GamesExploration · Roguelite · Mazes · QuestsPuzzle GamesLogic Grids · Numbers · Nonogram · MatchingRacing Games3D Racing · Drifting · Hill Climb · Time TrialsSports Games8-Ball Pool · Mini Golf · Basketball · BowlingStrategy GamesTower Defense · Turn-Based · Hex Tactics · NavalSimulation GamesIdle & Tycoon · Farming · Automation · SandboxDress Up GamesFashion · Room Decor · Makeover · Custom DesignCooking GamesRestaurant · Pizza & Burgers · Sushi · BakingCard GamesSpider Solitaire · Klondike · FreeCell · Trick-TakingBoard GamesChess · Mahjong · Checkers · vs Computer or Friend2 Player GamesSame Screen · Shared Keyboard · Multi-Touch · VersusLearning & Creative GamesWord Games · Typing Test · Mental Math · Memory