ObjectivesThe incidence of bystander cardiopulmonary resuscitation (CPR) is low in China. CPR training could improve public attitudes and willingness, but at present, the attitudes of the public after online training are unclear. This study investigated individual attitudes towards CPR, the willingness to perform it in emergencies along with the main obstacles and the overall effects of online training.DesignQuestionnaires were distributed to investigate the public attitudes and willingness towards performing bystander CPR.SettingQuestionnaires were accessible after the online course ‘First Aid’.Participants1888 students who attended ‘First Aid’ from December 2019 to 1 January 2020 and then completed the questionnaire voluntarily.ResultsThe majority understood CPR (96.7%) and displayed a willingness to learn (98.4%) and to disseminate CPR knowledge (82.0%). Characteristics associated with more positive attitudes included women, the 26–35-year olds and those in medical-related occupations (p<0.05). Only 34.8% had CPR training before. Most people would willingly perform CPR on a close family member. Compared with the standard CPR (S-CPR), the public preferred chest compression-only CPR (CO-CPR) (p<0.01). The top three obstacles to performing CO-CPR were lack of confidence (26.7%), fear of harming the victim (23.4%) and causing legal trouble (20.7%), while regarding S-CPR, fear of disease transmission (22.9%) ranked second. Women, those in poor health and in medical-related occupations, were more likely to perform CPR (p<0.05). The confidence to perform CPR was improved remarkably after online training (p<0.05).ConclusionsThe overwhelming majority of respondents showed positive attitudes and willingness towards CPR. In some cases, there is still reluctance, especially towards S-CPR. Obstacles arise mainly due to lack of confidence in administering CPR, while online CPR training can markedly improve it. Therefore, we should focus on disseminating CPR knowledge, targeting those who are less willing to perform CPR and helping overcome their obstacles by online training.