Khun Tan Tunnel (Thai: อุโมงค์ขุนตาน) is a long tunnel under the Khun Tan Range. It is the longest of Thailand's seven railway tunnels.
The Khun Tan Tunnel is 1362.10 metres long, between kilometre 681.57870 and 682.94080 on the Northern line from Bangkok to Chiang Mai, between Mae Tan Noi, Wiang Tan, and Khun Tan stations. The tunnel runs under the boundary between Lampang and Lamphun Provinces.
Khun Tan Station, at the northern end of the tunnel, is the highest railway station in Thailand at an elevation of 758 m.
Historically the Khun Tan Range was a formidable natural barrier between the Kingdom of Chiang Mai and the Central Plain of Siam. The Khun Tan Tunnel was built in 1907 under the southern part of the range. It reduced the difficulties of travel between the cities of Bangkok and Chiang Mai. The tunnel took eleven years to complete. Construction was disrupted owing to the arrest of its German engineers in World War I.
Originally the tunnel had been intended for standard gauge, therefore there is extra space inside the tunnel after its having been regauged to meter gauge.
Coordinates: 18°29′N 99°16′E / 18.483°N 99.267°E