Further evaluation of the impact of long-term exposure to the gaseous air pollutants nitrogen dioxide (NO2) and ozone (O3) on child lung function, and of NO2 or O3 on eosinophilic airway inflammation, is needed. To determine whether NO2 and O3 are associated with lung function and FeNO in children. We measured lung function (FEV1 and FVC) at mid-childhood (mean age 7.9 years, n=703), early teens (13.2 years, n=976), and mid-teen (17.6 years, n=624) study visits, and fractional exhaled nitric oxide (FeNO) at the early and mid-teen study visits in Project Viva, a cohort of mother-child pairs in the Boston, MA area. Long-term exposure to NO2 and O3 was estimated at home address using geospatial models. We examined associations of home address NO2 and O3 exposure and proximity to roadway with lung function and FeNO using linear regression models, adjusting for age, sex, height, weight, season, relative humidity, temperature, parental smoking, and measures of socioeconomic status. We examined for effect modification of the mid-teen associations by blood eosinophil level, physical activity, aeroallergen sensitization, and parental atopy. Median exposure to NO2 was 33.1 ppb (interquartile range [IQR] 10.4 ppb) and to O3 was 35.3 ppb (IQR 3.4) in the first year of life. Exposure to NO2 was associated with lower FEV1 and FVC across all age groups and exposure time intervals: e.g. an IQR increment of NO2 exposure from birth through the early teen visit was associated with 189.9 mL lower FEV1 (95% CI -273.3, -106.5) at the mid-teen visit. Lifetime NO2 exposure at was associated with higher FeNO at the early teen visit: e.g. 16.2% higher FeNO [95% CI 7.1-26.4%) per IQR of lifetime NO2 through the early teen visit. O3 exposure was not associated with lung function or FeNO. Aeroallergen sensitization (measured in a subset of participants) modified associations of NO2 and O3 with FeNO. Exposure to NO2 was associated with lower lung function and higher FeNO among generally healthy children and teenagers. As NO2 exposure levels were within the annual EPA standard, these findings suggest a need to reduce exposure to this pollutant to optimize child respiratory health.