Skip to contentRedact PII for your data. Get a quote

Coverage · United Kingdom

NHS number detection and redaction

OpenAnonymizer finds the UK NHS number in text and replaces it with a placeholder. The number is confirmed by its official label and its check digits are verified. It runs on a CPU, with no GPU and no API calls.

At a glance

Country
United Kingdom GB
Format
NHS number
Placeholder
UK_NHS1Each distinct value gets its own number: UK_NHS_1, UK_NHS_2, and so on.
How it is confirmed
ChecksumOfficial label and checksum
Used for
Identifying patients in the NHS in England, Wales and the Isle of Man, across every health record.

About the NHS number

The number is assigned at birth or on first registration. It is 10 digits, written 3-3-4, and the last is a check digit (modulus 11).

943 476 5919 is a test number that passes the check.

ExampleThe engine's real output for this input, in Fast mode (the default). The number is a test value.
In
NHS number: 943 476 5919
Out
NHS number: UK_NHS1

How OpenAnonymizer handles it

Checked by checksum. The format's check digits are verified, so most mistyped or made-up numbers fail. A number with the right label and shape is still masked when its checksum fails, so a typo doesn't let it through.

  • It runs locally on a CPU, with no GPU and no API calls, so the text never leaves your machine.
  • Every package ships every detector, so this format is covered in each of them.
  • It covers 34 languages.
How a match is decided