National Insurance numbers are not unique
(Though they're pretty unique. This title is designed to act as a search engine.)
A pre-history of being interested in NI numbers
Thousands of years ago, when I was working at GDS, we would spend time thinking about how to help log people into government services and easily identify themselves to government. (You'll be glad to know I didn't do any of the actual thinking, I was just in some of the meetings). And there was a lot of interest 'around' in the digital identity etc.
National Insurance numbers would come up a lot, often as a shortcut to Digital ID. Ministers and pundits would float it as an already existing unique identifier. Surely we could just use NINOs?
And then someone older and wiser would always mutter a dark warning that 'National Insurance numbers aren't unique' and after a bit of bluster and pshawing the conversation would move on.
But that always struck me as pretty interesting. Not unique? What's that about? Surely that's the point. I'm unreasonably fascinated by the weird, unfortunate ways that 'the machinery of government' fails. How does a system presumably premised on having unique numbers end up without them?
And, whenever I googled it, the non-uniqueness of NI numbers was hinted at in obscure forums but always seemed, sort of, hidden. It felt like something a journalist should write about.
A few years later when Wired had dropped my column and were trying to make me do actual journalism I pitched them on an investigation into the uniqueness of NI numbers. I even emailed some government press officers about it. But Wired thought it sounded boring and HRMC and DWP couldn't even agree on who was responsible for NI numbers so I dropped it. Life got in the way.
And then, the other day, I thought about it again and realised I could just do some digging on my own and publish it here and maybe make a little film about it. So I fired up the Google again.
So, caveat, in case it's not obvious. Everything below is just me and the internet saying what we reckon. If I'm wrong, or if you have interesting detail to add, please let me know.
The uniqueness of NI numbers is much asserted
Gemini has arrived since last I googled for NINO info but the AI overview is a useful distillation of the internet consensus. I asked it 'are NI numbers are unique?'

Below the AI answer the uniqueness of NINOs is asserted on webpage after webpage. It seems fairly cut and dried. The only hint of dissent is on Reddit but that turns out to be a distraction, they've argued a lot about whether they're random, not unique. (TLDR they have sometimes been issued sequentially).
A chink in the consensus
I dug deeper using a more assertive search term "NI numbers are not unique".
Gemini wasn't having that:

But below the lede it had started to weaken:
"While the system is designed for uniqueness, there have been historical administrative issues or specific scenarios involving temporary reference numbers that could cause confusion"
and
"Historical issues: A parliamentary report in the early 2000s noted that "a few thousand cases" of duplicate NINOs had occurred due to a historical allocation process. These issues have largely been addressed and "swept under the rug" as one source put it."
I had another go and it weakened again.
"The statement "NI numbers are not unique" is generally false"
Which means, of course, that it's sometimes true.

Diving deeper yields a couple of details:

I thought I'd triangulate with ChatGPT which led me to some interesting bits of Hansard.
Like this 2007 written exchange between Conservative MP Chris Grayling and James Plaskitt Parliamentary Under-Secretary (Department for Work and Pensions)
Chris Grayling: To ask the Secretary of State for Work and Pensions how many duplicate national insurance numbers there are in the national insurance database.
Mr. Plaskitt: From March 2007, DWP’s Customer Information System replaced the Departmental Central Index as the national insurance database. Due to the way the Customer Information System is set up, the same national insurance number cannot be allocated twice. However, from time to time we identify national insurance numbers that are being used by more than one person, usually through transcription errors.
The number of instances where this has occurred is shown in the following table.
Cases of a national insurance number being used by more than one individual
2001 : 2,539
2002 : 2,418
2003 : 2,533
2004 : 1,896
2005 : 1,991
2006 : 1,984
Note: In these cases we take corrective action with Her Majesty's Revenue and Customs (HMRC) to correct the account.
"A considerable amount of work has been done to estimate the number of duplicate and fraudulent National Insurance Numbers in the Departmental Central Index.Since 1995, the Departmental Central Index Data Cleaning Project has checked the database by selecting cases which fit certain risk criteria. The project has so far resolved over 750,000 duplicate records held in the database which were mainly created when details of customers were accidentally recorded incorrectly."
(Before you think "750,000 duplicate records" is an enormously smokey smoking gun most of those records are probably 'one person with multiple NINOs'. That is also a problem and a version of 'not unique' but not the one I'm talking about here)
(If you plan to plunge into Hansard yourself you'll find that most of the interest in NINOs used to be people trying to find out how much benefit fraud is going on. Now it's mostly about illegal migration. You'll find similar agendas in the relevant FOI requests.)
This account is confused
ChatGPT also pointed out that there's actual official guidance on what to do "where two people are using the same National Insurance Number"
Some excerpts from the document:
"If Her Majesty’s Revenue and Customs (HMRC) National Insurance Account Correction Team (NI-ACT) finds that two people are using the same NINo account, this is called a ‘Standard Confused NINo Account’. NI-ACT carries out an investigation to establish the correct owner of the NINo, by sending an enquiry form CA3223 to each person requesting details of their employment history."
"When the CA3223 forms are returned, NI-ACT will determine the correct owner of the NINo record in question. When all ways of tracing an alternative NINo have been exhausted, the other customer known as the ‘intruder’ is referred to Department for Work and Pensions (DWP) for NINo allocation."
Let's be clear; this is a piece of official guidance on how to deal with the fact that NI numbers are not unique
So I think we can safely say NI numbers are not unique. ie: sometimes two people, through no fault of their own, have the same NI number.
How did we get here?
The modern National Insurance number was introduced in 1948, alongside the welfare state. Numbers were issued to adults entering work and to children at school-leaving age.
Each person was supposed to have one number for life but obviously, the reality lagged the intent.
Numbers were allocated by local offices, often using paper systems and there was no real-time national cross-checking for decades. NI numbers were issued by local National Insurance offices, based on blocks of numbers sent out to the offices. There wasn't a central register that could be queried at the point of issue and if two offices were mistakenly sent overlapping blocks, or a local office mis-recorded which numbers had already been issued, then the same number could be issued twice. Accidental duplication was very possible. They were very busy! Especially in the late 1940s and early 1950s. Millions were entering the workforce, there were large numbers of demobed servicemen a brand-new welfare state was being built.
People with common names and similar dates of birth could be mistakenly treated as the same person. Temporary or provisional numbers (e.g. “TN” numbers in later decades) added complexity and confusion. Some of these temporary numbers were later merged into permanent records.
(Students of the Civil Service will also have been triggered by the term 'cross-department' popping up in this account. Apart from all the problems described above very little good comes from having a vital system shared, managed and owned by two huge departments of state, HMRC and DWP, who utterly hate each other. They're huge departments of state, that's what they do.)
We can fix this with computers
Starting in the 70s computerisation improved things. The data was more centralised, cross-department matching improved (across DWP, HMRC and later the Home Office) and data-cleaning exercises became possible. That's when the inevitable errors of the past started to become apparent.
What, if anything, does this mean?
Today, generally, for practical purposes, National Insurance numbers are unique. It's very, very, very likely that yours is different to everyone else's. You should find that comforting.
Obviously that's not what unique is supposed to mean, it's supposed to be a binary. Things can't be quite, or very unique. But that's in theory. In the real world NI numbers aren't unique because of course they're not, any system designed and built by humans will have errors. But they're OK.
So perhaps what we should say is that National Insurance numbers are unique enough.
They're unique enough because they're embedded in an organic system, one that includes smart, hard-working people who understand that errors happen and that we should have ways to fix them. There should be the slack and flexibility to cope.
And those smart, hard-working people won't use your NI number to identify you. They'll triangulate with something else. They might your NINO plus your date of birth.
And they'll be wise enough to resist building a national ID system out of NINOs.
And they'll advise humility in the face of any scheme that includes a need for uniqueness.