Passive smoking is associated with an increased risk of hypertension in children. Antioxidant nutrients are known to alleviate oxidative stress, a key factor in the development of hypertension. Riboflavin, with its antioxidant properties, may help mitigate oxidative damage caused by passive smoke exposure. This study aimed to examine whether riboflavin intake could influence the relationship between passive smoking and hypertension in children and adolescents aged 6–19 years. Data were extracted from the 2007–2018 National Health and Nutrition Examination Survey. Weighted logistic regression models were used to identify potential covariates, and weighted multiple logistic regression models assessed the associations between passive smoking, riboflavin intake and hypertension. The association was also investigated in diverse age, gender and race subgroups. Results were presented as OR and 95 % CI. A total of 11 445 children and adolescents with a mean age of 12·89 (0·06) years were included. After adjusting covariates, cotinine ≥ 0·05 ng/ml was associated with increased odds of hypertension (OR = 1·20, 95 % CI: 1·06, 1·36). When individuals had a riboflavin intake < 1·87 mg, passive smoking (OR = 1·98, 95 % CI: 1·25, 3·13) and active smoking (OR = 1·69, 95 % CI: 1·14, 2·51) were both related to higher odds of hypertension. When individuals had a riboflavin intake ≥ 1·87 mg, no association was observed between passive smoking (OR = 0·83, 95 % CI: 0·48, 1·44) and active smoking (OR = 1·05, 95 % CI: 0·68, 1·62) and hypertension. Riboflavin intake may modulate the association between smoking status and hypertension in children and adolescents aged 6–19 years. The moderating effect was also found in age < 13 years old, ≥ 13 years old, males and non-Hispanic Whites.