There are a number of variations of this story. I’ve compiled one that I feel encompasses the main themes, but I’ve listed variations at the end. The source Japanese was mostly translated from 三枚のお札 and Japanese Wikipedia.
*Note: The talismans in the story are pieces of paper with holy writing on them.
There once lived a priest and a boy in a shrine at the foot of a mountain.
In spring, when the boy saw the village children going to the mountain to gather chestnuts, the boy yearned to go as well.
“Priest, may I also go to the mountain and look for chestnuts?”
“Shun-san, Yamanba is in the mountains catching and eating boys. You should not go.”
“But I really want to go!”
Although he was training at the shrine, the boy was still a child. His desire to go into the mountains and collect chestnuts was just as strong as the other village children.
“Very well. I will give you three talismans. Be careful.”
The priest gave the talismans to the boy who placed them in his robe and happily set off into the mountains.
The boy found and gathered a lot of chestnuts. He was having so much fun, he didn’t notice when the sun began to sink over the horizon.
When he finally noticed, it was dark all around him and the wind was blowing. The boy wrapped the chestnuts in his apron and tied it onto his back. He began to run down the mountain. But he made a wrong turn somewhere and ended up in a part of the forest he’d never been to.
“I should have listened to the priest.” he thought to himself.
But then out of the dark forest around him, he spied a single light.
“Someone lives here,” he thought relieved.
The boy ran towards the light. Inside the house was an old woman spinning thread on a spinning wheel.
“Good evening. I got lost gathering chestnuts. Is there any way you could let me spend the night?”
“Yes, you may stay. It’s cold, come warm yourself by the fire,” said the old woman looking happily at the boy. The boy warmed himself by the fire and became very sleepy.
“Just lie down there,” said the old woman as she placed a short-sleeved cotton kimono on him. The boy fell asleep almost instantly.
Rain began to fall in the middle of the night.
Pitter patter, pitter patter went the rain.
The old woman, look at her face, look at her mouth, went the rain.
The boy saw the old woman’s face through the rain.
“It’s been so long since such a delicious looking young boy has come to me.”
The old woman’s face had turned into Yamanba’s face, from her mouth, fangs protuded when she smiled as she wound the thread.
The boy realized he may not have long left to live. He had to leave before he was eaten.
“Old woman, old woman, I have to use the bathroom. Where is it?”
Her face returned to normal and she said, “Just go in the corner over there.”
“The priest will scold me. Please let me go to the bathroom.”
“All right, but I’ll tie a rope to you so you won’t get lost again. And when I call you, you better answer.” She tied a thick rope around his waist and took him to the outhouse.
After he entered the outhouse, he removed the rope and tied it around the support beam in the bathroom, he then placed one of the talismans from the priest on the same beam.
“When she calls me, you answer for me.” he said and slipped out the bathroom window and ran down the dark mountain path.
“Boy, are you finished yet?” the old woman called into the outhouse, the talisman replied, “No, not yet.”
“Boy, are you finished yet?”
“No, not yet.”
Eventually the old woman became annoyed. She barred her teeth, her face wrinkled up, horns grew from her head and she became Yamanba.
“Boy, how long do you intend to stay in there!” She jerked the rope and the outhouse came crashing down.
“Boy! You can’t get away!”
Yamanba began to run. She brought her face to the ground and caught the boy’s scent. She chased him like a wolf through the darkness.
“Wait! Boy, wait!”
The boy heard the voice rapidly approaching in the darkness. He ran and ran and ran but Yamanba was closing in on him.
The boy threw the second talisman towards Yamanba and said,
“Make a great river.”
A great river appeared in front of Yamanba and blocked her way. Yamanba began to drink the river. The boy saw a mountain he recognized. On the other side of that mountain was the shrine. He continued to run.
“Wait! Boy wait!”
The voice was coming closer again. Yamanba had swallowed the river and was closing in on him.
The boy took the third talisman and threw it at Yamanba.
“Make a sea of fire!” The third talisman became a great sea of fire in front of Yamanba.
Yamanba regurgitated the water she had just drunk and extinguished the flames.
But, the boy had finally made it back to the shrine.
“Priest, priest! I am being chased by Yamanba. She is following my scent as we speak.”
“That’s why I said you shouldn’t go to the mountains.”
“Priest, please, Yamanba is coming. Please help me!”
“All right, but you must remember from now on that if you allow your heart to be possessed by worldly pleasures another Yamanba will come for you.”
“Priest…I will train harder.”
“Good. Get in here.”
The priest put the boy in a chest and placed it in front of the statue of Buddha in the main hall.
Soon, Yamanba entered the shrine.
“Priest, did a little boy come running in here?” she said while sniffing the air.
She came close to the chest in front of the Buddha statue. From the keyhole the boy watched and feared he would cry out, but for some reason Yamanba did not come closer to the chest.
She didn’t come near the statue of Buddha.
The boy sighed in relief.
From the keyhole he saw Yamanba glaring at the box.
“Priest, give me that box.”
“If you can show me astonishing power, I’ll give you the box,” the priest promised Yamanba.
The boy became frightened thinking the priest might really give him over to Yamanba.
“All right, what do you want to see?”
“How big can you make yourself? Can you show me that?”
“Yes, I’ll show you that,” Yamanba shouted, “Bigger! Bigger! Bigger!” and she grew so large her head pressed against the ceiling. “How’s this?” she laughed from her bent position.
“Yes, very impressive. Now, how small can you make yourself?” the priest asked sounding very impressed.
“Yes, watch closely. Smaller! Smaller! Smaller!” she shouted as she shrank and shrank. She became the size of a bean and said in a tiny voice, “How’s this priest?”
“Very impressive,” the priest said as he picked her up and swallowed her whole.
Then he looked at the box, thumped his stomach and laughing said, “Now I feel very full.”
The next morning, the children were running and playing happily in front of the shrine. The went to gather bamboo shoots in the mountains. While sweeping in the garden, the priest asked the boy, “Do you want to go?”
“Yes, but work comes first,” said the boy. And they went inside to read the scriptures (sutras) together.
*The boy meets Yamanba while digging for potatoes or mountain plants
*The bathroom god gives the boy the talismans, and answers Yamanba for the boy.
*In place of the river or fire, a sand dune appears (or, if the boy receives the talismans from the bathroom god, he still has three when he leaves, so the sand dune is added to the other two).
*After drinking the river, the boy shows his butt to Yamanba and makes her laugh thus spilling the river back out. She has no defense against the fire and is burned to death.
*The priest shuts the tiny Yamanba into an urn and seals it by chanting the sutra.
*The priest has Yamanba turn into a small bug and squashes her.
*After being eaten by the priest and pooped out, Yamanba becomes a number of flies and escapes.