To identify risk factors for mental distress and investigate whether the factors were different between men and women during the coronavirus disease 2019 (COVID-19), using KOKOROBO data, which is an online platform that aims to facilitate access to mental health services. We used baseline data on KOKOROBO users 13 years of age or older in Japan who accessed it from October 11, 2021, to April 6, 2023, excluding those receiving treatment for mental health problems. Global severity, based on the most severe measure on Patient Health Questionnaire-9 (PHQ-9), Generalized Anxiety Disorder-7 (GAD-7), and Insomnia Severity Index (ISI), was analyzed using multivariable logistic regression with baseline characteristics for each gender, and for under 30 and 30 years of age or older in women. We conducted the same analysis of suicidal ideation for each gender. In the 686 men and 1274 women, 117 (17.1%) and 100 (7.8%) had minimal global severity respectively, and the rest suffered from mental distress to some extent. For women, ages under 30 years (adjusted OR (aOR): 0.352, 95%CI: 0.231-0.539, P < 0.001), marriage (aOR: 0.453, 95%CI: 0.274-0.746, P = 0.002), and concerns about COVID-19 infection were associated with global severity, while having children (aOR: 0.509, 95% CI: 0.284-0.909, P = 0.023) and decrease of going out during the COVID-19 pandemic had a protective effect on global severity and suicidal ideation for men, respectively. Living with family was a risk factor for mental distress in unmarried women over 30 years of age. Less communication with family or others and responding to the questionnaire late at night (00:00-05:59) were associated with severe global severity in both genders. Age, living arrangement, marriage, having children, concerns about COVID-19 infection, and lifestyle changes during the COVID-19 pandemic had gender-specific effects on mental distress, while frequent communication and regular life rhythm maintained mental health in both genders. Young women and, unmarried middle-aged women living with their families tended to experience mental distress during the COVID-19 pandemic. The Ethics Committee of the National Center of Neurology and Psychiatry approved this study (approval number B2020141) on April 15, 2021.