Gaijin (, [ɡaid͡ʑiɴ]; "outside person", "alien", "Non-Japanese") is a Japanese word for foreigners and non-Japanese. The word is composed of two kanji: gai (外, "outside") and jin (人, "person"). Similarly composed words that refer to foreign things include gaikoku (外国, "foreign country") and gaisha (外車, "foreign car"). The word can refer to nationality, race, or ethnicity, concepts generally conflated in Japan.
Some feel the word has come to have a negative or pejorative connotation, while other observers maintain it is neutral or even positive.Gaikokujin ( is a more neutral and somewhat more formal term widely used in the Japanese government and in media. "foreign-country person")
The word gaijin can be traced in writing to the 13th-century Heike Monogatari:
Here, gaijin refers to outsiders and potential enemies. Another early reference is in Renri Hishō (c. 1349) by Nijō Yoshimoto, where it is used to refer to a Japanese person who is a stranger, not a friend. The Noh play, Kurama tengu has a scene where a servant objects to the appearance of a traveling monk:
Here, gaijin also means an outsider or unfamiliar person.
The word gaikokujin (外国人) is composed of (foreign country) and (person). The Meiji government (1868–1912) introduced and popularized the term, which came to replace ijin, ikokujin and ihōjin. As the Empire of Japan extended to Korea and to Taiwan, the term ("inside country people") came to refer to nationals of other imperial territories. While other terms fell out of use after World War II, gaikokujin remained the official term for non-Japanese people. Some hold that the modern gaijin is a contraction of gaikokujin.