By · Last updated 2026-05-29

Back to BlogGDPR & Compliance

IMY Sweden: Personnummer & Luhn Checks

IMY found 45% of generic tools miss Swedish personnummer. Samordningsnummer (60-offset) missed by most implementations. Sweden's 79% GDPR rights-exercise.

May 29, 20267 minute read
Sweden IMYpersonnummer LuhnsamordningsnummerSwedish GDPR technicalNordic compliance

IMY Sweden: Personnummer and Luhn Checks

Updated for 2026

Sweden's data authority is IMY — Integritetsskyddsmyndigheten. It tested PII tools in active use. The result: 45% failed to detect the personnummer. That is Sweden's main national ID. And 79% of Swedish adults use their GDPR rights every year. That is the highest rate in the EU. Weak detection creates a direct compliance gap.

Personnummer Format and the Luhn Check

The personnummer has two forms. Short form: YYMMDD-XXXX (10 digits). Long form: YYYYMMDD-XXXX (12 digits). The last digit is a Luhn check digit.

The Luhn check: Take the digits from right to left. Double every second one. If doubling gives two digits, add them. Sum all values. The result must divide evenly by 10.

The Luhn check also appears in credit cards and the Canadian SIN. But the personnummer holds a date in the first six digits. That creates constraints that differ from financial Luhn checks. Tools that skip the date logic get false positives.

The Samordningsnummer Gap

Sweden gives foreign residents a coordination number called a samordningsnummer. It is needed before a full personnummer is issued. The format is the same. The difference: 60 is added to the birth-day digits.

  • Personnummer, born January 15: day digits = 15.
  • Samordningsnummer, same date: day digits = 75 (15 + 60).

Valid day values for a samordningsnummer run from 61 to 91. Tools that only accept 01 to 31 will miss every one of them.

Foreign-born residents are about 20% of Sweden's population. For firms with non-Swedish staff or clients, this gap means a large share of records go undetected.

IMY's Anonymization Rules

IMY's 2023 anonymization guide is the most detailed of any EU data authority. Twelve other DPAs cite it.

Three rules apply to Swedish datasets:

  • k-anonymity ≥ 5. Each record must be indistinguishable from at least four others on all key fields. Age, gender, municipality, and job are typical quasi-identifiers. Sweden's small population makes small groups easy to isolate.
  • l-diversity for health and finance data. k-anonymity alone does not stop inference attacks. l-diversity requires each group to hold at least l distinct sensitive values.
  • Formal proof required. IMY does not accept claimed compliance. Technical documentation must show the thresholds are met.

The 79% Rate: What It Means in Practice

For a firm with 50,000 Swedish users, 79% means about 39,500 rights requests per year. Each one must be answered within 30 days.

Manual handling cannot scale to that volume. Firms need automated PII search across all storage: main databases, backups, analytics, and AI training sets. Systems must find personnummer and samordningsnummer. Both need Luhn checks and the 60-day offset rule.

That technical accuracy is the base requirement for responding to Swedish rights requests at scale. Without it, automated inventory systems will miss a significant share of the records they are required to find and return.

See our IMY GDPR anonymization and Nordic guide for the full anonymization framework and IMY's 2024 enforcement record.

For comparison across EU states, see our BFDI Germany GDPR technical guide.

Sources

Ready to protect your data?

Start anonymizing PII with 285+ entity types across 48 languages.

About this page

We update this page when our platform or the law changes.

Read our founder note for how we work.

Each change shows up in the timestamp at the top.

Related reading

We follow these rules

  • GDPR (EU 2016/679).
  • ISO/IEC 27001:2022.
  • NIS2 (EU 2022/2555).
  • HIPAA safe harbor under 45 CFR § 164.514(b)(2).

Our promise

We do not sell your data.

We do not train models on your text.

We store your files in Germany.

You can delete your account at any time.

You own your work.

Where we run

Our servers live in Falkenstein, Germany.

We use Hetzner. They hold ISO 27001 certification.

All data stays in the EU.

Backups run every day.

Need help?

Email support@anonym.legal.

We reply within one business day.

How we test

We run a full check suite on every release.

Each surface gets its own sweep script and report.

Human reviewers spot-check the output each week.

We track recall and precision on a labelled set.

Bad runs block the deploy.

What we never do

  • We never sell your information to third parties.
  • We never train models on what you upload.
  • We never keep your work after you delete it.
  • We never share keys with any outside firm.
  • We never run ads inside the product.

Plans in plain words

We sell credits, not seats.

One credit covers one short job.

Long jobs use a few credits each.

You can top up at any time.

Unused credits roll over each month.

Read the plans page for current rates.

Who built this

A small team of engineers and lawyers built this.

We ship from Europe and work in the open.

Our founder note spells out why we started.

Where to start

How the parts fit

A browser add-on cleans text inside Chrome.

A Word plug-in handles drafts in Office.

A small desktop tool works on whole folders.

An agent protocol link feeds large models safely.

All four share one core engine and one rule set.

Words from our team

We started this work after a lunch about cookies.

One friend kept getting odd ads on her phone.

We asked why a court file leaked through a draft.

We sketched the first build on a napkin that week.

By month three we had a tiny demo for a friend.

She used it on her first case the next day.

Common questions we hear

Can the tool read scanned PDFs? Yes, with OCR.

Does it work on long files? Yes, in small chunks.

Can I roll my own rule set? Yes, save it as a preset.

Does it run offline? The desktop build runs offline.

Do you keep my files? No, the cloud build wipes after each run.

Will it learn from my work? No, we never train on inputs.

A short tour of the workflow

Upload a file or paste a snippet of prose.

Pick the entities you want gone from the draft.

Choose a method: replace, mask, hash, encrypt, or redact.

Press run and watch the side panel show each hit.

Skim the result and tweak any rule that misfired.

Save the cleaned file or send it to a teammate.