# Hakodate Main Line

The Hakodate Main Line (函館本線, Hakodate-honsen) is a railway line connecting the cities of Hakodate and Asahikawa via Sapporo in Hokkaido, Japan. It is one of the trunk lines that is operated by the Hokkaido Railway Company (JR Hokkaido). The Sawara Line, a 35 km (22 mi) loop line from Ōnuma to Mori opened in 1945, is included as part of the Hakodate Main Line.
The Sapporo—Minami-Otaru section was the first railway line that opened in Hokkaido (including the Minami-Otaru - Temiya Line to the Otaru Port). The line was extended as the first to connect to Hakodate, though today all Sapporo—Hakodate direct passenger and freight services travel via the Chitose and Muroran lines until rejoining the Hakodate line at Oshamambe Station.
The Hokkaido Shinkansen route north of Shin-Hakodate-Hokuto approximately parallels the route of the Hakodate Main Line, with stations proposed to be built at Shin-Yakumo, Oshamambe, Kutchan, Shin-Otaru and Sapporo.
On March 27, 2022, municipalities along the line agreed to abolish the Oshamanbe—Otaru section after the opening of the Hokkaido Shinkansen extension to Sapporo in 2030. The entire section will be converted into a bus route.

## Train services
### Rapid
#### Special Rapid Airport [jp]

    Otaru/Sapporo - Shin-Sapporo - Kita-Hiroshima* - Minami-Chitose - New Chitose Airport
    *May only stop for trains toward New Chitose Airport, if there are night events hold in Es Con Field Hokkaido.

#### Rapid Airport

    Otaru/Sapporo - New Chitose Airport

#### Hakodate Liner

    Hakodate - Shin-Hakodate-Hokuto

#### Home Liner

    Teine → Sapporo

#### Niseko Liner [jp]

    Rankoshi → Kutchan - Sapporo

### Limited express
#### Hokuto

    Hakodate - Oshamambe - Higashi-Muroran - Tomakomai - Sapporo
Until the opening of the Hokkaido Shinkansen, these services usually operated on the 1966 built Nanae to Ōnuma section, bypassing (then) Oshima-Ono and Niyama. Now that Shin-Hakodate-Hokuto (formerly Oshima-Ono) is the major connection between the Hokkaido Shinkansen and zairaisen (local line) services on the Hakodate Main Line, these services have been re-routed accordingly.

#### Kamui, Lilac

    Sapporo - Asahikawa

#### Sōya

    Sapporo - Asahikawa - Wakkanai

#### Okhotsk

    Sapporo - Asahikawa - Abashiri

### Former Overnight Express services

Until the opening of the Hokkaido Shinkansen, the following sleeping car services operated;

#### Hokutosei, Cassiopeia

    Ueno - (Goryōkaku) - Hakodate - Oshamambe - Higashi-Muroran - (Shiroishi) - Sapporo

#### Twilight Express

    Osaka - (Goryōkaku) - Oshamambe - Higashi-Muroran - (Shiroishi) - Sapporo

#### Hamanasu

    Aomori - (Goryōkaku) - Hakodate - Oshamambe - Higashi-Muroran - (Shiroishi) - Sapporo

## Station list
### Hakodate to Otaru

    H: Rapid Hakodate Liner
    N: Rapid Niseko Liner
    Trains stop at stations marked "+" (in both directions) or "↓" (only for trains toward Sapporo), skip at stations marked "-". Local trains toward Sapporo may skip stations marked "◌" via a branch track.
Kitaca support has implemented in 2024, for Hakodate to Shin-Hakodate-Hokuto section.
| Station | Station | Station | Distance (km) | H | N | Transfers | Location |
| H75 | Hakodate | 函館 | 0.0 | + | | Hakodate City Tram: ■ Route 2 ■ Route 5 (Main Line and Ōmori Line, at Hakodate-Ekimae) | Hakodate |
| H74 | Goryōkaku | 五稜郭 | 3.4 | + | | South Hokkaido Railway | Hakodate |
| H73 | Kikyō | 桔梗 | 8.3 | - | | | Hakodate |
| H72 | Ōnakayama | 大中山 | 10.4 | - | | | Nanae, Kameda |
| H71 | Nanae | 七飯 | 13.8 | - | | | Nanae, Kameda |
| H70 | Shin-Hakodate-Hokuto ◌ | 新函館北斗 | 17.9 | + | | Hokkaido Shinkansen | Hokuto |
| H69 | Niyama ◌ | 仁山 | 21.2 | | | | Nanae, Kameda |
| H68 | Ōnuma | 大沼 | 27.0 | | | Hakodate Main Line Branch (Sawara Line) | Nanae, Kameda |
| H67 | Ōnuma-Kōen | 大沼公園 | 28.0 | | | | Nanae, Kameda |
| H66 | Akaigawa | 赤井川 | 31.7 | | | | Mori, Kayabe |
| H65 | Komagatake | 駒ヶ岳 | 36.5 | | | | Mori, Kayabe |
| H62 | Mori | 森 | 49.5 | | | Hakodate Main Line Branch (Sawara Line) | Mori, Kayabe |
| H58 | Ishikura | 石倉 | 62.1 | | | | Mori, Kayabe |
| H57 | Otoshibe | 落部 | 66.1 | | | | Yakumo, Futami |
| H56 | Nodaoi | 野田生 | 71.4 | | | | Yakumo, Futami |
| H55 | Yamakoshi | 山越 | 76.6 | | | | Yakumo, Futami |
| H54 | Yakumo | 八雲 | 81.1 | | | | Yakumo, Futami |
| H52 | Yamasaki | 山崎 | 88.3 | | | | Yakumo, Futami |
| H51 | Kuroiwa | 黒岩 | 94.4 | | | | Yakumo, Futami |
| H49 | Kunnui | 国縫 | 102.8 | | | | Oshamambe, Yamakoshi |
| H47 | Oshamambe | 長万部 | 112.3 | | | Muroran Main Line | Oshamambe, Yamakoshi |
| S32 | Futamata | 二股 | 120.9 | | | | Oshamambe, Yamakoshi |
| S30 | Kuromatsunai | 黒松内 | 132.3 | | | | Kuromatsunai, Suttsu |
| S29 | Neppu | 熱郛 | 140.4 | | | | Kuromatsunai, Suttsu |
| S28 | Mena | 目名 | 155.8 | | | | Rankoshi, Isoya |
| S27 | Rankoshi | 蘭越 | 163.4 | | ↓ | | Rankoshi, Isoya |
| S26 | Konbu | 昆布 | 170.3 | | ↓ | | Rankoshi, Isoya |
| S25 | Niseko | ニセコ | 179.6 | | ↓ | | Niseko, Abuta |
| S24 | Hirafu | 比羅夫 | 186.6 | | ↓ | | Kutchan, Abuta |
| S23 | Kutchan | 倶知安 | 193.3 | | + | | Kutchan, Abuta |
| S22 | Kozawa | 小沢 | 203.6 | | + | | Kyōwa, Iwanai |
| S21 | Ginzan | 銀山 | 213.4 | | + | | Niki, Yoichi |
| S20 | Shikaribetsu | 然別 | 224.1 | | + | | Niki, Yoichi |
| S19 | Niki | 仁木 | 228.2 | | + | | Niki, Yoichi |
| S18 | Yoichi | 余市 | 232.6 | | + | | Yoichi, Yoichi |
| S17 | Ranshima | 蘭島 | 237.9 | | + | | Otaru |
| S16 | Shioya | 塩谷 | 244.8 | | + | | Otaru |
| S15 | Otaru | 小樽 | 252.5 | | + | | Otaru |

### Otaru to Asahikawa

    SRA: Special Rapid Airport
    A: Rapid Airport
    N: Rapid Niseko Liner
    All trains stop at stations marked "+", some trains stop at stations marked "◌", all skip stations marked "-", and stop at stations marked "*" only during daytime.
With effect of the timetable revision implemented on 16 March 2024, during the daytime, Special Rapid Airport services (one per hour) extend to Otaru and all Rapid Airport and Rapid Niseko Liner services make all stops between Otaru Station and Teine Station. Kitaca is supported within Otaru-Iwamizawa section since 2006, and the rest section since 2024.
| Station | Station | Station | Distance (km) | SRA | A | N | Transfers | Location |
| S15 | Otaru | 小樽 | 252.5 | * | + | + | | Otaru |
| S14 | Minami-Otaru | 南小樽 | 254.1 | * | + | + | | Otaru |
| S13 | Otaru-Chikkō | 小樽築港 | 256.2 | * | + | + | | Otaru |
| S12 | Asari | 朝里 | 259.3 | - | * | + | | Otaru |
| S11 | Zenibako | 銭函 | 268.1 | - | * | + | | Otaru |
| S10 | Hoshimi | ほしみ | 271.0 | - | * | + | | Teine-ku, Sapporo |
| S09 | Hoshioki | 星置 | 272.6 | - | * | + | | Teine-ku, Sapporo |
| S08 | Inaho | 稲穂 | 273.7 | - | * | + | | Teine-ku, Sapporo |
| S07 | Teine | 手稲 | 275.7 | * | + | + | | Teine-ku, Sapporo |
| S06 | Inazumi-Kōen | 稲積公園 | 277.0 | - | - | - | | Teine-ku, Sapporo |
| S05 | Hassamu | 発寒 | 279.2 | - | - | - | | Nishi-ku, Sapporo |
| S04 | Hassamu-Chūō | 発寒中央 | 281.0 | - | - | - | | Nishi-ku, Sapporo |
| S03 | Kotoni | 琴似 | 282.5 | * | + | + | | Nishi-ku, Sapporo |
| S02 | Sōen | 桑園 | 284.7 | * | + | + | Sasshō Line (Gakuentoshi Line) | Chūō-ku, Sapporo |
| 01 | Sapporo | 札幌 | 286.3 | + | + | + | Sasshō Line (Gakuentoshi Line)  Chitose Line Namboku Line ( N06 ) Tōhō Line ( H07 ) Hokkaido Shinkansen (planned) | Kita-ku, Sapporo |
| H02 | Naebo | 苗穂 | 288.5 | - | - | | Chitose Line | Chūō-ku/Higashi-ku, Sapporo |
| H03 | Shiroishi | 白石 | 292.1 | - | ◌ | | Chitose Line | Shiroishi-ku, Sapporo |
| A04 | Atsubetsu | 厚別 | 296.5 | | | | | Atsubetsu-ku, Sapporo |
| A05 | Shinrin-Kōen | 森林公園 | 298.5 | | | | | Atsubetsu-ku, Sapporo |
| A06 | Ōasa | 大麻 | 300.8 | | | | | Ebetsu |
| A07 | Nopporo | 野幌 | 304.2 | | | | | Ebetsu |
| A08 | Takasago | 高砂 | 305.5 | | | | | Ebetsu |
| A09 | Ebetsu | 江別 | 307.3 | | | | | Ebetsu |
| A10 | Toyohoro | 豊幌 | 313.5 | | | | | Ebetsu |
| A11 | Horomui | 幌向 | 316.7 | | | | | Iwamizawa |
| A12 | Kami-Horomui | 上幌向 | 322.6 | | | | | Iwamizawa |
| A13 | Iwamizawa | 岩見沢 | 326.9 | | | | Muroran Main Line | Iwamizawa |
| A14 | Minenobu | 峰延 | 335.3 | | | | | Bibai |
| A15 | Kōshunai | 光珠内 | 339.8 | | | | | Bibai |
| A16 | Bibai | 美唄 | 343.7 | | | | | Bibai |
| A17 | Chashinai | 茶志内 | 348.1 | | | | | Bibai |
| A18 | Naie | 奈井江 | 354.3 | | | | | Naie, Sorachi |
| A19 | Toyonuma | 豊沼 | 359.0 | | | | | Sunagawa |
| A20 | Sunagawa | 砂川 | 362.2 | | | | | Sunagawa |
| A21 | Takikawa | 滝川 | 369.8 | | | | Nemuro Main Line | Takikawa |
| A22 | Ebeotsu | 江部乙 | 378.2 | | | | | Takikawa |
| A23 | Moseushi | 妹背牛 | 385.7 | | | | | Moseushi, Uryū |
| A24 | Fukagawa | 深川 | 392.9 | | | | Rumoi Main Line | Fukagawa |
| A25 | Osamunai | 納内 | 400.3 | | | | | Fukagawa |
| A27 | Chikabumi | 近文 | 419.1 | | | | | Asahikawa |
| A28 | Asahikawa | 旭川 | 423.1 | | | | Furano Line  Sekihoku Main Line  Sōya Main Line | Asahikawa |

### Sawara branch line

| Station | Station | Station | Distance (km) | Transfers | Location |
| H68 | Ōnuma | 大沼 | 0.0 | Hakodate Main Line (Main Line) | Nanae, Kameda |
| N68 | Shikabe | 鹿部 | 14.6 | | Shikabe, Kayabe |
| N67 | Oshima-Numajiri | 渡島沼尻 | 20.0 | | Mori, Kayabe |
| N66 | Oshima-Sawara | 渡島砂原 | 25.3 | | Mori, Kayabe |
| N65 | Kakarima | 掛澗 | 29.0 | | Mori, Kayabe |
| N64 | Oshironai | 尾白内 | 31.9 | | Mori, Kayabe |
| N63 | Higashi-Mori | 東森 | 33.5 | | Mori, Kayabe |
| H62 | Mori | 森 | 35.3 | Hakodate Main Line (Main Line) | Mori, Kayabe |

### Closed stations

* Hariusu: de facto disused since 1 July 1998, and closed since 18 March 2006.
* H53 Washinosu: Closed since 25 March 2016, now a signal base.
* H64 Higashiyama, H63 Himekawa, H61 Katsuragawa, H50 Kita-Toyotsu and S31 Warabitai: Closed since 4 March 2017, of which Himekawa and Kita-Toyotsu downgraded to signal bases.
* A26 Inō: Closed since 13 March 2021.
* N69 Chōshiguchi, H59 Hon-Ishikura, N71 Ikedaen, H60 Ishiya and N70 Nagareyama Onsen: Closed since 12 March 2022, of which Chōshiguchi and Ishiya downgraded to signal bases.
* H48 Nakanosawa: Closed since 16 March 2024

## Rolling stock
### Local / Rapid / Semi-Rapid
#### Hakodate to Otaru

    KiHa 40 series DMUs
    H100 series DEMUs
    KiHa 150 DMUs (Oshamambe to Otaru)
    KiHa 201 series DMUs (Rankoshi to Ebetsu)
    733-1000 series AC EMUs (Hakodate Liner only)

#### Otaru to Asahikawa

    721 series / 731 series / 733 series / 735 series AC EMUs
    KiHa 201 series DMUs (Rankoshi to Ebetsu)
    737 series AC EMUs (Iwamizawa to Asahikawa)
    H100 series DEMUs (Iwamizawa to Asahikawa)

### Limited express / Home liner
#### Hokuto / Home Liner

    KiHa 281 series DMUs
    KiHa 261-1000 series DMUs

#### Okhotsk

    KiHa 183 series DMUs

#### Sōya

    KiHa 261 series DMUs

## History

Construction of the line by the Japanese Government began with the 32 km Minami-Otaru - Sapporo section in 1880, with the 41 km Sapporo to Iwamizawa section opened in 1882 to provide a link from the significant coalmines near Iwamizawa to the Otaru Port.
The line was sold to the Hokkaido Coal Co in 1889, which extended the line 35 km from Iwamizawa to Sunagawa in 1891, and a further 61 km to Asahikawa in 1898.
The Japanese Government built the 224 km Hakodate - Shikaribetsu section, opened in 1902, with the remaining 28 km section to Otaru opening the following year.
In 1905 a 1.6 km line was built from Otaru - Minami-Otaru to connect the Hokkaido Coal Co owned line to the Hakodate line, and the Government nationalised the Hokkaido Coal Co in 1906.

### Duplication

Doubling of the line between Minami-Otaru and Iwamizawa opened 1909-11, and was extended to Sunagawa 1924-26, to Takikawa in 1956 and to Asahikawa 1964-68. The Otaru - Minami-Otaru section was duplicated in 1965.
The line from Hakodate was duplicated for 8 km to Kikyo 1941-44, with the 9 km Ishikura to Nodaoi section double-tracked in 1945. The 5 km Kikyo to Nanae section was double-tracked in 1962, and the doubling effectively extended 13 km to Ōnuma in 1966 with the construction of a new alignment for northbound trains to avoid the 1 in 50 (2%) grades between Oshima-Ono and Ōnuma.
Doubling of the 41 km section between Nodaoi and Oshamambe (excluding two gaps totalling 8 km) was undertaken in sections between 1965 and 1984, with the 13 km Mori - Ishikura section doubled between 1974 and 1979. Although the Sawara Line provides an alternative route between Ōnuma and Mori, it is operated as a local line, with all express passenger and freight trains travelling via Ōnuma-Kōen.

### Electrification

The Otaru – Sapporo – Takikawa section was electrified in 1968, and extended to Asahikawa the following year with the opening of the 4,523m Kamuikotan tunnel and associated deviation.
The 3 km Hakodate – Goryōkaku section was electrified in conjunction with the Seikan Tunnel project in 1988.
The 15 km Goryōkaku – Oshima-Ono section was electrified in conjunction with the opening of the Hokkaido Shinkansen, with the latter station renamed Shin-Hakodate-Hokuto.

### Former connecting lines
#### Hakodate – Otaru section

* Goryōkaku Station - the uncompleted Toi Line [ja] junctioned here, proposed to service a naval base to protect the Tsugaru Strait. Construction commenced in 1937, and the 29 km line was well advanced when works were suspended in 1943 due to a shortage of materials. The Seikan Tunnel was originally proposed to utilised the roadbed of the Toi Line (as well as that of the uncompleted Oma line on Honshu) until the route was altered in 1968 to that subsequently constructed.
* Two private railways near Hakodate were affected by the opening of the Sawara branch line between Ōnuma and Mori in 1945;
- The 17 km Ōnuma-Kōen to Shikabe line opened in 1929, and had the misfortune to be affected by a volcanic eruption just six months later, which closed it for two months. It closed in 1945 when the Shikabe Station on the Sawara line opened, but as the new station was some distance from the township, locals agitated for re-establishment of services to the original station. This occurred in 1948 when the last 11 km of the line from Choshiguchi was reopened by the local government, but competition from bus services resulted in the line being permanently closed in 1952.
- A line was built from Mori 9.4 km south to Sunahara in 1928. The first 3.1 km of that line was rebuilt as part of the Sawara line, and the remaining 6.3 km closed when the parallel JR line opened.
* Nakanosawa Station - The 48 km line to Setana opened in 1929/32, closing in 1987.
* Kuromatsunai Station - The local government built the line to the port of Suttsu (17 km) in 1920. It introduced the first diesel locomotive used in Hokkaido in 1952, and was closed as a result of flood damage in 1968.
* Kutchan Station - In 1919 a 13 km line opened to Kyogoku, where it connected to the private Japan Steel Works 7 km line to a mine at Wakikata. The JR line was extended 11 km to Kimobetsu in 1928, and a further 60 km to Date Monbetsu on the Muroran Main Line in 1940/41. The Wakikata branch closed in 1970 when the mine closed, and the JR line closed in 1986.
* Ozawa Station - A 762 mm (2'6") gauge horse-drawn tramway opened to the port at Iwanai in 1905. In 1912 it was replaced by a 1067 mm (3'6") gauge line, which closed in 1985. Near Iwanai the first tramway in Hokkaido, and possibly Japan, opened in 1869 as a 2.8 km gravity line linking a coal mine to the port of Kayanuma. It used timber rails and a ~1050 mm gauge, with brakemen riding the loaded wagons, and horses and cattle hauling the empty wagon back to the mine. In 1881 the line was rebuilt to 762 mm gauge with iron rails, and steam locomotives were introduced in 1927. In 1931 the tramway was replaced by a 10 km cableway linking the mine to Iwanai port, which in 1946 was replaced by a 6.3 km 1067 mm gauge line. A bridge on the new line collapsed during a typhoon in 1962, and the line was closed, with the coal mine closing two years later.
* Yoichi Station - The local government operated a 2.8 km line to the waterfront from 1933-43.

#### Sapporo area

* Teine Station - An 8 km 762 mm gauge line to Ban'naguro operated 1922-40. A proposed 10 km extension to the Ishikari river was not built.
* Sapporo Station - A horse drawn 762 mm gauge 11 km line operated north west to Kawabata, opening 1911/17 and crossing the Sassho Line near Shinkotoni. Petrol locomotives were introduced in 1922. The line was replaced by buses in 1943.
* Shiraishi Station - An electrified (1.5 kV DC) private 27 km line opened to Jozankei in 1918 for passenger service. In 1939 two branch lines totalling 8.3 km opened to link a silver/zinc/lead mine with a refinery. The ore traffic was lost to road transport in 1963, and the passenger service was replaced by buses in 1969.
* Nopporo Station - The private 57 km Yubari line was operated by the Hokkaido Colliery & Steamship Co. The initial 34 km line from Kuriyama on the Muroran Main Line (including a bridge over that line) to Yubari opened in 1926, including a switch-back (or zig-zag) section at Nishikisawa. A 23 km extension opened from Kuriyama - Nopporo in 1930. At its peak in 1965 the line carried annual tonnage of 1.5M tonnes of coal and another 0.5M tonnes of general freight, as well as 2M passengers. The entire line closed in 1975 after the closure of the mine in 1972. A 4.7 km branch to the Tsunoda mine operated 1927-70.
* Ebetsu Station - An 11 km 762 mm gauge line operated to Tobetsu, on the Sassho Line, although at each terminus the 762 mm gauge stations were on the opposite banks of the Ishikarigawa and Tobetsugawa rivers (respectively) to the JR stations.

#### Iwamizawa-Asahikawa section

* Iwamizawa Station - in 1882 the Hokkaido government opened an 11 km line to Mikasa, known as the Horonai line. In 1888 a 7 km extension to Ikushunbetsu and ~3 km branch line from Mikasa to the Horonai coal mine opened, and the line was sold to the Hokkaido Coal Co. in 1889. The line was nationalised in 1906, and closed in 1987. At Ikushunbetsu a forest railway comprising a 15 km 'main line' and a 3 km branch opened in 1938, and closed in 1955 to allow for the construction of the Katsurasawa dam.
* Bibai Station;
- The 3 km branch to Minami-Bibai opened in 1931 to service a coal mine, closing in 1973. Passenger services operated 1944-71.
- The Mitsubishi Mining Co. (MMC) opened an 8 km line to Sumiyama mine in 1914, extending the line 3 km to Tokiwadai in 1924. The line closed when the mine closed in 1972. The MMC also operated a 2 km line from Chashinai Station to a coal mine 1952-67.
* Naie Station - The Mitsui Mining Co. operated a 5 km line to Higashi Naie 1949/51 to 1968.
* Sunagawa Station;
- The Mitsui Mining Co. also opened the 7.3 km branch to Kamisunagawa in 1918. The line was nationalised in 1926, with passenger services introduced the same year. The line closed in 1994.
- A 15 km branch to Utashinai, opened by the Hokkaido Coal Co. in 1891, nationalised in 1906 and closed in 1988.
* Fukagawa Station - The first section of the Shinmei Line to Nayoro on the Soya Line opened in 1924, opening to Nayoro in 1941 and closing in 1995. A 51.2 km line was proposed from Shumarinai [ja] on that line to Chikubetsu [ja] on the Haboro Line [ja] north of Rumoi with construction commencing in 1959. A substantial steel truss bridge was constructed before work was abandoned in 1962.

### Accidents

In August 2013, three cars of a 20-car freight train derailed on the line near Yakumo after striking a two-meter piece of wood that obstructed the tracks. Although there were no injuries, the line was temporarily closed, impacting rail service to and from Hakodate Station.