The use of online questionnaires to assess common mental disorders such as perinatal anxiety has spread due to the proliferation of Internet-based psychological interventions and research. This study analyses the validity and reliability of the online version of the Generalized Anxiety Disorder-7 (GAD-7) in a sample of pregnant and postpartum Spanish women. A total of 3082 pregnant ( = 1260) and postpartum ( = 1822) women were recruited via the Internet and underwent three follow-up evaluations during a six-month period. A one-factor solution was assigned by Exploratory Factor Analysis and confirmed by Confirmatory Factor Analysis for both pregnant (CFI = 0.998; RMSEA = 0.035) and postpartum (CFI = 0.998; RMSEA = 0.038) women. The one-factor model showed strict invariance across groups. Validity was confirmed by assessing correlations between GAD-7, the Edinburgh Postnatal Depression Scale, and the 10-item Posttraumatic Stress Disorder checklist at three time points. The reliability coefficient was .92 for the two groups. This study shows that the Spanish online GAD-7 version has good psychometric properties and can be used to assess anxiety symptoms during the perinatal period.