On the day of the incident, the 18:25 service from Doncaster was diverted and stopped at Huntingdon, where Williams was arrested.
Multiple 999 calls had been made from the train.
Williams faces a total of 21 charges.
He is charged with attempting to murder Jonathan Gjoshe, Sachin Balakrishnan, David Presland, Scott Bletcher, Scott Green, Kevin Deely, Stephen Crean, Raza Aslam, Michael Paffett, and Samir Zitouni on the train near Huntingdon on 1 November 2025.
He is also charged with attempting to murder Dawid Taborski, William Ogelby and a 14-year-old boy in Peterborough the day before, and attempting to murder a 17-year-old boy in East London in the early hours of 1 November.
The other seven charges include three of possessing a bladed article, one of assaulting a police officer, and one of common assault on another train.
His trial is scheduled for 26 October.
