---
id: "gb_upn"
kind: "datatype"
status: "draft"
is_pii: true
categories: ["pii", "persons", "education"]
country: ["GB"]
langs: ["en"]
quality: 95
url: "http://registry.apicrafter.io/datatype/gb_upn"
---

# English unique pupil number (UPN) (`gb_upn`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Unique Pupil Number, the 13-character code of a pupil in English state schools. It is a check letter, a 3-digit local authority number, a 4-digit school establishment number, two digits for the year of issue and a 3-digit serial number. Temporary numbers end with a letter.

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons), Education (education)
- Countries: United Kingdom (GB)
- Languages: English (en)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[A-HJ-NP-RT-Z]\d{11}[0-9A-HJ-NP-RT-Z]$
```

## Examples

- `Q202066535762` — Synthetic number with a valid check digit
- `Z208803304719` — Synthetic number with a valid check digit
- `Q2020665357627` (invalid example) — One character too many

## Mappings

- stdnum: `gb.upn`

## Supported by tools

- `dataprep`
- `pythonstdnum`

## Sources

- doc: <https://www.gov.uk/government/publications/unique-pupil-numbers>
- other: <https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.gb.upn.html>
- other: <https://docs.dataprep.ai/user_guide/clean/clean_gb_upn.html>

## Quality

Score 95/100. Missing: translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/gb_upn.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/GB/education/gb_upn.yaml>
