U.S. and other publics perceive STEM (science, technology, engineering, and mathematics) fields as masculine and scientist as a male occupation, but Japanese public perception remains unstudied. Using an online survey, we identified keywords associated with physics, chemistry, mechanical engineering, information science, biology, and mathematics. A second online survey showed that the Japanese public perceived both keywords and fields as masculine. This trend was stronger in individuals with less egalitarian attitudes towards gender roles. We suggest that attitude towards gender roles contributes to the masculine image of science in Japan.