Machiya (町屋/町家?) are traditional wooden townhouses found throughout Japan and typified in the historical capital of Kyoto. Machiya (townhouses) and nōka (farm dwellings) constitute the two categories of Japanese vernacular architecture known as minka (folk dwellings). Machiya originated as early as the Heian period and continued to develop through to the Edo period and even into the Meiji period. Machiya housed urban merchants and craftsmen, a class collectively referred to as chōnin (townspeople). The word machiya is written using two kanji: machi (町) meaning “town”, and ya (家 or 屋) meaning “house” (家) or “shop” (屋) depending on the kanji used to express it.
Machiya in Kyoto, sometimes called kyōmachiya (京町家 or 京町屋) defined the architectural atmosphere of downtown Kyoto for centuries, and represent the standard defining form of machiya throughout the country.
The typical Kyoto machiya is a long wooden home with narrow street frontage, stretching deep into the city block and often containing one or more small courtyard gardens or tsuboniwa. Machiya incorporate earthen walls and baked tile roofs, and could be one, one and a half, two, or occasionally even three stories high. The front of the building traditionally served as the retail or shop space, generally having sliding or folding shutters that opened to facilitate the display of goods and wares. Behind this mise no ma (店の間, "shop space"), the remainder of the main building is divided into the kyoshitsubu (居室部) or "living space," composed of divided rooms with raised timber floors and tatami mats, and the doma (土間) or tōriniwa (通り庭), an unfloored earthen service space that contained the kitchen and also serves as the passage to the rear of the plot, where storehouses known as kura (倉 or 蔵) are found. A hibukuro (火袋) above the kitchen serves as a chimney, carrying smoke and heat away and as a skylight, bringing light into the kitchen. The plot's width was traditionally an index of wealth, and typical machiya plots were only 5.4 to 6 meters wide, but about 20 meters deep, leading to the nickname unagi no nedoko, or eel beds.