The Viking village of Berk, located on a remote island, is attacked frequently by dragons, which take livestock and damage property. Hiccup, the awkward fifteen-year-old son of the village chieftain, Stoick the Vast, is deemed too scrawny and weak to fight the dragons, so he instead creates mechanical devices under his apprenticeship with Gobber, the village blacksmith, though Hiccup’s inventions often backfire. During one attack, Hiccup uses a bolas launcher to shoot down a Night Fury, a dangerous and rare dragon of which little is known, but no one believes him, so he searches for the fallen dragon on his own. He finds the dragon in the forest, tangled in his net, but cannot bring himself to kill it, and instead sets it free.
Stoick assembles a fleet to find the dragons’ nest, and enters Hiccup in a dragon-fighting class taught by Gobber with the other teenagers, Fishlegs, Snotlout, Ruffnut, Tuffnut, and Astrid, a tough Viking girl on whom Hiccup has a crush, to train while he is away. Hiccup returns to the forest and finds the Night Fury still there, unable to fly because Hiccup’s bolas tore off half of its tail fin. Hiccup befriends the dragon by offering fish, giving it the name ‘Toothless’, after its retractable teeth. Feeling guilty for crippling Toothless, Hiccup designs a harness rig and a prosthetic fin that allow the dragon to fly with Hiccup controlling the prosthetic.
Hiccup learns about dragon behavior as he works with Toothless, and is able to nonviolently subdue all the captive dragons during training, earning him the admiration of his peers but causing Astrid to become increasingly suspicious of his behavior. Meanwhile, Stoick’s fleet arrives home unsuccessful, though Stoick is cheered by Hiccup’s unexpected success in dragon training. Hiccup is judged the winner of his training class, and must kill a dragon for his final exam. He tries to run away with Toothless, only to be followed by Astrid in the forest. Hiccup takes Astrid for a flight to demonstrate that the dragon is friendly. When Astrid reminds Hiccup of the exam, Toothless unexpectedly takes the pair to the dragons’ nest, where they discover a gargantuan dragon named the Red Death, which eats the smaller dragons unless they constantly bring it live food; the two realize that the dragons have been attacking Berk under duress. Astrid wishes to tell the village about their discovery, but Hiccup advises against it to protect Toothless.
Back at the village the next day, Hiccup faces a captive Monstrous Nightmare dragon in his final exam. Instead of killing it, however, he subdues it in an attempt to prove that dragons are peaceful. When Stoick inadvertently angers the dragon into attacking, Toothless arrives to protect Hiccup, but is captured by the Vikings in the process. Hiccup accidentally reveals to Stoick that Toothless knows the location of the dragons’ nest; Stoick disowns his son, and sets off for the nest with Toothless chained to the lead ship as a guide. After the Vikings have left, Hiccup is devastated, but Astrid prompts him to come to the realization that he spared Toothless out of compassion and empathy, not weakness. Hiccup then regains his confidence to go after Toothless and save him along with Astrid and the other teens.
The Viking attackers locate and break open the dragon’s nest, causing most of the dragons to fly out, but also awakening the Red Death, which soon overwhelms the Vikings. Hiccup, Astrid, and their fellow pupils fly in, riding Berk’s captive training dragons, providing cover fire, and distracting the Red Death while Hiccup frees Toothless. Hiccup almost drowns while doing so, but Stoick saves them both, reconciling with his son. Toothless and Hiccup destroy the Red Death by puncturing its wing membranes and then tricking the beast into making a plunge from which it cannot pull up after shooting a fireball into its mouth. Hiccup is injured in the fight, losing his lower left leg. Hiccup awakens back on Berk, finding that Gobber has fashioned him a prosthesis, and he is now admired by his village, especially Astrid, who kisses him. Berk begins a new era, with humans and dragons living in harmony.