Abstract This research addresses the legal challenges posed by the implementation of digital twin technology in public health. Digital twins are advanced computational models which aim to replicate human organ functions and biological processes. Their goal is to enable the simulation of the entire human body and to personalize the outputs with individual patient’s health data. Digital twin technology promises to bridge gap between personalized medicine and precision public health. This research is based on a comprehensive review of the current European and Swiss legal frameworks for medical devices and data protection that apply to digital twin technology. Within these frameworks, digital twins are in a grey area, as they are only considered as medical device software when applied to individuals. They also incorporate artificial intelligence, machine learning, and data analytics, which are already a source of legal concern in a healthcare setting, but their effective use in public health raises additional issues. Preliminary findings suggest significant shortcomings in the legal frameworks regarding data privacy, and the potential for increased surveillance by health insurance systems, which could lead to human rights violations. The public health application of digital twins would require global data analysis of sensitive personal information, raising further questions about the secure storage, transmission, and processing of this data. The study concludes that current legal frameworks must be future proofed to manage the complexities introduced by digital twins in public health. In particular, it suggests that regulatory oversight of medical devices needs to be significantly improved in order to safely harness the potential of digital twin technologies for public health. Finally, the new European Union health data space and the forthcoming EU AI act will also play important roles in the implementation of digital twin technologies. Key messages • Applying digital twin technology in public health faces considerable challenges, particularly the issues around data privacy, potential discrimination, and increased surveillance. • We need to adapt and strengthen existing legal frameworks to effectively manage the complexities introduced by digital twins, ensuring that these technologies can be safely used for public health.