Jacob and Wilhelm Grimm
Once upon a time there was a miller who was poor, but who had a beautiful daughter. Now it happened that he got into a conversation with the king, and to make an impression on him he said, "I have a daughter who can spin straw into gold."
The king said to the miller, "That is an art that I really like. If your daughter is as skillful as you say, then bring her to my castle tomorrow, and I will put her to the test."
When the girl was brought to him he led her into a room that was entirely filled with straw. Giving her a spinning wheel and a reel, he said, "Get to work now. Spin all night, and if by morning you have not spun this straw into gold, then you will have to die." Then he himself locked the room, and she was there all alone.
The poor miller's daughter sat there, and for her life she did not know what to do. She had no idea how to spin straw into gold. She became more and more afraid, and finally began to cry.
Then suddenly the door opened. A little man stepped inside and said, "Good evening, Mistress Miller, why are you crying so?"
"Oh," answered the girl, "I am supposed to spin straw into gold, and I do not know how to do it."
The little man said, "What will you give me if I spin it for you?"
"My necklace," said the girl.
The little man took the necklace, sat down before the spinning wheel, and whir, whir, whir, three times pulled, and the spool was full. Then he put another one on, and whir, whir, whir, three times pulled, and the second one was full as well. So it went until morning, and then all the straw was spun, and all the spools were filled with gold.
At sunrise the king came, and when he saw the gold he was surprised and happy, but his heart became even more greedy for gold. He had the miller's daughter taken to another room filled with straw. It was even larger, and he ordered her to spin it in one night, if she valued her life.
The girl did not know what to do, and she cried. Once again the door opened, and the little man appeared. He said, "What will you give me if I spin the straw into gold for you?"
"The ring from my finger," answered the girl.
The little man took the ring, and began once again to whir with the spinning wheel. By morning he had spun all the straw into glistening gold. The king was happy beyond measure when he saw it, but he still did not have his fill of gold. He had the miller's daughter taken to a still larger room filled with straw, and said, "Tonight you must spin this too. If you succeed you shall become my wife." He thought, "Even if she is only a miller's daughter, I will not find a richer wife in all the world."
When the girl was alone the little man returned for a third time. He said, "What will you give me if I spin the straw this time?"
"I have nothing more that I could give you," answered the girl.
"Then promise me, after you are queen, your first child."
"Who knows what will happen," thought the miller's daughter, and not knowing what else to do, she promised the little man what he demanded. In return the little man once again spun the straw into gold.
When in the morning the king came and found everything just as he desired, he married her, and the beautiful miller's daughter became queen.
A year later she brought a beautiful child to the world. She thought no more about the little man, but suddenly he appeared in her room and said, "Now give me that which you promised."
The queen took fright and offered the little man all the wealth of the kingdom if he would let her keep the child, but the little man said, "No. Something living is dearer to me than all the treasures of the world."
Then the queen began lamenting and crying so much that the little man took pity on her and said, "I will give you three days' time. If by then you know my name, then you shall keep your child."
The queen spent the entire night thinking of all the names she had ever heard. Then she sent a messenger into the country to inquire far and wide what other names there were. When the little man returned the next day she began with Kaspar, Melchior, Balzer, and said in order all the names she knew. After each one the little man said, "That is not my name."
The second day she sent inquiries into the neighborhood as to what names people had. She recited the most unusual and most curious names to the little man: "Is your name perhaps Beastrib? Or Muttoncalf? Or Legstring?"
But he always answered, "That is not my name."
On the third day the messenger returned and said, "I have not been able to find a single new name, but when I was approaching a high mountain in the corner of the woods, there where the fox and the hare say good-night, I saw a little house. A fire was burning in front of the house, and an altogether comical little man was jumping around the fire, hopping on one leg and calling out:
Today I'll bake; tomorrow I'll brew,
Then I'll fetch the queen's new child,
It is good that no one knows,
Rumpelstiltskin is my name.
You can imagine how happy the queen was when she heard that name. Soon afterward the little man came in and asked, "Now, Madame Queen, what is my name?"
She first asked, "Is your name Kunz?"
"Is your name Heinz?"
"Is your name perhaps Rumpelstiltskin?"
"The devil told you that! The devil told you that!" shouted the little man, and with anger he stomped his right foot so hard into the ground that he fell in up to his waist. Then with both hands he took hold of his left foot and ripped himself up the middle in two.
Source: Jacob and Wilhelm Grimm, "Rumpelstilzchen," Kinder- und Hausmärchen, vol. 1 (Göttingen: Verlag der Dieterichschen Buchhandlung, 1857) [Children's and Household Tales -- Grimms' Fairy Tales], no. 55, pp. 281-84.
The Grimms' source: Henriette Dorothea (Dortchen) Wild (1795-1867), and other sources.