Long ago, a drop of sunlight fell onto Earth and grew a magical flower capable of healing illness, decay, and injury. For hundreds of years, the flower is used by a woman named Mother Gothel to retain her youth, until soldiers from a nearby kingdom find the flower and use it to heal their ailing and pregnant queen. Shortly afterward, the Queen gives birth to a shockingly blonde Princess Rapunzel. While attempting to recover the flower, Gothel discovers that Rapunzel’s golden hair contains the flower’s healing properties. She tries to steal Rapunzel’s hair but discovers that cutting her hair destroys its power. Gothel instead abducts the baby and raises Rapunzel as her own daughter in an isolated tower. In order to keep Rapunzel content in the tower, Gothel lied about the outside world being dangerous and filled with bad people who will hurt her and take advantage of her magical capabilities. Gothel often left their tower to find gifts for Rapunzel, leaving the girl alone most of the time. Once a year, the King and Queen release sky lanterns on Rapunzel’s birthday, hoping for their daughter to see them and return.

On the eve of her 18th birthday, Rapunzel, who sees the lanterns each year on her birthday, asks to leave the tower and discover their source. Gothel refuses, claiming that the outside world is a dangerous place. Meanwhile, a thief named Flynn Rider takes the crown from the palace before ditching the Stabbington brothers, his comrades, while running from the palace guards. He finds Rapunzel’s tower but is knocked out by a frying pan and hidden in the closet by Rapunzel. Gothel returns, and Rapunzel tries to explain to her how she can handle herself in the “dangerous” outside world because she incapacitated Flynn, but Gothel tells Rapunzel that she’s not leaving the tower, ever. Rapunzel sends Gothel away to buy her paints and hides the crown, and convinces a reluctant Flynn to take her to see the flying lanterns for her birthday. She promises that she’ll give him the crown if he obliges. Eager to reclaim the crown, Flynn takes Rapunzel to the Snuggly Duckling, a pub filled with menacing thugs, in an effort to discourage her into returning home, but instead, the thugs are charmed by Rapunzel when she encourages them to follow their dreams. Meanwhile, Gothel, after discovering Maximus, a relentless palace horse who is determined to bring Rider to justice, near the tower, returns to the tower in fear that his rider might have found Rapunzel. She instead discovers Rapunzel missing and Flynn’s satchel, in which she decides to go after the two herself. Royal soldiers led by one of the royal army’s horses, Maximus, arrive in search of Flynn. Rapunzel and Flynn escape but are then trapped in a flooding cave. Resigned to his fate, Flynn reveals his real name: Eugene Fitzherbert. Rapunzel remembers that her hair glows when she sings and uses it to provide enough light to find a way out of the cave. Eugene and Rapunzel take refuge in a forest where Gothel, now in league with the Stabbingtons, gives the crown to Rapunzel and suggests using it to test Eugene’s faithfulness.

In the morning, Maximus finds the pair and tries to arrest Flynn, but Rapunzel arranges a truce in honor of her birthday. The group reaches the kingdom and enjoys the festivities, culminating in an evening cruise as the lanterns are released. There, Rapunzel gives Eugene the crown after fulfilling her dream of seeing the lanterns in person. Rapunzel and Eugene realize they have fallen in love and are about to kiss when Eugene notices the Stabbingtons on the shore. Eugene leaves Rapunzel to give them the crown as an apology, but they knock him out, tie him to a boat and attempt to capture Rapunzel, after convincing her that Eugene has left her. Gothel then stages a rescue, betraying and incapacitating the brothers, and leaves with Rapunzel as Eugene and the Stabbingtons are detained at the palace.

Back at the tower, Rapunzel recognizes the symbol of the kingdom, which she had subconsciously incorporated into her paintings over the years. Realizing that she is the long-lost princess, she confronts Gothel. As Eugene is sentenced to hang, Maximus and the Duckling thugs help him escape. Maximus then carries him back to Gothel’s tower. Eugene enters by climbing Rapunzel’s hair, only to find Rapunzel chained and gagged. Gothel fatally stabs Eugene and tries to force Rapunzel to leave with her, but Rapunzel agrees to submit forever willingly if she is allowed to heal Eugene. Eugene, wanting Rapunzel to be free, cuts off her hair, which causes it to turn brown and lose its magic, causing Gothel to age rapidly. She trips and falls out of the window of the tower, turning to dust even before she hits the ground.

A heartbroken Rapunzel mourns for Eugene who dies in her arms. However, her tear, which still contains the flower’s power, lands on his cheek and restores his life. The two return to the kingdom and Rapunzel reunites with her parents. Overjoyed, the kingdom breaks out in celebration, and Eugene is pardoned for his crimes. Rapunzel and Eugene eventually marry.