The name Vatapi has origin in the Vatapi legend of Ramayana relating to Sage Agastya. There were two demon siblings Vatapi and Ilvala. They used to kill all mendicants by tricking them in a peculiar way. The elder Ilvala would turn Vatapi into a ram and would offer its meat to the guest. As soon as the person ate the meat, Ilvala would call out the name of Vatapi. As he had a boon that whomsoever Ilvala calls would return from even the netherland, Vatapi would emerge ripping through the body of the person, thus killing him. Their trick worked until Sage Agastya countered them by digesting Vatapi before Ilvala could call for him, thus ending the life of Vatapi at the hands of Ilvala. Two of the hills in Badami represent the demons Vatapi and Ilvala.
It is also believed that name Badami has come from colour of its stone(badam -Almond).