OBJECTIVES: To test the hypothesis that parental occupational exposure to magnetic fields before conception and during pregnancy increases the risk of cancer in the offspring. METHODS: The study is designed as a cohort study based on a population of 235,635 children born shortly after two different censuses in Sweden. The children were followed from birth to 14 years and cases of cancer were identified in the Swedish cancer registry. The parents' occupational titles in the censuses were linked to a job-exposure matrix with information about magnetic field levels in different occupations. The cancer incidence among the exposed was compared to that among the unexposed using Cox proportional hazards modeling. RESULTS: There was no association between childhood cancer and maternal occupational magnetic field exposure. Paternal exposure was associated with an increased risk of childhood leukemia, with a relative risk of 2.0 (95% CI 1.1-3.5) for exposures > or = 0.30 microT. A decreased risk was found for brain tumors (RR = 0.5; 95% CI 0.3-1.0). CONCLUSIONS: The results do not support previous findings of an increased risk of childhood brain tumors associated with paternal occupational exposure to magnetic fields. The finding for childhood leukemia has to be interpreted with caution.