Sans was born in the underground, like most other monsters, being a few years older than his brother, Papyrus. Sans doesn’t remember much of his early life but one day, he and his brother were found in the capital by W.D. Gaster, Asgore’s royal scientist, who ended up adopting the two skeletons. While he was initally wary of Gaster, Sans would eventually warm up to Gaster and see him as a father, developing a strong affinity for science because of him. When Sans was a child, he watched as Gaster was attacked by one of the human children who ended up down here. Because of this event, Sans came to resent the humans.
After graduation primary school, he attended college where he studies quantum physics. There, he met Alphys who was studying robotics. There, Sans and Alpys became good friends and following their graduation, Sans and Alphys began working underneath Gaster at the CORE. One fateful day, however, one mistake lead to Gaster falling into the CORE and into the void. Due to be the only one there when Gaster fell, Sans became one of the only monsters in the Underground who could still remember Gaster.
With Gaster gone, Sans and Papyrus ended up moving to Snowdin where they have been living ever since. When Papytus wanted to join the royal guard, Sans took up several jobs in order to help Papyrus in capturing a human. This included becoming a sentry in Snowdin, Waterfall, and Hotland.
While as a sentry in Snowdin, Sans came across a large door and used it to practice knock-knock jokes. One day, the voice of Toriel, former queen of the Underground, responded to him, and they made sharing puns into a routine. Eventually, she asked him to promise to watch over and protect any human that leaves the Ruins. Despite his resentment of humans, Sans agreed.