Skip to main content

Secure analytics platform for NHS electronic health records

OpenSAFELY delivers research across over 58 million people's health records, always respecting patient confidentiality

Working in partnership with

  • University of Oxford logo
  • Nuffield Department of Primary Care Health Sciences logo
  • London School of Hygiene & Tropical Medicine logo
  • TPP logo
  • EMIS logo

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.

Core privacy features

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.

How do I know my data is safe?

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.

View best practices

Enabling high volumes of research

Over 60 published research outputs to date, with many more in progress.

Research outputs

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.

Krishnan Bhaskaran

Professor of Statistical Epidemiology, London School of Hygiene and Tropical Medicine

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 process
  1. Python, R and Stata

    Choose any of these languages to write your analytic code

  2. Primary care data

    Our deployment for NHS England uses primary care data to research questions related to the Covid-19 emergency

  3. 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

  1. We are hiring a Patient and Public Involvement and Engagement Manager

    Come and work with us! We are hiring a Patient and Public Involvement and Engagement Manager to involve the public in advancing mental health research.

  2. Understanding ehrQL Feature Usage in OpenSAFELY for Health Research

    This blog post shares the project I worked on during my summer internship at the Bennett Institute as part of the HDR UK Health Data Science programme. My project explored how ehrQL, is being used across OpenSAFELY repositories. I analysed 301 codefiles from 65 Repositories under the OpenSafely org. and was able to identified which features researchers rely on most, which are less common, and where improvements or additional support could be valuable.

  3. OpenSAFELY and the Co-produced Development of the Digital Critical Friend (DCF) Public Advisory Group model

    The journey of public involvement in OpenSAFELY. The OpenSAFELY Digital Critical Friend group, from conception to becoming foundational for OpenSAFELY, is a testament to the power of effective public involvement in digital health.

  4. OpenSAFELY at the National Patient Data Day in Leeds

    On the 24th June 2025, OpenSAFELY had the privilege of running a booth at the National Patient Data Day in Leeds!

  5. We're launching new community events

    Office hours, coding meetups and more! Come and talk to other OpenSAFELY users.

  6. Introducing ‘diabetes-algo’ - A reusable action for OpenSAFELY users

    Together with collaborators in Bristol and at the Bennett Institute, we created a reusable action called ‘diabetes-algo’. Here is what it does.

View more blog posts →