
Secure analytics platform for NHS electronic health records
OpenSAFELY delivers research across over 58 million people's health records, always respecting patient confidentiality
Better research, improved patient confidentiality
Why OpenSAFELY?OpenSAFELY is a highly secure, transparent, open-source software platform for analysis of electronic health records data. All platform activity is publicly logged. All software for data management and analysis is shared, automatically and openly, for scientific review and efficient re-use.
Protecting privacy
We never let researchers download patient data, and OpenSAFELY tools let users to write code to analyse patient data without even needing to view the raw records.
Auditable by the public
It is a privilege to use patient data for the public good. OpenSAFELY respects patients by carefully considering this in every part of its design.
Better, open science
OpenSAFELY requires publication of all analytic code, and our tools drive all users to produce prespecified, reusable, testable, shareable and modular software for research.
Enabling high volumes of research
Over 60 published research outputs to date, with many more in progress.

OpenSAFELY is revolutionising the way we work with health data. The initiative has already delivered major contributions to public health during the COVID-19 pandemic. But OpenSAFELY also leads the way in terms of transparency, open working methods, and a uniquely secure data access model.
Ready to learn more? Get started within an hour
Open for research
We are currently working with NHS England to cautiously on-board a small number of external pilot users to develop their analyses on OpenSAFELY. This first wave of pilot users will be collaborators, working closely alongside us to co-develop the platform.
Read about our pilot onboarding processPython, R and Stata
Choose any of these languages to write your analytic code
Primary care data
Our deployment for NHS England uses primary care data to research questions related to the Covid-19 emergency
A commitment to open ways of working
We believe transparency and open working methods are key to earning public trust and improving research quality
Latest from the blog
What's next for OpenSAFELY?
Ben Goldacre on our short term future plans, as published in our booklet, “The past, present and future of OpenSAFELY”
Some reflections about funding
Ben Goldacre reflects on OpenSAFELY’s funding journey to date, as published in our booklet, “The past, present and future of OpenSAFELY”
The OpenSAFELY Collaborative
Ben Goldacre describes the collaboration that makes OpenSAFELY possible, as published in our booklet, “The past, present and future of OpenSAFELY”
Using OpenSAFELY to carry out a randomised trial
A short OpenSAFELY case study from the University of Southampton, as published in our booklet, “The past, present and future of OpenSAFELY”
OpenSAFELY and antibiotics
A short OpenSAFELY case study from the University of Manchester, as published in our booklet, “The past, present and future of OpenSAFELY”
Using OpenSAFELY to fight antimicrobial resistance
A short OpenSAFELY case study, from the UK Health Security Agency, as published in our booklet, “The past, present and future of OpenSAFELY”