Axon Toolbox

Free telecom & identity tools

Free tool

United Kingdom National Insurance Number (NINO) Generator & Validator

Generate well-formed test National Insurance numbers that follow HMRC's prefix and suffix rules — a QQ dummy that can never be a real number, or a random allocated-style number — or paste a NINO to check its format.

NINO Generator

Pick the kind of number you need. There is no check digit to calculate — HMRC's rules are purely about which prefixes are allowed.

Flag of United Kingdom

United Kingdom · 9 characters

QQ dummy is safest for anything that might be shared

1 – 100

National Insurance Number Validator

Paste a National Insurance number, with or without spaces, to check it against HMRC's format rules. There is no check digit, so a pass means well-formed, not issued.

Every National Insurance number this tool produces is synthetic test data only. It is not issued by HMRC or DWP and does not belong to any real person. Use it on your own test systems only — and prefer the QQ dummy option for anything that might end up shared, logged or screenshotted.

How a National Insurance number is structured

A National Insurance number is nine characters: two prefix letters, six digits and an optional suffix letter. Taking AB 12 34 56 C as an example:

The segments of a UK National Insurance number
DigitsSegmentMeaning
ABPrefixTwo letters. Neither may be D, F, I, Q, U or V, and the second is never O. BG, GB, KN, NK, NT, TN and ZZ are never allocated as a pair.
123456NumberSix digits.
CSuffixA, B, C or D. Administrative, and some systems omit it entirely.

Unlike a CPF, CNPJ or CURP, a NINO carries no check digit — there is no arithmetic that ties the digits together, so validation is entirely a matter of the prefix and suffix rules above. That also means a passing result only tells you a number is well-formed, never that it has actually been issued to anyone.

HMRC's own guidance illustrates the format with QQ 12 34 56 C. QQ is one of the reserved prefixes that is deliberately never allocated, so that example is guaranteed invalid and can never collide with a real person's number — exactly why it is ideal for test fixtures. A well-formed number built from a random allocated-style prefix, by contrast, follows every rule HMRC publishes but is not checked against the specific ranges that have actually been issued, so it could in principle coincide with a real NINO. That risk is why the QQ dummy is the default here.

Why generate test National Insurance numbers?

Any system that touches UK employment or benefits stores National Insurance numbers — payroll engines, HMRC Real Time Information (RTI) submissions, pension and workplace benefits onboarding, and right-to-work or KYC checks. All of them need realistic input to test against.

Using a real person's NINO in a test environment is bad practice and, under UK GDPR, a needless handling of personal data outside its original purpose. Synthetic numbers let you exercise format checks and prefix-rule validation without any real identifier leaving production — and the QQ dummy option guarantees the value can never be mistaken for, or collide with, a real person's number.

Frequently asked questions

What is a National Insurance number?
A National Insurance number (NINO) is the unique identifier HMRC and the Department for Work and Pensions use to track an individual’s tax and National Insurance contributions in the UK. It is required for payroll (PAYE), claiming benefits and the state pension, and is often requested as part of right-to-work checks.
Does a NINO have a check digit?
No. Unlike a CNPJ or CPF, a National Insurance number has no checksum. Validation is purely structural — two letters, six digits, an optional suffix letter — with a set of rules about which prefix letters and pairs are never allocated. A number can be well-formed without ever having been issued.
What are the prefix rules?
The two prefix letters may never be D, F, I, Q, U or V, and the second letter is never O. On top of that, the specific pairs BG, GB, KN, NK, NT, TN and ZZ are reserved and never allocated to anyone. A prefix that breaks any of these rules cannot be a real NINO.
Why does HMRC use QQ 12 34 56 C as an example?
QQ is one of the reserved prefixes that is never allocated, so HMRC’s own guidance uses QQ 12 34 56 C to illustrate the format without risking a collision with a real person’s number. It is deliberately, permanently invalid — which makes it the ideal shape for test fixtures that might end up in logs, screenshots or shared test data.
What does the suffix letter mean?
The final letter (A, B, C or D) is administrative and historically indicated how often a person’s NI category changed. It carries no checksum meaning, and some older systems and forms omit it entirely.
Are these real National Insurance numbers?
No. Every number this tool produces is randomly generated test data. The well-formed option follows all of HMRC’s structural rules but is not checked against, or reserved from, the small number of real allocated ranges — in principle it could coincide with a real person’s NINO. The QQ dummy option can never do that, which is why it is the default.
Why would I need generated National Insurance numbers?
To test UK payroll systems, HMRC Real Time Information (RTI) submissions, pension and benefits onboarding, and right-to-work or KYC forms without putting a real person’s NINO into a test environment. Synthetic numbers exercise the same format and prefix-rule validation while keeping real identifiers out of logs and non-production systems.