Sadako's evil spirit is based on the Japanese concept of onryō, or "vengeful ghosts.". Sadako herself is based on two famous onryō: Okiku of Banchō Sarayashiki, who was murdered and thrown down a well by the samurai she spurned, and Oiwa of the Yotsuya Kaidan, who was fooled into drinking poison and murdered by her husband.
eBay