The ungaikyō (雲外鏡, mirror above the clouds) is a yōkai of Japanese folklore, appearing in ukiyo-e artist Sekien Toriyama's yōkai census work.
The ungaikyō board appears in the third volume of his work Gazu Hyakki Tsurezure Bukuro, which details many other tsukumogami.
In his caption to the illustration to the right, Toriyama describes the ungaikyō as a kind of shōmakyō (照魔鏡), a mirror with the ability to reveal the true nature of a demon or possessed human.
In his novel Illustrated Tale of the Enchantresses of the Three Kingdoms (絵本三国妖婦伝, ehon sangoku yōfu den), Takai Ranzan describes how Daji, Di Xin's rambunctious concubine, was unmasked as a nine-tailed fox thanks to a shōmakyō.
The shōmakyō is also found among the many legends cited in the Shanhaijing.
As a tsukumogami, the ungaikyō - which is basically just a mirror - transforms once it reaches the age of one hundred.
It then possesses the power of a shōmakyō, in addition to being able to manipulate the person reflected in it.
In his book Yôkai, Dictionary of Japanese Monsters, Shigeru Mizuki says that if one fills a crystal tray with water during o-tsukimi, and uses that water to draw a yōkai on a mirror, then that yōkai will possess the mirror, making the mirror a ungaikyō.
In children's ghost books, the theme of the ungaikyō is often depicted by a tanuki carrying a mirror on its belly, the latter depiction being heavily influenced by the Yōkai daisensō film series, whose remake The Great Yokai War was released in 2005.