The story is set in medieval Germany. Hansel and Gretel are the children of a poor woodcutter. When a famine settles over the land, the woodcutter's wife (stepmother to Hansel and Gretel) decides to take the children into the woods and leave them there to fend for themselves so she and her husband will not starve to death. The woodcutter opposes the plan but finally reluctantly submits to his wife's scheme, unaware that Hansel and Gretel have overheard them. After the parents have gone to bed, Hansel sneaks out of the house and gathers as many white pebbles as he can, then returns to his room, reassuring Gretel that God will not forsake them.
The next day, the family walks deep into the woods and Hansel lays a trail of white pebbles. Their father lights a fire for them in the woods, and goes to gather more wood. After a while, the kids realize the father isn't coming back. Gretel cries, but Hansel tells her all will be fine. After nightfall, they follow his shiny pebbles back to the house, arriving by morning. Their father is overjoyed, and takes them back in as he was very upset about leaving them in the first place.
After a while, famine strikes again, and the stepmother insists that they take the kids back to the forest to leave them. This time, she locks the door to their room so Hansel is unable to gather pebbles. Clever Hansel, though, crumbles up the small piece of bread he is given by his parents, and sprinkles crumbs along their path. Unfortunately, birds eat the crumbs, and they can't find their way home. After searching for a very long time, they come upon a house in the woods made of breads, cakes, and sugar.
They eat from the house, as they're very hungry. While they are eating, a witch comes out and invites them inside, offering them a meal, and pretending to be a kind and friendly old woman. After feeding them, she traps them in her house and makes them do chores each day, feeding them well in order to fatten them up for eating.
One day, the witch decides it is time to eat, and has Gretel light the oven and provide water for boiling her brother. After a while, the witch asks Gretel to hop in the oven to make sure it is hot enough to bake bread. Gretel, sensing the witch's intent, pretends she does not understand what the witch means. Infuriated, the witch hops into the oven herself to demonstrate what she wants, and Gretel pushes the door closed behind her, leaving "the ungodly creature to be burned to ashes". Gretel frees Hansel from the cage and the pair discover a vase full of treasure and precious stones. Putting the jewels into their clothing, the children set off for home. They arrive home to hear that their stepmother has since died from unknown causes and their father has not had a happy day since they left their home. They live happily ever after with the witch's wealth.