A common ancestor of Japanese and Ryukyuan languages or dialects is thought to have been brought to Japan by settlers coming from either continental Asia or nearby Pacific islands sometime in the early- to mid-2nd century BC (the Yayoi period), replacing the languages of the original Jōmon inhabitants, including the ancestor of the modern Ainu language. Very little is known about the Japanese of this period. Because writing like the "Kanji" which later devolved into the writing systems "Hiragana" and "Katakana" had yet to be introduced from China, there is no direct evidence, and anything that can be discerned about this period of Japanese must be based on the reconstructions of Old Japanese.
Old Japanese is the oldest attested stage of the Japanese language. Through the spread of Buddhism, the Chinese writing system was imported to Japan. The earliest texts found in Japan are written in Classical Chinese, but they may have been meant to be read as Japanese by the kanbun method. Some of these Chinese texts show the influences of Japanese grammar, such as the word order (for example, placing the verb after the object). In these hybrid texts, Chinese characters are also occasionally used phonetically to represent Japanese particles. The earliest text, the Kojiki, dates to the early 8th century, and was written entirely in Chinese characters. The end of Old Japanese coincides with the end of the Nara period in 794. Old Japanese uses the Man'yōgana system of writing, which uses kanji for their phonetic as well as semantic values. Based on the Man'yōgana system, Old Japanese can be reconstructed as having 88 distinct syllables. Texts written with Man'yōgana use two different kanji for each of the syllables now pronounced き ki, ひ hi, み mi, け ke, へ he, め me, こ ko, そ so, と to, の no, も mo, よ yo and ろ ro. (The Kojiki has 88, but all later texts have 87. The distinction between mo1 and mo2 apparently was lost immediately following its composition.) This set of syllables shrank to 67 in Early Middle Japanese, though some were added through Chinese influence.
Due to these extra syllables, it has been hypothesized that Old Japanese's vowel system was larger than that of Modern Japanese – it perhaps contained up to eight vowels. According to Shinkichi Hashimoto, the extra syllables in Man'yōgana derive from differences between the vowels of the syllables in question. These differences would indicate that Old Japanese had an eight-vowel system, in contrast to the five vowels of later Japanese. The vowel system would have to have shrunk some time between these texts and the invention of the kana (hiragana and katakana) in the early 9th century. According to this view, the eight-vowel system of ancient Japanese would resemble that of the Uralic and Altaic language families. However, it is not fully certain that the alternation between syllables necessarily reflects a difference in the vowels rather than the consonants – at the moment, the only undisputed fact is that they are different syllables. A newer reconstruction of ancient Japanese shows strikingly similarities with Southeast-Asian languages, especially with Austronesian languages.
Old Japanese does not have /h/, but rather /ɸ/ (preserved in modern fu, /ɸɯ/), which has been reconstructed to an earlier */p/. Man'yōgana also has a symbol for /je/, which merges with /e/ before the end of the period.
Several fossilizations of Old Japanese grammatical elements remain in the modern language – the genitive particle tsu (superseded by modern no) is preserved in words such as matsuge ("eyelash", lit. "hair of the eye"); modern mieru ("to be visible") and kikoeru ("to be audible") retain what may have been a mediopassive suffix -yu(ru) (kikoyu → kikoyuru (the attributive form, which slowly replaced the plain form starting in the late Heian period) > kikoeru (as all shimo-nidan verbs in modern Japanese did)); and the genitive particle ga remains in intentionally archaic speech.
Early Middle Japanese
Early Middle Japanese is the Japanese of the Heian period, from 794 to 1185. Early Middle Japanese sees a significant amount of Chinese influence on the language's phonology – length distinctions become phonemic for both consonants and vowels, and series of both labialised (e.g. kwa) and palatalised (kya) consonants are added. Intervocalic /ɸ/ merges with /w/ by the 11th century.
The end of Early Middle Japanese sees the beginning of a shift where the attributive form (Japanese rentaikei) slowly replaces the uninflected form (shūshikei) for those verb classes where the two were distinct.
Late Middle Japanese
Late Middle Japanese covers the years from 1185 to 1600, and is normally divided into two sections, roughly equivalent to the Kamakura period and the Muromachi period, respectively. The later forms of Late Middle Japanese are the first to be described by non-native sources, in this case the Jesuit and Franciscan missionaries; and thus there is better documentation of Late Middle Japanese phonology than for previous forms (for instance, the Arte da Lingoa de Iapam). Among other sound changes, the sequence /au/ merges to /ɔː/, in contrast with /oː/; /p/ is reintroduced from Chinese; and /we/ merges with /je/. Some forms rather more familiar to Modern Japanese speakers begin to appear – the continuative ending -te begins to reduce onto the verb (e.g. yonde for earlier yomite), the -k- in the final syllable of adjectives drops out (shiroi for earlier shiroki); and some forms exist where modern standard Japanese has retained the earlier form (e.g. hayaku > hayau > hayɔɔ, where modern Japanese just has hayaku, though the alternative form is preserved in the standard greeting o-hayō gozaimasu "good morning"; this ending is also seen in o-medetō "congratulations", from medetaku).
Late Middle Japanese has the first loanwords from European languages – now-common words borrowed into Japanese in this period include pan ("bread") and tabako ("tobacco", now "cigarette"), both from Portuguese.
Early Modern Japanese
Early Modern Japanese, not to be confused with Modern Japanese, was the dialect used after the Meiji Restoration. Because the two languages are extremely similar, Early Modern Japanese is commonly referred to as Modern Japanese. Early Modern Japanese gradually evolved into Modern Japanese during the 19th century. Only after 1945, shortly after World War II, did Modern Japanese become the standard language, seeing use in most official communications. In this time period the Japanese in addition to their use of Katakana and Hiragana they also used traditional Chinese characters called "Han" which later developed in "Kanji" which is a form of writing used to express ideas in the Japanese and Chinese languages.
Modern Japanese is considered to begin with the Edo period, which lasted between 1603 and 1868. Since Old Japanese, the de facto standard Japanese had been the Kansai dialect, especially that of Kyoto. However, during the Edo period, Edo (now Tokyo) developed into the largest city in Japan, and the Edo-area dialect became standard Japanese. Since the end of Japan's self-imposed isolation in 1853, the flow of loanwords from European languages has increased significantly. The period since 1945 has seen a large number of words borrowed from other languages—such as German, Portuguese and English. Many English loan words especially relate to technology—for example, pasokon (short for "personal computer"), intānetto ("internet"), and kamera ("camera"). Due to the large quantity of English loanwords, modern Japanese has developed a distinction between /tɕi/ and /ti/, and /dʑi/ and /di/, with the latter in each pair only found in loanwords.