BACKGROUND: Previous seroprevalence studies have demonstrated higher anti-SARS-CoV-2 IgG seroprevalence in healthcare workers (HCWs) than in the background population during the first phase of the 2020 COVID-19 pandemic. These studies, however, focussed mainly on hospital employees. AIM: To perform a cross-sectional study comparing the seroprevalence of hospital-based HCWs with those employed in elderly care (home care and nursing homes). METHODS: Employees (n = 4955) in the county of Varmland, Sweden, were recruited between weeks 27 and 42 and tested for IgG antibodies against SARS-CoV-2. Serological results were combined with self-reported questionnaire data. FINDINGS: IgG seroprevalence was 5.7% in the total group of HCWs, and was higher among those employed in hospital-based healthcare than among those working in elderly care (8.4% vs. 3.7%, p < .001). Being employed as an assistant nurse, working in a COVID-19 unit, and being exposed via co-workers or private acquaintances were all associated with IgG seropositivity. CONCLUSION: The difference in seroprevalence between HCWs in the two settings suggests that not only the profession but also factors in the workplace environment may be of importance. As all studied exposures were associated with IgG seropositivity, and asymptomatic infection was detected in 7.5% of participants, preventing outbreaks among HCWs is challenging. Adequate use of personal protective equipment when working with patients regardless of COVID-19 status, source control in situations with co-workers in which distancing is not possible, and routines enabling symptomatic staff to isolate pending PCR results are required to prevent healthcare-associated outbreaks of COVID-19.