UK Unique Pupil Number (UPN) and Unique Learner Number (ULN)
Detects UK Department for Education 13-character Unique Pupil Numbers (UPNs: Modulo-23 check letter excluding I, O, S + 3-digit LA code + 4-digit establishment + 2-digit year + 3-digit serial, or 11 digits + optional temporary suffix letter) and labelled 10-digit Unique Learner Numbers (ULNs).
- Type
- regex
- Engine
- universal
- Confidence
- high
- Confidence justification
- High confidence: 13-character UPNs (letter from 23-letter DfE alphabet + 11 digits + digit/letter) are structurally distinctive, and 10-digit ULNs require an explicit ULN / Unique Learner Number label.
- Jurisdictions
- uk
- Regulations
- UK GDPR, Data Protection Act 2018 (UK), Education Act 1996 (UK)
- Frameworks
- ISO 27001, ISO 27701
- Data categories
- pii, education, government-id
- Scope
- narrow
- Risk rating
- 7
- Platform compatibility
- Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, CrowdStrike DLP: Compatible, Palo Alto: Adapted from Purview, Netskope: Adapted from Purview
Pattern
(?-i)\b([A-HJ-NP-RT-Z]\d{11}[0-9A-HJ-NP-RT-Z]|(?i:ULN|Unique\s+Learner\s+Number)[\s:#-]{1,6}[1-9]\d{9})\b
Corroborative evidence keywords
Unique Pupil Number, UPN, Unique Learner Number, ULN, Department for Education, School Census, Personal Learning Record
Proximity: 300 characters
Should match
H820200109001— 13-character UK Unique Pupil Number (check letter H + 12 digits)UPN: A30140022101F— Temporary UK Unique Pupil Number with trailing letter suffixUnique Learner Number: 1048293715— Labelled 10-digit UK Unique Learner Number (ULN)
Should not match
I820200109001— Leading letter I is excluded from the 23-letter DfE UPN check alphabet (I, O, S excluded)S820200109001— Leading letter S is excluded from the DfE UPN check alphabet1048293715— Bare 10-digit number without ULN label does not fireSample template: placeholder example record for training only— Template/sample fixture suppressed by shared exclusion dictionary
Known false positives
- 13-character serial numbers starting with a letter followed by 12 digits. Mitigation: Enforcing tiers on UPN require school/pupil/DfE/census keywords within 300 characters.
References
- GOV.UK Department for Education - Unique Pupil Numbers (UPN) Specification
- GOV.UK Learning Records Service - Unique Learner Number (ULN)