There are 24 Pieces of Heart in A Link to the Past, plus a full Heart Container in the Sanctuary. Four pieces make a heart, so all 24 add six hearts. Most of the pieces are in the Light World, but you reach many of them by finding the matching spot in the Dark World and using the Magic Mirror.
Quick answers
How many hearts can Link have? 20: three to start, six from the 24 pieces, ten from the dungeon bosses and one in the Sanctuary.
The Magic Mirror trick: if a piece is on a ledge or island you can't reach, go to the same spot in the Dark World and use the Mirror.
Luck-based pieces: the Treasure Chest Game and the Digging Game in the Dark World can take a while.
Pieces of Heart collected: 0 / 24
Tick each piece as you find it. Your ticks are saved in this browser only.
Light World 18
Lost Woods cave
In the eastern part of the Lost Woods, cut the patches of grass and drop into the hole hidden under them.
Lumberjacks' tree
After you defeat Agahnim at Hyrule Castle, dash into the tree outside the Lumberjacks' house with the Pegasus Boots. It opens a cave with the piece.
Rocks west of the Sanctuary
Dash into the pile of rocks due west of the Sanctuary to uncover a cave.
Kakariko well
Drop down the well in Kakariko Village and bomb the cracked wall inside.
Thieves' hideout
Bomb the cracked wall in the basement of the thieves' hideout in Kakariko (Blind's hideout).
15-second game
West of the quarreling brothers' house, reach the end of the cave in under 15 seconds.
Below the Desert Palace
Leave the Desert Palace by its western exit and follow the ledge down to the piece.
Aginah's cave
Bomb the cracked wall inside Aginah's cave in the Desert of Mystery.
Swamp Ruins pond
In the Light World swamp, pull the lever inside the Swamp Ruins (the dam) to drain the pond outside, then pick up the piece.
Below Zora's Waterfall
Once you have the Flippers, drop down Zora's Waterfall from the east. The piece sits in a fenced patch just south of it.
Death Mountain ledge cave
Drop from the ledge south of Spectacle Rock on Death Mountain and go into the cave there.
Spectacle Rock
In the Dark World, stand on the eastern "eye" of Spectacle Rock and use the Magic Mirror. You reappear by the piece.
East Death Mountain peak
Go through the cave on the Dark World side of Death Mountain, then use the Magic Mirror to reach the isolated eastern peak in the Light World.
Cave past Turtle Rock
Partway through Turtle Rock you come out onto a long ledge. Cross it and use the Magic Mirror to warp into a Light World cave with the piece.
Ledge above the Graveyard
In the Dark World, climb the ladder north of the Ghostly Garden and use the Magic Mirror to land on the ledge above the Light World Graveyard.
Desert cliff cave
In the north-east of the Dark World's Swamp of Evil (Misery Mire), use the Magic Mirror. In the Light World, lift the big rock on the ledge and go into the cave.
Ledge south of the Haunted Grove
In the Dark World, go to the area around the Swamp Palace and use the Magic Mirror to reach the ledge below the Haunted Grove. The piece is in a cave.
Lake Hylia islet
In the Dark World's Ice Lake, stand on the shallow island in the north-west ringed by rocks and use the Magic Mirror. You land on the islet with the piece.
Dark World 6
Cape and Hookshot cave
At the foot of Dark World Death Mountain, a sign promises a Piece of Heart to whoever wears the cape. Hookshot across the gap and pass through the bumper with the Magic Cape on.
Treasure Chest Game
Play the Treasure Chest Game in the Village of Outcasts. The piece turns up as a prize eventually.
Stake garden
Pound all 22 stakes in the stake garden south of the smithy in the Dark World. A cave opens with the piece.
Digging Game
Play the Digging Game south of the Village of Outcasts. The piece is buried in a random spot, so keep playing.
Cave west of Misery Mire
Go into the cave on the west side of Misery Mire.
Pyramid of Power
On the lowest ledge on the east side of the Pyramid of Power.
Heart Containers
Each dungeon boss leaves a Heart Container: the Armos Knights, the Lanmolas, Moldorm, the Helmasaur King, Arrghus, Mothula, Blind, Kholdstare, Vitreous and Trinexx. An eleventh sits in the Sanctuary; you can pick it up any time after you bring Zelda there. Agahnim and Ganon leave none.