Toji was founded in 794 when emperor Kanmu moved the capital from Nara to Kyoto, and was thus one of the earliest Buddhist temple.|
Toji literally means East Temple, although its location is in the South-West corner of Kyoto. There once was a Sai-ji 西寺, West Temple, and both temples stood alongside the Rasho-mon Gate 羅生門, Kyoto's biggest and most famous gate during the Heian period 794-1185.
In 818, the emperor Saga gave the temple to Kukai 774-835, also known as Kobo Daishi, founder of the esoteric Shingon sect. Toji's formal name, Kyo-o Gokoku-ji, means "protector of the nation".
Its five-tiered pagoda is 57m tall, making it the highest wooden tower in Japan. It was last built in 1643 after having burned five times.