The history of Tokyo shows the growth of Japan's largest urban center. The eastern part of Tokyo occupies land in the Kantō region that together with the modern-day Saitama Prefecture, the city of Kawasaki and the eastern part of Yokohama make up Musashi; one of the provinces under the ritsuryō system. 
The 23 special wards, including Chiyoda, Chuo, Minato, Shibuya and Shinjuku wards, form the central part of Tokyo. Western Tokyo occupies the Tama district. Tokyo's oldest Buddhist temple is Sensō-ji in Asakusa, founded in 628. The name of Edo first appears in the 12th century.
The construction of Edo Castle by Ōta Dōkan, a vassal of Uesugi Mochitomo, began in 1457 during the Muromachi period in what is now the East Garden of the Imperial Palace. Shrines and temples grew up nearby, and merchants developed businesses and opened ferry and shipping routes.  Hōjō Ujitsuna entered Edo Castle in 1524.
In 1590, Tokugawa Ieyasu established himself in Edo. 
By 1590, when the military leader Tokugawa Ieyasu selected Edo as his military headquarters, the settlement surrounding Edojuku boasted a mere hundred thatch-roofed cottages. Ieyasu assembled warriors and craftsmen, fortified the Edojuku castle with moats and bridges, and built up the town. The Edo period (Edo jidai) began when Tokugawa Ieyasu became shōgun in 1603.  He was the effective ruler of Japan, and his Edo became a powerful and flourishing city as the effective national capital. However, Japan's imperial seat and official capital remained in Kyoto, but the Emperor was virtually powerless.
The outer enclosures of Edo Castle were completed in 1606,  and it continues to remain at the core of the city.
This period was marked by continuous growth which was interrupted by natural disasters, including fires, earthquakes and floods. Fires were so commonplace that they came to be called the "blossoms of Edo".  In 1657, the Great Fire of Meireki destroyed much of the city;  and another disastrous fire in 1668 lasted for 45 days. 
The Tokugawa political system rested on both feudal and bureaucratic controls, so that Tokyo lacked a unitary administration. The typical urban social order was composed of warriors, peasants, artisans, and businessmen, the latter two classes organized in officially sanctioned guilds whose number increased with trade and population growth. Because businessmen were excluded from government office, they nurtured a culture of entertainment, making Edo a cultural as well as a political and economic center. 
Edo was the world's largest city in the 18th century, with a population of over one million in 1800. Edo's lead in social change and economic growth impacted all of Japan during the 1650–1860 era. Edo's demand for human and material resources attracted immigrants, created new markets and marketing patterns, and generated improved standards of performance and new tastes for a higher standard of living. 
Tokugawa Edo was very harsh toward outcast groups. Edo imposed severe restrictions on people known as "kawata", "eta" and "hinin" (literally "nonhuman"). Not only were the laws harshly enforced, but officials created the Burakumin outcast order covering all of Japan. Intense popular fear of "pollution" and "impurity" helped determine who was targeted for discrimination, and in turn provided the foundation for Japan's elaborate official system of prejudice and intolerance.  
The city had two types of land ownership: bukechi and chochi. Bukechi, the samurai system, was used for residential property. Sales and purchases were not allowed, so the value of a parcel of land was undeterminable. Chochi was the system used by ordinary townspeople, both merchants and craftsmen, for both residential and commercial purposes. Chochi recognized private ownership - land had a known value. 
In the 1870s the Meiji reformers closed out the samurai system, putting bukechi land under the chochi rules, thereby ending an important dimension of feudal class divisions. There was no central authority in Tokyo, but rather a complex system of local districts. Local decision-making in each district was headed by two men called the machi bugyó. They issued administrative orders to the next level, comprising three full-time hereditary administrators, called toshiyori. 
The nanushi, or headmen, were in charge of wards made up of about a dozen machi. After 1720, the nanushi were organized into 20 guilds. They had the difficult challenge of protecting the overcrowded city, built of flimsy wood houses - in 1657 a huge fire destroying two thirds of Edo, causing 100,000 deaths. Such a large city could not feed itself, so the government organized an elaborate system of granaries. The Machikaisho was a warehouse for rice storage that was set up during the Kansei in the reform period, 1787–33.[ clarification needed] It increased the power of the government, while providing relief for poor city dwellers and low-interest loans to landowners. 
Terakoya, private educational institutions, functioned as schools for children of commoners. The terakoya attendance rate reached 70% in the capital Edo at the end of the 18th century and the beginning of the 19th century. The terakoya system kept Tokyo's literacy rate as high as around 70–86%, which is considerably higher than numbers of European cities in that time.
Under Tokugawa rule, a limited number of elite schools taught values of literary civilization to encourage discipline within the class of hereditarily-qualified office holders. Schools were storehouses of texts and patronized scholars, serving as waystations for bureaucratic candidates lacking office and for domainal students. the leading schools included Shoheiko (1790) for the study of Confucian classics, Wagaku-kodansho (1793) for Japanese classics, Kaiseigo (1885) for western learning, and Igakukan (1863) for the study of occidental medicine. In 1877 they merged to form Tokyo University.
The Imperial Army seized Edo and ended the Tokugawa regime in 1868. After defeating the Tokugawa forces at Toba-Fushimi in January, Imperial forces captured Edo and exiled the Tokugawa leadership. Edo was renamed Tokyo ["the eastern capital"] and the Emperor Meiji, aged 16, was brought from Kyoto and enthroned in the palace. The urban poor played little role in the upheaval, but they grumbled about the rising prices of rice and fish and the downfall of the old bakufu leadership. Their cynical and often humorous commentary on the transition appeared in newspapers, broadsheets, handbills, and woodblock prints. 
In the Meiji Era, consolidation of the government schools into the Tokyo Imperial University in 1877 brought a strong emphasis upon introducing western forms of expertise, especially in science and technology. Consultants were brought in from Europe and the United States. Kikuchi Dairoku (1855–1917), a mathematician educated at Cambridge and London, became president. Advanced schools were transformed into centers of research and publication by experts often possessing national reputation. Tight control over education was exercised by the Ministry of Education. 
The university soon played a role in national politics. Japanese nationalism became the centerpiece of education, and university scholars began to enter public debate as experts in many areas. The study of law developed rapidly at Tokyo University, making the university then (and now) the foremost supplier of bureaucratic office holders. By the 1880s the university had become an invaluable political instrument to the government bureaucracy. 
With the end of sankin-kōtai, the daimyōs and their retinue left the city—a drain of an estimated 360,000 people—and the merchants and other workers left as well. This and the warfare surrounding the Restoration brought the population down from a high of 1.3 million in the early 19th century to about 500,000 in 1869. It took another twenty years for the population to return to its pre-Restoration peak.  The population reached 2 million in 1905. In the 1870s and 1880s the nation's leaders engaged in intense discussions about the future of the capital of Tokyo. 
In 1869–71 officials experimented with the "Fifty-Ward System" to strengthen control over the population. It kept some of the old order, ended the control of local dignitaries over the wards. In 1871 the Large and Small Ward System was enacted, giving central officials control over local decisions. There was a new emphasis on citywide standards of beautification, as well as improving the infrastructure and services seen as essential to maintenance and growth of the city. City planners spoke the language of progress. Phillips (1996) examines the course taken by urban leaders of the first decades of the Meiji period in establishing planning policy, using planning documents, transcripts of planning committees, and on architectural and urban design data from completed urban improvement projects in Tokyo. Phillips (1996) argues that Japan's new commitment to modernization, transformed older notions of cities and city planning practices. 
The first decades of the Meiji period revealed a lack of elite consensus about the proper path to modernity. Rather than reject all traditional approaches to planning, planners incorporated elements into their new planning methods. Modernity in the Japanese context did not require dismantling pre-existing urban structures. Instead, it represented a marriage of the political motivations of the country's leaders with the modern urban needs for improved transportation networks and zoning mechanisms. Public opinion also mattered, and had a certain impact on how the planners put their theories and practice. 
Meiji cultural officials modeled their policies after Berlin, London and Paris. Tokyo was to become a national capital and repository of the greatest cultural treasures from across the land. For example, the "Horyuji Homotsukan" [Hall of Horyuji Treasures] of the Tokyo National Museum displayed representative items from the Horyuji temple in Nara Prefecture. Machida Hisanari (1839–97), was the "father" of the National Museum, and used the collection to promote the restored monarchy. 
Urban parks as a source of beauty, relaxation and recreation became high priority for European and American cities planners in the mid-19th century. The Meiji leadership introduced its version of the urban public park within the context of its goal of modernizing Tokyo into a world-class city by Western standards. They began with two representative sites: one in the northern district with Tokugawa connections; and a parade ground next to the palace. The hill became a park used for public celebration, while the parade ground was elaborately transformed into a consciously fashioned recreational space. They provided models for numerous other parks around the city. 
At noon on Saturday September 1, 1923, the earthquake hit, registering 8.3 on the Richter scale. Seismologists found the epicentre was in Sagami Bay, about 80 km south of Tokyo, where a 100- by 100-kilometer segment of the Philippine oceanic plate broke against the Eurasian continental plate, releasing a massive amount of tectonic energy. Minutes later came the dreaded huge tsunami, with a height of 12 meters. In Yokohama, a city built on landfill, practically every structure was ruined. As fires swept across Tokyo, 75% of all buildings suffered severe structural damage. The quake cut most of the water mains. Of the population of 4.5 million, 2% to 3% were killed. Two million people were homeless. Two per cent of Japan's total national wealth was destroyed.   Emergency food and clothing was provided by an international relief effort.
Angry survivors took revenge on resident Koreans, killing several thousand. The fierce hatred was fueled by rumors of Korean wrongdoing and because of their distinct Korean identity, rather than simply because they were not Japanese. As Allen notes, the Japanese colonial occupation of Korea provided the backdrop to this extreme example of the explosion of racial prejudice into violence, based on a history of antagonism. To be a Korean in 1923 Japan was to be not only despised, but also threatened and potentially killed. 
Japanese commentators interpreted the disaster as an act of divine punishment to admonish the Japanese people for their self-centered, immoral, and extravagant lifestyles. In the long run, the response to the disaster was a strong sense that Japan had been given an unparalleled opportunity to rebuild the city, and to rebuild Japanese values. In reconstructing the city, the nation and the Japanese people, the earthquake fostered a culture of catastrophe and reconstruction that amplified discourses of moral degeneracy and national renovation in interwar Japan. 
In the rebuilding process, former one- and two-story wood structures were replaced by modern five- and six-story buildings of concrete and steel in the European style. Straight new motorways replaced twisting narrow streets. The first underground subway system opened in 1927 and a new airport in 1931. At 6.36 million, the city's population in 1935 was larger than before the earthquake; it was nearly as large as London or New York. The "secondary centers" or "satellite cities" (fukutoshin) of Shinjuku, Shibuya, and Ikebukuro grew rapidly. They and the entire surrounding Tokyo prefecture was incorporated into the city in 1943.
In contrast to London, where typhoid fever had been steadily declining since the 1870s, the rate in Tokyo remained high, more so in the upper-class residential northern and western districts than in the densely populated working-class eastern district. An explanation is the decline of waste disposal, which became particularly serious in the northern and western districts when traditional methods of waste disposal collapsed due to urbanization. The 1923 earthquake led to record high morbidity due to unsanitary conditions following the earthquake, it prompted the establishment of antityphoid measures and the building of urban infrastructure. 
Tokyo was the center of Japan's government and its industrial and commercial infrastructure. The experience of everyday life in Tokyo dramatically changed with munitions-based heavy industrialization and the loss of liberties and urban culture as the state mobilized for total war.
Tokyo became the first Japanese city to be bombed in World War II on April 18, 1942, in the Doolittle Raid.
The sensitive issue of how to defend the capital from air attack became a pressing concern for urban planners, government officials, and even fiction writers. While the Japanese government assigned Tokyoites the responsibility of protecting the Imperial capital, devastating American firebombing raids revealed in an instant the impossibility of carrying out such a task. 
Tokyo was bombed repeatedly after November 1944 as the Americans opened air bases in the Mariana Islands that were in range. The most stunning results came on the night of March 9–10, 1945. The U.S. Army Air Forces sent 325 B-29s over Tokyo. They came in at low level and were unescorted because the Japanese air defense system was totally inadequate. They dropped 1,665 tons of incendiary bombs containing a jelly-like mixture of rubber, lye, and coconut oil, all blended with gasoline. An unstoppable conflagration burned 45 square kilometers and killed over 100,000 people in a matter of minutes. Most of the victims suffocated in bomb shelters when the raging fires consumed the oxygen. One fourth of the buildings in the entire city were destroyed. 
The raid marked a turning point in the American strategic air war against Japan. Previously, most methods were "precision" raids that used high explosives against industrial targets. Now, the strategy was to use area raids that used incendiary bombs to burn Japanese cities and kill the workers who kept the war machine going. Leaflets were dropped by the millions to order civilians to evacuate to the towns and rural areas which were not bombed. Half of Tokyo's 7.4 million residents fled. The strategy was similar to the air war against German cities and reflected prewar Air Force strategic planning, which focused on the burning of Tokyo and other industrial and command centers as a way to destroy the enemy's military capability. 
After a long interval of silence, private memories of the catastrophic firebombings became public when air raid survivors joined to write a history of the raids. In 2002 the Center of the Tokyo Raids and War Damage museum was built to transmit the experience of war. It is the only public Museum to the city's wartime experience. 
Both Tokyo City and Tokyo Prefecture were replaced in 1943 by a single Tokyo Metropolis (都). In Tokyo's case, the 35 urban wards were merged into 23, which were transferred to the current Tokyo Metropolis along with the outlying cities of Tokyo Prefecture, such as Machida, Tokyo as well as towns and village units.
The destroyed metropolis became the base from which the United States under Douglas MacArthur administered Japan for six years.
The population reached ten million in 1964 as the Summer Olympic Games that year left a deep impact on the national identity of Japan. The nation's wounded psyche and reputation from World War II was significantly healed. Rapid social changes, thematically staged in the Olympic ceremonies, enabled Japan to display an inclusive and comprehensive national pride, and underscored Japan's re-entry into the circle of developed industrial countries. The 1964 ancient arts exhibition put on by the Tokyo National Museum to coincide with the Tokyo Olympics provided an opportunity to promote Japan's traditional culture to foreign visitors and to the Japanese people themselves, as part of an effort to regain normalized status in the international community. Architect Kenzō Tange is most famous for the Yoyogi National Gymnasium, built in 1964 for the Olympics. 
Although Japan's foreign-policy was closely linked to the United States during the Cold War, the city of Tokyo hosted the 1964 Summer Olympics in the spirit of peaceful engagement with the entire international community, including the Communist states. The goals were to demonstrate to the world that Japan had fully recovered from the war, had disavowed imperialism and militarism, welcomed high-caliber sports, and sought to engage the peoples of the world on a grassroots level. Sports were kept entirely separate from politics. Enormous energy and expense was devoted to upgrading the cities physical infrastructure, including new buildings, highways, stadiums, hotels, airports and trains. There was a new satellite to facilitate live international broadcast. The event proved a great success for the city and for Japan as a whole, with no untoward incidents. Japan's foreign-policy was expanded to include sports diplomacy as the nation sent teams to international competitions across the globe. 
The vast majority of large companies, financial institutions, and government agencies continue to maintain their headquarters in the old center of the city, mainly in the Marunouchi area in the Chiyoda Ward.
Japan in the 1980s experienced a "bubble" economy, as the stock market index soared from 6000 in 1980 to 40,000 in 1989. Simultaneously, Tokyo experienced a huge increase of urban land prices. This "land bubble" phenomenon led to new strategies in the urban development process. In order to preserve the profitability of real estate schemes, developers used several means of action to increase building density, namely the jiage system and urban renewal procedure. They also experimented with new methods to avoid land purchase, such as land deposit and short-term lease contracts. These new methods of development had a great impact on Tokyo's morphology. 
Skyscrapers and high-rise buildings were built in business zones instead of narrow "pencil buildings"; huge department stores surrounded by public squares flourished in the vicinity of middle-range railway stations; and modern concrete buildings progressively replaced old wooden houses within residential zones. However, this modernization process was not closely controlled by the public authorities, and it produced an anarchic collection of high-rise buildings throughout the capital city that increased road traffic and worsened parking problems. 
In early-21st-century Tokyo, the construction of luxury residential and commercial towers in neighborhoods along the Sumida River has accelerated dramatically, altering the social composition and cultural images associated with downtown Tokyo. The new buildings stand in contrast to the sinking economy and are markers of the growing gap between rich and poor. They also reflect the pattern of urban construction and destruction as well as the unobtainable desires promised by commodity capitalism.
The Japanese media have featured articles on the escalation of youth crime and discontent, as well as the many forms of corruption that teenagers are exposed to in transformed downtown Tokyo. The 2002 Naoki literary prize was awarded to a book that reacts to both urban development and the problems facing Tokyo adolescents - Ira Ishida's 4-Teen (2002). Ishida shows the effects of Tokyo's transformations on teenage social norms and uses descriptions of urban places to reveal contradictions embedded in these roles. This article examines the context of 4-Teen's publication and the awarding of the Naoki Prize and explores how stories that mix fiction and historical experience provide new ways of viewing the changes in Tokyo. 
The boom years ended in the 1990s, and the entire nation entered decades of economic stagnation. Tokyo's real estate bubble burst. The pessimistic mood was further deepened by the 2011 Tōhoku earthquake and tsunami. Tokyo was not directly damaged, but it suffered from severe shortages of electricity and the economic impact of the earthquake, as complex manufacturing systems were disrupted.