UTR Validator (UK)
Validate the structural integrity, length, and Modulus 11 check digit of UK HMRC Unique Taxpayer References.
About Unique Taxpayer Reference (UTR) Validation
UTR validation checks whether a reference complies with the mathematical rules and structure established by HM Revenue & Customs (HMRC) in the United Kingdom.
The validator strips administrative prefixes such as 'K', spaces, and hyphens, extracts the leading check digit, and recalculates the weighted sum using HMRC's official formula.
Anatomy & Structure of the UK UTR (10 Digits)
Official structure regulated by HM Revenue & Customs and the Taxes Management Act 1970:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 | Check Digit | 1 digit | Official check digit calculated via HMRC Modulus 11 over the subsequent 9 digits | 1 |
| 2 to 10 | Taxpayer Account | 9 digits | Unique central numeric sequence assigned to the tax record | 955839661 |
HMRC Modulus 11 Verification Algorithm
Positional weighted calculation applied to positions 2 through 10:
Sum = ∑(d[i+1] * W[i]) | Remainder = Sum % 11 | Check Digit = '21987654321'[Remainder]
- 1. Extract the 9 core digits (positions 2 through 10).
- 2. Multiply each digit by the weights [6, 7, 8, 9, 10, 5, 4, 3, 2] from left to right.
- 3. Sum all products and calculate the remainder modulo 11.
- 4. Map the remainder to the lookup table '21987654321'. If remainder is 0, check digit is 2; if 1, check digit is 1; for remainders 2 through 10, check digit is (11 - remainder).
- 5. The resulting check digit must match position 1 of the UTR.