is a Buddhist temple in the Sowamachi neighborhood of the city of Takayama, Gifu Prefecture, Japan, in former Hida Province. It belongs to the Kà Âyasan Shingon-shà « and its honzon is a statue of Yakushi Nyorai. It is one of the few surviving provincial temples established by Emperor Shà Âmu during the Nara period (710 – 794). Due to this connection, the foundation stones of the Nara period pagoda located on temple grounds were designated as a National Historic Site in 1929.
The Shoku Nihongi records that in 741, as the country recovered from a major smallpox epidemic, Emperor Shà Âmu ordered that a monastery and nunnery be established in every province, the kokubunji. These temples were built per a semi-standardized template, and were intended for the purpose of promoting Buddhism as the national religion of Japan and standardising control of imperial rule over the provinces.
The Hida Kokubun-ji is located in downtown Takayama, a short distance from Takayama Station. The exact date of construction is believed to be around 757, over 15 years from the foundation of the provincial temple system in 741. The temple claims that it was founded by the famed wandering prelate Gyà Âki without any historical evidence. However, records indicate that the original temple burned down in 819 and was rebuilt in 855. The existing Hondà  dates from the Muromachi period. It is a National Important Cultural Property
The Nara period seven-story pagoda burned down during the à Âei period, and was reconstructed again in 1585. It was burned down again in the battles between Kanemori Nagachika and Anegakoji Yoritsuna. A three-story pagoda was built in 1615. This structure also burned down in 1791 and was rebuilt in 1820. The central stone of the Nara period pagoda, roughly square in shape, with a cylindrical base on top and a circular hole in the centre, is located to the east of the main hall, and is thus no longer in situ. It has been designated a Takayama City Historic Site
In 1695, when Takayama Castle was destroyed, the Hida Kokubun-ji inherited some of its structures, including the main gate.
The site of the Hida Kokubun-niji, the provincial nunnery associated with the Hida Kokubun-ji is now the precincts of the , a Shinto shrine located approximately 900 meters to the west of the Hida Kokubun-ji site. The foundation stones of the Kokubun-nji Kondà  were discovered when the shrine was renovated in 1988. The site has been designated a Takayama City Historic Site.