The aim of this study was to examine the relative validity of the online Meal-based Diet History Questionnaire (MDHQ) for assessing the overall diet quality and quality of each meal type (breakfast, lunch, dinner and snacks). In total, 222 Japanese adults (111 for each sex) aged 30–76 years completed the online MDHQ and then the 4-non-consecutive-day weighed dietary record (DR). The diet quality was assessed using the Healthy Eating Index-2015 (HEI-2015) and Nutrient-Rich Food Index 9.3 (NRF9.3). For the HEI-2015, compared with the DR, the MDHQ provided high median values for breakfast (in women only) and dinner and low median values for snacks. There were no significant differences observed for overall diet and lunch. For the NRF9.3, the MDHQ provided higher median values for breakfast and dinner and a lower median value for overall diet than the DR in women, with no significant differences for lunch and snacks. In men, no significant difference was observed, except for overall diet (the MDHQ providing a lower median value). For the HEI-2015, median Spearman correlation coefficient was 0·43, with a range from 0·12 (snacks in women) to 0·68 (breakfast in men). For the NRF9.3, median Spearman correlation coefficient was 0·47, with a range from 0·26 (snacks in men) to 0·65 (breakfast in men). Bland–Altman plots showed wide limits of agreement and, in some cases, proportional bias. In conclusion, the online MDHQ showed an acceptable ability for ranking individuals according to the quality of overall diet, breakfast, lunch and dinner, but not snacks.