The knife-wielding man, 28, carried out the attack in the waiting room of Amagasaki's central hospital at 11:45 a.m. local time on Thursday (02:45 GMT), the Kyodo News agency reported.
There have been no reports on the health condition of those injured. One of them is an employee of the hospital.
The attacker was detained by police. His motives have not been disclosed.