Notwithstanding the nerve gas attack in a Tokyo subway station a few years ago, Japan is a very peaceful society. That's why they have very few homicides.
The rate of gun ownership has little correlation with homicide rates in individual countries. In violent societies, other tools compensate the lack of availability of guns. It is a true that Japan has very few privately owned guns and a very low intentional homicide rate; but this is a coincidence. Norway has a similar very low intentional homicide rate (.55 per 100,000 population for Norway vs .52 for Japan, and they place just below Japan with the next lowest homicide rate). But whereas Japan has a ratio of gun ownership of .6 per 100,000 population, Norway has a ratio of gun ownership of 31 guns per 100,000 population, or 51 times the number of guns per capita. The US has 80 and Canada has 30 guns per 100,000.
Similarly, Switzerland has a per capita gun ownership rate of 45 guns per 100,000 persons, the third highest in the world. That is 75 times the rate of Japanese gun ownership, but with only double the intentional homicide rate of Japan by any means (.52 homicides per 100,000 versus 1.06). Incidentally, Japanese are 50 times more likely to murder each other with instruments other than a gun. The Swiss are more likely to use guns than other weapons by a ratio of 3 to 1.
England and Wales have a worse intentional homicide rate than Switzerland and Norway, but the latter have 7 and 5 times respectively more guns per capita. The English are 15 times more likely to use other means than guns to kill each other.
The US does indeed have a higher intentional homicide rate, and is 66th in the world out of 102 countries with complete statistics. 60% of homicides are committed with guns, and 40% using other means. They do have the highest per capita gun ownership rate in the world. But the homicides by gun reflect a more violent society. If guns magically disappeared from the US, and gun murders were eliminated from the statistics, the US would still be in 44th place in the world for the per capita rate of murder. The rate of homicide in the US is a reflection of the violence of its society rather the mere presence of firearms.
The solution to gun violence in the US is not in banning guns. It is improving the socio-economic prospects of disadvantaged groups of the population, i.e. inner city poverty. Crime is getting worse because of the increase of concentration of wealth with the 1%, at the expense of the 99%.
(Based on
https://en.wikipedia.org/wiki/List_of_countries_by_intentional_homicide_rate)