The Tokyo Fire Department said 17 passengers were injured, including three seriously. Not all of them were stabbed and most of the other injuries were not serious, the agency said.
The attacker, identified as a 24-year-old man, was arrested on the spot and was being investigated on suspicion of attempted murder, NHK said. His motive was not immediately known.
Nippon Television reported that the suspect told police that he wanted to kill and get the death penalty, and that he used an earlier train stabbing case as an example.
Witnesses told police that the attacker was wearing a bright outfit — a green shirt, a blue suit and a purple coat — like the Joker in Batman comics or someone going to a Halloween event, according to media reports.