Police arrested Yuta Saito, 27, on charges of attempted murder after he was subdued by a resident during the melee near the Toride Station in Ibaraki Prefecture, about 25 miles (40 kilometers) northeast of Tokyo, local police spokesman Masaru Morita said.
Eleven of the injured were junior high and high school students, fire department spokesman Shireka Iyoka said. One of the injured has wounds that will require several weeks of treatment in hospital, while the others were not seriously injured, he said.
Four of the injured had been stabbed and others were hurt while trying to escape, Kyodo News agency reported. Officials earlier said over a dozen had been stabbed, but Iyoka said he had no specifics of the injuries.
The incident evoked memories of an attack that left seven people dead in central Tokyo in 2008. That attack drew national attention for its ferocity, in which a man slammed a truck into a crowd of people in the Akihabara electronics district and began stabbing passers-by at random.