The 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 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 close the Oshamanbe—Otaru section after the opening of the Hokkaido Shinkansen extension to Sapporo in 2030. The entire section will be converted into multiple bus routes. However, the bus companies along the line have stated that they do not currently have the capacity to provide the replacement routes, and municipalities have threatened to withdraw support for the line's closure.

Train services

Rapid Special Rapid Airport Otaru/Sapporo - - * - - *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 Rankoshi → Kutchan - Sapporo

Limited express Hokuto Hakodate - Oshamambe - - 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 - Okhotsk Sapporo - Asahikawa -

Former Overnight Express services Until the opening of the Hokkaido Shinkansen, the following sleeping car services operated; Hokutosei, Cassiopeia - (Goryōkaku) - Hakodate - Oshamambe - Higashi-Muroran - (Shiroishi) - Sapporo Twilight Express - (Goryōkaku) - Oshamambe - Higashi-Muroran - (Shiroishi) - Sapporo Hamanasu - (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 ("Fujishiro Branch Line"). Kitaca support has implemented in 2024, for Hakodate to Shin-Hakodate-Hokuto section. Station Distance(km) H N Transfers Location 0.0+ Hakodate 3.4+ South Hokkaido Railway 8.3-   10.4-   Nanae, Kameda 13.8-   ◌ 17.9+ Hokuto 27.0 Hakodate Main Line Branch (Sawara Line) Nanae, Kameda 28.0 31.7 Mori, Kayabe 36.5 49.5 Hakodate Main Line Branch (Sawara Line) 62.1 66.1 Yakumo, Futami 71.4 76.6 81.1 88.3 94.4 102.8 Oshamambe, Yamakoshi 112.3 132.3 Kuromatsunai, Suttsu 140.4 155.8 Rankoshi, Isoya 163.4↓  170.3↓  179.6↓  Niseko, Abuta 186.6↓  Kutchan, Abuta 193.3+  203.6+  Kyōwa, Iwanai 213.4+  Niki, Yoichi 224.1+  228.2+  232.6+  Yoichi, Yoichi 237.9+  Otaru 244.8+  252.5+ 

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 Distance(km) SRA A N Transfers Location Otaru 252.5*++  Otaru 254.1*++  256.2*++  259.3-*+  268.1-*+  271.0-*+  Teine-ku, Sapporo 272.6-*+  273.7-*+  275.7*++  277.0---  279.2--- Nishi-ku, Sapporo 281.0---  282.5*++  284.7*++ (Gakuentoshi Line) Chūō-ku, Sapporo 286.3+++Kita-ku, Sapporo 288.5-- Chūō-ku/Higashi-ku, Sapporo 292.1-◌ Shiroishi-ku, Sapporo 296.5  Atsubetsu-ku, Sapporo 298.5  300.8  Ebetsu 304.2  305.5  307.3  313.5  316.7  Iwamizawa 322.6  326.9 335.3  Bibai 339.8  343.7  348.1  354.3  Naie, Sorachi 359.0  Sunagawa 362.2  369.8 Takikawa 378.2  385.7  Moseushi, Uryū 392.9 Rumoi Main Line (Closed 2026) Fukagawa 400.3 419.1  Asahikawa 423.1

Sawara branch line

Station Distance(km) Transfers Location Ōnuma 大沼 0.0 Hakodate Main Line (Main Line) Nanae, Kameda 鹿部 14.6 Shikabe, Kayabe 渡島沼尻 20.0 Mori, Kayabe 渡島砂原 25.3 掛澗 29.0 尾白内 31.9 東森 33.5 Mori 森 35.3 Hakodate Main Line (Main Line)

Closed stations Hariusu: De facto disused since 1 July 1998, and closed since 18 March 2006. H53 : Closed since 25 March 2016, now a signal base. H64 , H63 , H61 , H50 and S31 : Closed since 4 March 2017, of which Himekawa and Kita-Toyotsu downgraded to signal bases. A26 : Closed since 13 March 2021. N69 , H59 , N71 , H60 and N70 : Closed since 12 March 2022, of which Chōshiguchi and Ishiya downgraded to signal bases. H48 : Closed since 16 March 2024 H69 and S32 : Closed since 14 March 2026

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 .

Former connecting lines Hakodate – Otaru section Goryōkaku Station - the uncompleted 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.