A homeless man was arrested for a spree of random violent attacks in a Herald Square subway station in which he struck two women in the face and hit a guy with a metal pipe, police said Monday.

Daniel Evans, 45, was arrested Sunday and charged with three counts of assault after the attacks, cops said.

A 30-year-old woman told police she was transferring from an N train to an F train at the West 34 Street and Sixth Avenue station about 7 a.m. Thursday when she had to walk past the man, who was leaning on a trash can.

“He was just a homeless man who was there frequently,” said the woman, who is a teacher, to The Post. “I knew who it was. I unfortunately gave him the benefit of the doubt and walked past him.”

She said he hit her hard in the face as she passed between the trash can and a steel beam.

“Bap!” he exclaimed, according to police sources.

“I was obviously scared,” she said, asking to remain anonymous to protect her safety. “He just punched me for no reason, and I ran up the stairs.”

The woman suffered bruising and swelling on the right side of her face.

She said her family “was concerned,” but, “I’m not changing the way I go to work. I’m not going to let him change my life.”

A half-hour after hitting the woman in the face, the creep struck a 59-year-old woman, also in the face, cops said.

Cops, who arrested Evans, also charged him with hitting a 23-year-old man in the arm with a pipe at the same station at 10:45 a.m. April 22.

The victim was walking in the street when he had an argument with Evans, who then got a pipe and struck the man in the left forearm, cops said.

Evans has been arrested 18 times since 2012 on charges that included fraud, resisting arrest, public lewdness, drugs and criminal trespass.