Abstract Background Electronic health records (EHRs) can enhance the quality of care by ensuring timely and improved access to data and enabling linkage to facilitate better communication and coordination between healthcare teams. People differ in their views on EHRs, mainly due to perceived concerns relating to data security. It is important that people's views are considered in the design and implementation of EHRs to support successful implementation. The aim of this research was to explore public views on EHRs and data security to inform future policy in this area. Methods Qualitative secondary analysis of open-ended survey questions included in a National Public Engagement Survey on Health Information was conducted. A total of 433 respondents, from a nationally-representative sample of 1,228, provided a response that related to data security and EHRs. The national survey was carried out between October and December 2020 using a computer-assisted telephone interviewing (CATI) approach. Verbatim responses to the open-ended questions were captured and inductive thematic analysis was conducted. Results Four themes were identified: attitudes towards a move to eHealth; trust in relation to information security; technical infrastructure to support EHRs; and protective measures to safeguard EHRs. Most people view EHR implementation positively but cited concerns in relation to both the security of the electronic systems and the individuals that process this data and manage these systems. Conclusions As more countries introduce national EHRs, there is a need to establish and maintain a balance between the security of electronic systems and the competency of individuals that manage such systems. Equal consideration should be given to addressing both elements as the effectiveness of one is contingent on the other. A rise in cyber security attacks and growing public concern surrounding data breaches creates a sense of urgency to address such issues. Key messages • Trust was an important influence on people’s attitudes to electronic health records which was shaped by people’s trust in the individuals and organisations that have access to their health data. • There is an interdependent relationship between security systems and the individuals that manage them; both must be equally considered to provide assurance to the public on data security.