"The Spirit in the Bottle" (German: Der Geist im Glas) is a German fairy tale collected by the Brothers Grimm, tale number 99. It is Aarne-Thompson type 331, the Spirit in the Bottle.
Once upon time, there was an old woodcutter and his young son. The woodcutter always wanted his son to go to school but they didn't have enough money, and after a few years he had to come home. The son insisted on going to the woods to work with his father, but the father didn't think he could handle the hard work. During a lunch break, instead of resting, he defied his father and went wandering through the forest, where he heard a voice saying it was trapped at the bottom of the tree. There he saw a bottle, but when he opened it a giant demon sprang out and said it would break his neck and kill him. The young woodcutter then challenged that the demon spirit did not have the ability to get back in the bottle. So the spirit, to show that he really could do whatever he wanted, re-entered the bottle to show the boy how strong he was, and the boy stopped the bottle up again. The demon, shocked, began begging the woodcutter's son to open the bottle again, but he refused unless the spirit promised to benefit the boy.
The spirit pleaded with him and offered to make him rich. The boy decided it was worth the risk and released the demon. The spirit gave him a special cloth with one side that would turn any object into pure silver and the other side that would heal any wound. After turning his axe into silver, he tried to cut a tree in front of his father but bent the axe head. The father was extremely disappointed that he would have to replace the axe, which belonged to his neighbor. The boy went to sell the axe head and made 400 times more money than he needed to pay for the broken axe, and finally he told his father the story of the spirit in the bottle.
After that the father recognized that the boy's cleverness had made them rich and was happy. The boy went back to school to become a doctor and became one of the most successful and famous doctors with the help of his magical cloth that healed wounds.
In an alternative version, the son squanders the money he makes from his silver and is forced to make more silver with the cloth, which disappoints his father seeing that his son is greedy and lazy. Eventually his cloth falls into a fire and he loses his wealth and desperate to recover his wealth he goes back to the woods looking for the demon in the bottle to replace his cloth, only this time the demon tricks the boy into taking his place in the bottle.