Studies on risk factors for severe COVID-19 in people of working age have generally not included non-working persons or established population attributable fractions (PAFs) for occupational and other factors. We describe the effect of job-related, sociodemographic, and other exposures on the incidence, relative risks and PAFs of severe COVID-19 in individuals aged 18-64. We conducted a registry-based study in Swedish citizens aged 18-64 from 1 January 2020 to 1 February 2021 with respect to COVID-19-related hospitalizations and death. Of 6,205,459 persons, 272,043 (7.5%) were registered as infected, 3399 (0.05%) needed intensive care, and 620 (0.01%) died, with an estimated case fatality rate of 0.06% over the last 4-month period when testing was adequate. Non-Nordic origin was associated with a RR for need of intensive care of 3·32, 95%CI 2·19-3·36, and a PAF of 33·1% after adjustment for age, sex, work, region and comorbidities. In a second model with occupation as main exposure, and adjusted for age, sex, region, comorbidities and origin, essential workers had an RR of 1·51, 95%CI, 1·35-1·6, blue-collar workers 1·18, 95%CI 1·06-1·31, school staff 1·21, 95%CI 1·01-1·46, and health and social care workers 1·89, 95%CI 1·67-2·135) compared with people able to work from home, with altogether about 14% of the PAF associated with these occupations. Essential workers and blue-collar workers, but no other job categories had higher risk of death, adjusted RRs of 1·66, 95%CI 1·24-2·23 and 1·37, 95%CI 1·04-1·81, with adjusted PAFs of altogether 9%. Among people of working age in Sweden, overall mortality and case fatality were low. Occupations that require physical presence at work were associated with elevated risk of needing intensive care for COVID-19, with 14% cases attributable to this factor, and 9% of deaths.