SBB, or Swiss Federal Railways, said the ‘SBB Free Surf' initiative aims “to offer free internet on all SBB long-distance trains from 2020.”
Rather than a wi-fi service, the state-owned train company will test new technology from the end of 2019 that they say will allow users to use the internet with a better bandwidth.
The company says this will also allow them to incorporate the 5G system in the future.
The service will initially be based on 3G and 4G systems and will be tested on 44 trains travelling between Basel and Biel, St Gallen and Lausanne as well as Zurich and Geneva.
However, the service will only be available to people using the Sunrise or Salt providers. SBB has said it is working with other providers.
“We currently see no need to participate in this technology test," Swisscom spokesman Armin Schädeli told Handel Zeitung.
“Customers with subscriptions can surf without limits, regardless of whether they are on the train or traveling somewhere else."
To access the internet on trains, users will have to download an app and register with their phone number. The app will automatically detect when they are on a train.
Travellers without a sim card have been considered as mobile hotspots will also be made available.