Generate random valid-format National Insurance Number (NI) numbers for testing
Paste a National Insurance Number (NI) below to check whether it has a valid format and correct checksum.
A National Insurance number (NI number or NINO) is a unique alphanumeric identifier used in the United Kingdom for the National Insurance system, which funds the state pension, unemployment benefits, and the National Health Service. Issued by HMRC and the Department for Work and Pensions to all UK residents turning 16, it appears on payslips, tax returns, P60 forms, and government benefit applications — making it the UK's closest equivalent to a universal citizen identifier.
An NI number follows the format XX 99 99 99 X: two letters, six digits displayed as three pairs, and one letter from A to D. The suffix letter historically related to which 13-week period within the tax year was relevant for contribution records, though this distinction has reduced in practical importance. The full number is nine characters long when spaces are removed and is case-insensitive. It is always displayed in capital letters on official documents.
Not all two-letter combinations are permitted as NI prefixes. The first letter cannot be D, F, I, Q, U, or V. The second letter cannot be D, F, I, O, Q, U, or V. Additionally, the combinations BG, GB, NK, KN, NT, TN, and ZZ are specifically reserved and never assigned to individuals. Prefixes beginning with the letters D through V in the first position were historically associated with administrative categories or Crown use. These constraints reduce the valid prefix space from 676 to approximately 320 usable combinations.
Payroll systems, pension platforms, HMRC Real Time Information (RTI) integrations, and employment verification services all require correct NI number handling. The combination of letter constraints, digit formatting, and suffix rules means naive random generation produces mostly invalid numbers. A compliant fake NI number generator is essential for testing regex validation, formatting utilities, and backend submission to HMRC's RTI system, which validates NI format before accepting payroll submissions.
HMRC's Making Tax Digital (MTD) initiative requires businesses and landlords to submit tax information digitally via HMRC-compatible software. NI numbers appear throughout the MTD API as identifiers for employees, directors, and self-employed individuals. Software developers building MTD-compatible payroll, accounting, or self-assessment tools need valid fake NI numbers to test API submissions, employee record creation, and P45/P60 generation workflows in the HMRC sandbox environment without risking real citizen data exposure.