quality:corruption, stylistic:style_transfer, structural:scholar_edition
Education

The first shogun Ieyasu set up Confucian academies in his shinpan domains and other daimyos followed suit in their own domains, establishing what's known as han schools (藩校, hankō). Within a generation, almost all samurai were literate, as their careers often required knowledge of literary arts. These academies were staffed mostly with other samurai, along with some buddhist and shinto clergymen who were also learned in Neo-Confucianism and the works of Zhu Xi.When the clergy of Shinto religion were alive, samurai, Buddhist monks were also there. Beyond kanji (Chinese characters), the Confucian classics, calligraphy, basic arithmetics, and etiquette, the samurai also learned various martial arts and military skills in schools.

The chōnin (urban merchants and artisans) patronized neighborhood schools called terakoya (寺子屋, "temple schools"). Despite being located in temples, the terakoya curriculum consisted of basic literacy and arithmetic, instead of literary arts or philosophy. High rates of urban literacy in Edo contributed to the prevalence of novels and other literary forms. In urban areas, children were often taught by masterless samurai, while in rural areas priests from Buddhist temples or Shinto shrines often did the teaching. Unlike in the cities, in rural Japan, only children of prominent farmers would receive education.

In Edo, the shogunate set up several schools under its direct patronage, the most important being the neo-Confucian Shōheikō (昌平黌) acting as a de facto elite school for its bureaucracy but also creating a network of alumni from the whole country. Besides Shoheikō, other important directly run schools at the end of the shogunate included the Wagakukōdansho (和学講談所, "Institute of Lectures of Japanese classics"), specialized in Japanese domestic history and literature, influencing the rise of kokugaku, and the Igakukan (医学間, "Institute of medicine"), focusing on Chinese medicine.

One estimate of literacy in Edo suggest that up to a fifth of males could read, along with a sixth of women. Another estimate states that 40% of men and 10% of women by the end of the Edo period were literate. According to another estimate, around 1800, almost 100% of the samurai class and about 50% to 60% of the chōnin (craftsmen and merchants) class and nōmin (peasants) class were literate. Some historians partially credited Japan's relatively high literacy rates for its fast development after the Meiji Restoration.

As the literacy rate was so high that many ordinary people could read books, books in various genres such as cooking, gardening, travel guides, art books, scripts of bunraku (puppet theatre), kibyōshi (satirical novels), sharebon (books on urban culture), kokkeibon (comical books), ninjōbon (romance novel), yomihon and kusazōshi were published. There were 600 to 800 rental bookstores in Edo, and people borrowed or bought these woodblock print books. The best-selling books in this period were Kōshoku Ichidai Otoko (Life of an Amorous Man) by Ihara Saikaku, Nansō Satomi Hakkenden by Takizawa Bakin and Tōkaidōchū Hizakurige by Jippensha Ikku and these books were reprinted many times.