The miller is really proud of his daughter so one day he told the king that his daughter can spin straw into gold.
The King was very fond of money. He sent the girl to be brought before him. He led her to a chamber and said "All of this must be spun into gold before morning!"
She sat down in the corner of the room and started crying. On a sudden the door opened and a droll little man came in. "What are you weeping for?" he asked. "I must spin all this straw into gold, and I don't know how to." He took her necklace and spun all the straw into gold for her.
The king married the girl, and they made a child. The dwarf whose name was Rumpelstiltskin wanted her baby as a reward for helping her. He said that if in three days the girl guesses his name she can keep the baby.
On the third day one of the messengers came back and said "I have traveled three days and have not heard a new name except Rumpelstiltskin.
As soon as Rumpelstiltskin came back on the third day, the queen asked him "Is your name John, is it Jemmy?" "No madam" said the dwarf. "May your name be Rumpelstiltskin?" "Yes madam, you may keep your baby."