UK National Insurance Number Validator
Finance & Global IDsValidate a UK National Insurance Number (NIN) format instantly. Checks letter restrictions, reserved prefixes, and suffix rules — entirely in your browser.
Reviewed by the thecalcu.com team · Last updated 23 July 2026
What is a UK NIN?
A UK National Insurance Number Validator checks whether a NIN follows the exact structural rules HMRC uses when issuing these numbers, the right combination of letters and digits, with several specific exclusions that catch many common typos and invalid numbers immediately. A NIN follows the format two letters, six digits, one letter (for example, AB123456C), but several letter combinations are specifically disallowed by the official numbering scheme.
This validator checks every one of those rules, banned first and second letters, reserved two-letter prefixes, and valid suffix letters, and tells you immediately whether a number is correctly formed. For the equivalent US identifier, see the SSN Validator, and for the Canadian equivalent, see the Canada SIN Validator.
Why Use a UK National Insurance Number Validator?
A NIN is required for almost every formal employment and tax interaction in the UK, and a single mistyped letter or digit on a form can cause processing delays or rejected submissions. Because the NIN format has specific, documented exclusion rules, certain letters are simply never used in certain positions, many typos can be caught immediately rather than discovered later when HMRC rejects a submission.
This validator gives that immediate check without submitting the number anywhere. An HR system developer building UK employee onboarding software can validate NIN format client-side before submission, catching format errors the moment they're entered rather than after a payroll run fails.
Who Should Use This Validator?
- HR and payroll professionals verifying NIN format before entering it into a payroll or HMRC submission system.
- Developers building UK employment, tax, or benefits applications who need client-side NIN format validation.
- Accountants and bookkeepers spot-checking NIN entries on client records before filing.
- Recruitment and onboarding teams double-checking that a new starter's NIN was transcribed correctly from their documents.
- Anyone filling out a UK tax or benefits form who wants to confirm their NIN was entered correctly before submitting.
What Insights Does the UK NIN Validator Give You?
The validator checks four distinct rules that together define a correctly formatted NIN:
- Overall structure, confirms the number is exactly 2 letters, 6 digits, and 1 letter, in that order.
- First and second letter rules, flags any use of the letters HMRC never assigns to those positions (D, F, I, Q, U, V for the first letter; additionally O for the second).
- Reserved prefixes, flags any number starting with BG, GB, NK, KN, TN, NT, or ZZ, none of which are ever allocated.
- Suffix letter, confirms the final letter is A, B, C, or D, the only valid options.
A passing result confirms the NIN is structurally correct according to HMRC's published rules, it does not confirm the number is actually active or registered to a real person.
How to use this UK NIN calculator
- Enter the National Insurance Number in the National Insurance Number field, with or without spaces.
- Read the result card to see whether the number passed validation.
- If it failed, check the details or message to see exactly which rule was violated.
- Compare the number against the original document, payslip, P60, or HMRC letter, to find the discrepancy.
- Correct the number and re-check until it passes.
Show formula & methodology ↓Show less ↑
Formula & Methodology
A NIN is validated against four structural rules, checked in sequence: 1. Format: must match exactly 2 letters, 6 digits, 1 letter (spaces stripped first). 2. First letter: must not be D, F, I, Q, U, or V. 3. Second letter: must not be D, F, I, Q, U, V, or O. 4. Prefix: the first two letters together must not be BG, GB, NK, KN, TN, NT, or ZZ. 5. Suffix: the final letter must be A, B, C, or D. Worked example: AB 12 34 56 C → normalised to AB123456C - First letter "A" ✓, second letter "B" ✓, prefix "AB" not reserved ✓, suffix "C" ✓ → valid. Invalid example: GB123456C fails immediately, since "GB" is a reserved prefix.
Related Tools
You may also find these useful: IBAN Validator.
Frequently Asked Questions