Skip to contentRedact PII for your data. Get a quote

Coverage · Sweden

Swedish personnummer detection and redaction

OpenAnonymizer finds the Swedish personnummer in text and replaces it with a placeholder. The number is confirmed by its official label and its check digits are verified. It runs on a CPU, with no GPU and no API calls.

At a glance

Country
Sweden SE
Format
personnummer
Placeholder
SE_PERSONNUMMER1Each distinct value gets its own number: SE_PERSONNUMMER_1, SE_PERSONNUMMER_2, and so on.
How it is confirmed
ChecksumOfficial label and checksum
Used for
Identifying people registered in Sweden, for tax, health care, banking and public services.

About the personnummer

The number is assigned by the Swedish Tax Agency (Skatteverket).

It is written YYMMDD-NNNC: the date of birth, a three-digit serial and a check digit (the Luhn algorithm). A 12-digit form adds the century.

ExampleThe engine's real output for this input, in Fast mode (the default). The number is a test value.
In
Personnummer: 800101-1231
Out
Personnummer: SE_PERSONNUMMER1

How OpenAnonymizer handles it

Checked by checksum. The format's check digits are verified, so most mistyped or made-up numbers fail. A number with the right label and shape is still masked when its checksum fails, so a typo doesn't let it through.

  • It runs locally on a CPU, with no GPU and no API calls, so the text never leaves your machine.
  • Every package ships every detector, so this format is covered in each of them.
  • It covers 34 languages.
How a match is decided