The first 1,000 days of life represent a critical window of opportunity to ensure optimal child growth and development. Maternal anemia is a major risk factor for low birth weight (LBW) and stunting at birth. Despite the nationwide iron supplementation program, the prevalence of anemia remains high, largely due to poor adherence to iron tablet (IFA) consumption among pregnant women. This study aims to develop a knowledge measurement instrument regarding dietary patterns for anemia prevention during pregnancy. A mixed-method approach was used, with a qualitative component as the dominant phase. Content analysis was conducted to identify key themes and generate items for the questionnaire, based on data from public discussions, in-depth interviews, and literature review. Instrument validity and reliability were tested quantitatively on 30 pregnant women participating in an online stunting prevention class. The qualitative analysis identified 9 variables, 21 dimensions, and 90 questionnaire items. Validity testing showed that 75 items were valid, and reliability testing yielded a Cronbach’s Alpha of 0.962, indicating high reliability. Knowledge scores showed that 62.5% of respondents had good knowledge of anemia-preventive dietary practices. A normality test confirmed that the data were normally distributed (p = 0.200). This study successfully produced a valid and reliable instrument to measure pregnant women’s knowledge of anemia-preventive dietary patterns. The instrument is suitable for evaluation through pre- and post-intervention assessments in health education programs delivered via social media and other online platforms.