Though picturesque, they are also perilous: the tracks are still in use and most days visitors must scramble for safety as the daily train rumbles through the narrow streets.
But for many, the thrill of dodging a speedy train is part of the appeal.
"It was amazing but scary in the same sense, a little bit overwhelming being so close to the train," Australian tourist Michelle Richards told AFP.
The tracks were first built by former colonial rulers France who used the railway to transport goods and people across Vietnam, which was then part of Indochina, along with Laos and Cambodia.
During the war against US imperialists, parts of the railway were badly damaged by American bombs that rained down on the communist-ruled north.
Today the original metre-gauge tracks are still a mode of transport for tourists and travellers seeking a cheaper option.
But in the past few years, visitors to Hanoi have seized upon their photographic possibilities.
Hemmed in by houses and cafes, the tracks offer a unique charm for budding travel photographers and a business opportunity for makeshift cafe owners who have set up shops.
"It's got a really weird charm. You've got flowers from the balcony coming down, you've got buildings which are very old and close to each other. You see people here living close to the train tracks,” Hong Kong tourist Edward Tsim said.
As the train rumbles into view, everyone clears the tracks and pulls their phones out to capture the scene.
"It felt like waiting for Christmas... and when it arrived, wow, it was something else," British tourist Paul Hardiman said. "Well worth the wait."