Trends in characteristics, management, and survival in out-of-hospital cardiac arrest (OHCA) and in-hospital cardiac arrest (IHCA) were studied in the Swedish Cardiopulmonary Resuscitation Registry (SCRR). The SCRR was used to study 106 296 cases of OHCA (1990-2020) and 30 032 cases of IHCA (2004-20) in whom resuscitation was attempted. In OHCA, survival increased from 5.7% in 1990 to 10.1% in 2011 and remained unchanged thereafter. Odds ratios [ORs, 95% confidence interval (CI)] for survival in 2017-20 vs. 1990-93 were 2.17 (1.93-2.43) overall, 2.36 (2.07-2.71) for men, and 1.67 (1.34-2.10) for women. Survival increased for all aetiologies, except trauma, suffocation, and drowning. OR for cardiac aetiology in 2017-20 vs. 1990-93 was 0.45 (0.42-0.48). Bystander cardiopulmonary resuscitation increased from 30.9% to 82.2%. Shockable rhythm decreased from 39.5% in 1990 to 17.4% in 2020. Use of targeted temperature management decreased from 42.1% (2010) to 18.2% (2020). In IHCA, OR for survival in 2017-20 vs. 2004-07 was 1.18 (1.06-1.31), showing a non-linear trend with probability of survival increasing by 46.6% during 2011-20. Myocardial ischaemia or infarction as aetiology decreased during 2004-20 from 67.4% to 28.3% [OR 0.30 (0.27-0.34)]. Shockable rhythm decreased from 37.4% to 23.0% [OR 0.57 (0.51-0.64)]. Approximately 90% of survivors (IHCA and OHCA) had no or mild neurological sequelae. Survival increased 2.2-fold in OHCA during 1990-2020 but without any improvement in the final decade, and 1.2-fold in IHCA during 2004-20, with rapid improvement the last decade. Cardiac aetiology and shockable rhythms were halved. Neurological outcome has not improved.