As of July 31, 2011, the city has an estimated population of 279,851 with 143,221 households, and a population density of 412.83 persons per km2. The total area is 677.77 km2. The city is now the third biggest in Hokkaido after Sapporo and Asahikawa.
Hakodate was Japan's first city whose port was opened to foreign trade in 1854, as a result of Convention of Kanagawa, and used to be the most important port in northern Japan. Also, the city had been the biggest city in Hokkaido before the Great Hakodate Fire of 1934.
Hakodate was founded in 1454, when Kono Kaganokami Masamichi constructed a large manor house in the Ainu fishing village of Usukeshi (the word for bay in Ainu).
After his death, Masamichi's son, Kono Suemichi, and family were driven out of Hakodate into nearby Kameda during Ainu rebellion in 1512 and little history was recorded for the area during the next 100 years. There was constant low level conflict in the Oshima peninsula at the time with the Ainu as armed merchants like the Kono family established bases to control trade in the region. This conflict culminated in an uprising from 1669 to 1672, led by Ainu warrior Shakushain after which the Ainu in the region were suppressed.
Hakodate flourished during the Hoei period (1704–11), and many new temples were founded in the area. The town's fortunes received a further boost in 1741 when the Matsumae clan, which had been granted nearby areas on the Oshima Peninsula as a march fief, moved its Kameda magistracy to Masamichi's house in Hakodate.
In 1779, the Tokugawa shogunate took direct control over Hakodate, which triggered rapid development in the area. Merchant Takadaya Kahei, who is honoured as the founder of Hakodate port, set up trading operations, which included opening the northern Etorofu sea route to the Kuril island fisheries. He is credited with turning Hakodate from a trading outpost into a thriving city. A Hakodate magistracy was established in 1802.
The port of Hakodate was surveyed by a fleet of five U.S. ships in 1854 under the conditions of the Convention of Kanagawa, as negotiated by Commodore Matthew Perry.
Hakodate port partially opened to foreign ships for provisioning in the following year and then completely to foreign trade on 2 June 1859 as one of five Japanese open ports designated in the 1858 Treaty of Amity and Commerce signed with the U.S.
A mariner in Perry's fleet died during a visit to the area and became the first U.S. citizen to be buried in Japan when he was interred in Hakodate's cemetery for foreigners.
British merchant, naturalist and spy, Thomas Blakiston, took up residence in Hakodate in the summer of 1861 to establish a saw milling business and in doing so acquainted the city with western culture. He stayed in Hakodate until 1884, during which time he documented the local natural environment, equipped the local meteorological station and ran guns to the Boshin War rebels.
As one of few points of Japanese contact with the outside world, Hakodate was soon host to several overseas consulates. The Russian consulate included a chapel from where Nicholas of Japan is credited with introducing Eastern Orthodox Christianity to Japan in 1861 (now the Japanese Orthodox Church). The Orthodox church is neighbored by several other historical missionary churches, including Anglican and Catholic.
Hakodate also played a central role in the Boshin War between the Tokugawa shogunate and the Meiji Emperor which followed Perry's opening of Japan. Shogunate rebel Enomoto Takeaki fled to Hakodate with the remnants of his navy and his handful of French advisers in winter 1868, including Jules Brunet. They formally established the Republic of Ezo on December 25. The republic tried unsuccessfully to gather international recognition to foreign legations in Hakodate, including the Americans, French, and Russians.
The rebels occupied Hakodate's famous European-style Goryōkaku fort and used it as the centre of their defences in southern Hokkaido. Government forces defeated the secessionists in the Battle of Hakodate in 1869 and the city and fort were surrendered to emperor. Military leader, Hijikata Toshizō, was one of those slain in the fighting.
In 1878, Isabella Bird reported of the city in her travelogue:
The streets are very wide and clean, but the houses are mean and low. The city looks as if it had just recovered from a conflagration. The houses are nothing but tinder… Stones, however, are its prominent feature. Looking down upon it from above you see miles of grey boulders, and realise that every roof in the windy capital is "hodden doun" by a weight of paving stones.
Hakodate was awarded city status on August 1, 1922. The city escaped most of the ravages of World War II. Areas around Hakodate-yama were fortified and access restricted to the public. Many prisoners of war were interned in Hakodate and historians record a total of 10 camps. The city was subjected to two Allied bombing raids on 14 and 15 July 1945. Around 400 homes were destroyed on the western side of Hakodate-yama and an Aomori-Hakodate ferry was attacked with 400 passengers killed.
In 1976, a defecting Soviet pilot named Viktor Belenko flew his plane into the civilian airport in Hakodate.
Hakodate's size nearly doubled on December 1, 2004, when the town of Minamikayabe (from Kayabe District), and the towns of Esan and Toi, and the village of Todohokke (all from Kameda District), were merged into it.
Hakodate is located in the centre of Kameda peninsula.
The city is overlooked by Mount Hakodate, forested mountain whose summit can be reached by hiking trail, cable car, or by car. The night view from the summit is renowned in Japan as one of the best in the country, and one of the top three in the world along with Hong Kong and Naples. An obscure local nickname of the bumpy mountain is Gagyūzan (Mount Cow's Back), alluding to the way the mountain resembles a resting cow.
The former Goryōkaku fort is now used in as a public park and is popular in Hokkaido for hanami (cherry blossom viewing). Since April 2006, the park has also featured the tall, white Goryōkaku Tower. Resembling an air traffic control tower, the structure offers a panoramic view of the park, including mainland Japan across the Tsugaru Strait on clear days.
According to the Köppen climate classification, Hakodate's climate is humid subtropical (Cfa), although, the winters, though cold—average temperatures in the coldest month are around -2.5 degrees Celsius—, are not nearly as cold as a typical Hokkaido winter and summers are warm, but not necessarily hot. Hakodate features four distinct seasons. The city sees a substantial amount of snowfall during the course of the year, averaging roughly 380 cm (about 150 inches) of snow annually. Spring typically begins with some snowfall, but sees a gradual warming trend as the season progress. Summers are generally warm but not hot, with average high temperatures in the warmest month (August) hovering around 26 degrees Celsius. Fall initially is warm but becomes increasingly colder as the season progress. It is not uncommon to see snowfall in the latter parts of the fall season.
Prior to its dissolution, Air Hokkaido was headquartered in Hakodate. In January 2006, the regional airline Airtransse was headquartered in Hakodate.
The city is well known for seafood and sushi, especially for tuna, squid, salmon roe, sea urchin and crab. Hakodate shio ramen is also a famous speciality of the city. Shio (salt) ramen has a pale, clear, broth made with plenty of salt and any combination of chicken, pork bone, vegetables, fish, and seaweed. On a similar note, Hakodate's city fish is the squid. Hakodate is famous for the restaurant Ikkatei Tabiji, which serves a dish called "dancing squid": - a recently deceased squid is served with soy sauce, the sodium of which causes a cadaveric spasm when poured over the squid.
Every year (August) the city gets together for the Hakodate Port Festival. Hordes of citizens gather in the streets to dance a wiggly dance known as the Ika-odori (Squid Dance), the name of which describes the dance appropriately. The glowing lights of squid-catching boats can be seen in the waters surrounding the city. The bell of Haristos Orthodox Church is one of the 100 Soundscapes of Japan.
Hakodate Transportation Bureau operates tram (Light rail) lines.
The Hokkaido Shinkansen opened in March 2016. It currently runs to Shin-Hakodate-Hokuto Station through the Seikan Tunnel from Shin-Aomori Station. The new terminal is 17 km (11 mi) away from Hakodate Station. There are plans to extend the Hokkaido Shinkansen north to Sapporo Station by 2030.