The were centres of the domains of the feudal lords in medieval Japan. The jà Âkamachi represented the new, concentrated military power of the daimyo in which the formerly decentralized defence resources were concentrated around a single, central citadel. These cities did not necessarily form around castles after the Edo period; some are known as jin'yamachi, cities that have evolved around jin'ya or government offices that are not intended to provide military services. Defined broadly, jokamachi includes jin'yamachi. It is also referred to as jà Âka, as was common before the early modern period.
The origins of jà Âkamachi dates back to the Kamakura period, but it was not until the 1570s in the Sengoku period that the jà Âkamachi predominated other types of town.
The jà Âkamachi can be divided into the shugo jà Âkamachi, in which a castle town is ruled by the resident daimyo. While the shugo jà Âkamachi were the political centres of the domain, economic activities were greater in the towns that developed around shrines and temples (monzen machi) and port towns (minato machi). In the midl-16th century, the castle towns proliferated and became both the residence of the daimyo and the political centre of the domain (sengoku jà Âkamachi).
Jà Âkamachi functions both as a military base represented by the castle and an administrative and commercial city. Oda Nobunaga was the biggest contributor to the development of early-modern jà Âkamachi. Oda aimed at promoting the heinobunri (distinguishing the samurai class from the rest by giving privileged status to samurai and disarming farmers and the rest) by forcing the samurai class to live in jà Âkamachi, while establishing rakuichi-rakuza (free markets and open guilds) to stimulate merchandising and trade. Jà Âkamachi flourished even more under Toyotomi Hideyoshi's regime, whose political and commercial epicenter Osaka-jà Âka became very prosperous as the center of commodities. Osaka continued to be the business center in the Edo period and was called the "kitchen of the land".
Most of the world's walled cities comprise a castle and a city inside the defensive walls. While Japan did have towns and villages surrounded by moats and earth mounds, such as Sakai, jà Âkamachi initially had moats and walls only around the feudal lord's castle and did not build walls around the entire city. However, as jà Âkamachi developed and increased its economic and political value, it demanded protection from wars and turmoil. More and more cities were built with moats and defensive walls, the style of which is known as so-gamae (full defence perimeter), and gradually came to resemble walled cities.
In the Edo period, jà Âkamachi served less as a military base and more as a political and economic capital for the shogunate government and domains of feudal lords. This shift was a result of the lack of warfare throughout the Edo period and the fact that most of the Han lords were occasionally transferred from one domain to another and thus had little attachment to the city per se (although crop yields remained matters of attention). Geographical locations that emphasized the castle's defensive abilities did not necessarily offer good access, and in many cases, as cities increasingly became trade centers, they abandoned their castles and relocated their government base in Jin'ya.
The population of a jà Âkamachi, of which nearly 300 existed, is varied. There are large-sized jà Âkamachi such as Kanazawa and Sendai with approximately 120,000 residents, samurai and merchants combined, while there are small-sized jà Âkamachi like Kameda in the Tohoku area with around 4,000 people. In many cases, the population is somewhere around 10,000.
The design of a jà Âkamachi aimed to stimulate commerce by reworking the closest main road to pass through the city so that traffic occurs within the jà Âka. The main road passed through the front of the castle rather than the back to demonstrate the power of the authority, regardless of geographical concerns that might exist.
Jà Âkamachi incorporated various ideas to strengthen the city's defense. To prevent invasions, it cleverly used rivers and other terrains, dug moats, built earth mounds and stone walls, and sometimes constructed heavy gateways like Masugata gates if the city was deemed strategically important. Inside the jà Âka, houses were tightly located on either side of the main street to make it harder to directly view the castle, and roads were cranked or had dead ends to elongate the route to the castle. Smaller sections of the city built fences and wooden gates, shutting them at night with guards to ward off intruders. Moats were also used as canals and played a large role in distribution of goods.
These cities tended to exist around river terraces in eastern Japan and deltas facing the ocean in western Japan, while cities like Hikone, Zeze, and Suwa are adjacent to a lake as part of the "lake type" jà Âkamachi.
Within a jà Âkamachi, smaller districts like Samurai-machi, Ashigaru-machi, Chà Ânin, and Tera-machi surrounded the castle. A Samurai-machi is a district for samurai's compounds also known as Samurai-yashiki. In principle, higher-ranked vassals owned a compound closer to the castle. Modern towns with names like Sange, Kamiyashiki-machi, Shitayashiki-machi are descendants of Samurai-machi. People at a lower status like Ashigaru were often forced to live at the outer rim of Chà Ânin districts. Today, towns with names like Banchà Â, Yuminochà Â, and Teppochà  tend to be what were originally Ashigaru-machi.
Chà Ânin-chi (Chonin district) is a district that lay outside Samurai-machi for merchants and craftsmen. Villagers who lived near the jà Âkamachi resided in Chonin-chi when they moved in. Merchants and craftsmen were allocated according to their occupation. Towns today with names like Gofuku-machi ("apparel town"), Aburaya-cho ("oil town"), Daiku-machi ("carpenter town"), Kaji-machi ("blacksmith town"), and Kà Âya-chà  ("dye-shop town") are remnants of Chà Ânin-chi. Chà Ânin-chi was smaller in land size per family compared to Samurai-machi and were tightly aligned along the streets. This is why a Chà Ânin house had a narrow entrance and great depth and was called an "eel's nest". It had two floors, but the second floor was used as a storeroom to avoid looking down at the feudal lord.
Tera-machi was placed on the outer rim of the jà Âkamachi and formed an array of large temples. It contributed to reinforcing the city's defense.
In Japan today, more than half of its cities with a population of over 100,000 are former jà Âkamachi. Their appearances have changed through great fires, war damage, and urban development. Cities with any signs of the original jà Âkamachi are decreasing, and those that have preserved the entire area are very few. However, many former jà Âkamachi have preserved remnants of the old city design, albeit partly, and cities with streets originally designed to hamper foreign intruders are indeed causing traffic congestion today. Modern cities often have other traces of jà Âkamachi, such as former chà Ânin-chi districts that still function as the city center as well as festivals and traditions that have continued since the jà Âkamachi era. Cities that have kept its design from before the Edo period are often called Sho-kyoto ("small Kyoto"). Cities with remnants of the Edo period are sometimes called Ko-edo ("small Edo").