Overall public reception of foreigners in Japan is pretty positive. There are political issues between China, Korea, and Japan that makes Japanese resent these other Asian nationalities, but treatment of them is still decent. Japanese people are an outwardly polite group, and they tend to avoid trouble.
However, when there is some sort of crime or legal issue, many problems will come up to the surface, becoming clearly visible.
Because the foreign population is so low, crime by foreigners is actually very rare. However, if there does happen to be a crime committed by a foreigner, the incident will get a lot of media coverage. This happens all over the world with different socio-racial groups, and Japan is no different. Unfortunately, the National Police Agency has over the years manufactured a sort of illusional “foreign crime wave” through particularly heavy coverage and negative portrayal of foreigners who have been involved in a crime. Most foreigners will not commit crime, but the portrayal on the news of foreigners as law breakers has produced some racial bias and hatred of foreign populations.
Another thing to note is that in a dispute, whether physical or verbal, the police will almost always side with the Japanese citizen. It doesn’t matter who started the fight and it does not matter who is actually right, and if there is a language barrier the situation tends to become even more complicated and misunderstood. So, in the event that you as a foreigner do somehow find yourself in a situation where the police become involved, it is best to stay calm and rational. Providing evidence and answering questions when asked is the sure way to avoid a fine, jail time, or even deportation in extreme cases.
Japanese people are nice, but they are not always fair. This can be clearly seen by foreigners looking to rent an apartment or house in Japan. There are unfortunately no laws that prohibit discrimination between potential renters based on age, sex, or ethnicity. A landlord has the final say in who they rent their property to, and it doesn’t even matter if you have the money. Renting is a really frustrating process in Japan. It feels like searching for apartments that allow pets, with you being the pet. And everyone who has searched for an apartment to move into with their beloved 4 legged family members knows how much the search results decrease after that option for “pets allowed” is selected.
So foreigners, whether looking for a few nights of fun on a trip or a place to stay long term, beware of the biases you might face.