Trainline was established in 1997 by the Virgin Group, and online ticket sales began in 1999. It was operated under contract by Capgemini. Stagecoach later purchased a 49% shareholding. In February 2004 Trainline merged with Qjump, its main competitor. Stagecoach sold out, with Virgin having an 86% shareholding in the merged company with National Express owning the other 14%.
In July 2006, Exponent Private Equity acquired Trainline. In July 2007, Trainline acquired Advanced Smartcard Technologies and ECEBS, signalling a new strategy to enter the smartcard market. Ecebs was subsequently sold to Bell ID in November 2012.
The company was bought from Exponent by KKR in January 2015. In August 2015, the company announced it had changed its name from thetrainline.com to Trainline.[12] In 2016, acquired Captain Train and re-branded it as Trainline EU.
In June 2019, after an initial public offering, the company floated on the London Stock Exchange. At the end of February 2021, Clare Gilmartin stepped down as CEO and was replaced by Jody Ford who had joined the business in July 2020