Sweden Personnummer Validator

Validate a Swedish personal identity number and extract birth date, gender and county.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

The Swedish personnummer (personnummer — literally “person number”) is the ten-digit personal identity number issued by Skatteverket, the Swedish Tax Agency, to everyone registered in Sweden. It appears on ID cards, bank accounts, medical records and tax returns, making it the single most important identifier in Swedish civil life. This validator checks whether a personnummer is structurally correct using the Luhn mod-10 checksum algorithm and then extracts every piece of information encoded in the number: birth date, gender, whether the number belongs to a coordination number holder, and — for numbers issued before 1990 — the historical county of birth.

Format overview

A personnummer looks like YYMMDD-NNNC in its canonical short form, for example 811218-9876 (a fictional example — the check digit here is illustrative only).

PartLengthMeaning
YY2Two-digit birth year
MM2Birth month (01–12)
DD2Birth day (01–31), or day + 60 for coordination numbers
separator1Hyphen for people under 100; plus sign for people aged 100+
NNN3Three-digit birth serial; third digit encodes gender
C1Luhn check digit

The full 12-digit form YYYYMMDDNNNC (e.g. 19811218987C) omits the separator and includes the four-digit year. Both forms are accepted here.

How the Luhn algorithm works

The Luhn algorithm (also known as mod-10) was designed to catch single-digit transcription errors and transpositions. For a personnummer it operates on the 10-digit string YYMMDDNNNC:

  1. Write out the nine payload digits (ignore the check digit for now).
  2. Multiply the digits at positions 0, 2, 4, 6, 8 (counting from zero) by 2; multiply the remaining positions by 1.
  3. If any product is 10 or more, replace it with the sum of its own digits (so 14 becomes 1 + 4 = 5; 16 becomes 1 + 6 = 7).
  4. Sum all nine results.
  5. The check digit is (10 minus (sum mod 10)) mod 10.

The number is valid when this computed check digit matches the actual tenth digit.

The validator shows you every multiplication step in the result table so you can follow along and pinpoint any mismatch.

Embedded information

Beyond the checksum, a personnummer carries real data:

Birth date. The YYMMDD part is the date of birth. Because only a two-digit year is stored, the validator infers the century: if YY is greater than the current two-digit year the person was born last century; if not, they were born this century. A + separator overrides this to mean the person is at least 100 years old.

Gender. The third (last) digit of the NNN serial is odd for males and even for females. This encoding has been part of the system since 1947.

Coordination numbers. If the day component is between 61 and 91 the number is a samordningsnummer (coordination number), issued to foreign nationals who need a Swedish identity number without being registered residents. The validator subtracts 60 and shows the real birth day.

County of birth (pre-1990 only). For numbers issued before 1 January 1990, the first two digits of the NNN serial encoded the Swedish county (län) where the person was born. Sweden had 25 counties under this scheme. The validator maps the serial prefix to the county name. From 1990 onward Skatteverket abolished this convention; serials are now distributed regionally without a fixed county table.

Example (obviously fake)

The personnummer 811218-9876 is a deliberately constructed example:

  • Birth date: 18 December 1981
  • Serial: 987 — last digit 7 (odd) → male
  • Check digit: 6
  • Luhn: 8×2=16→7, 1×1=1, 1×2=2, 2×1=2, 1×2=2, 8×1=8, 9×2=18→9, 8×1=8, 7×2=14→5 → sum=44 → check=(10−4)%10=6 ✓

Do not use this or any example number to impersonate a real person. The validator accepts any structurally valid-looking number and intentionally produces a pass result for well-formed fake numbers — it cannot know whether the number is actually assigned.

Every calculation runs entirely in your browser. No number you type is ever transmitted to a server, stored or logged.

Ad placeholder (rectangle)