HomeLife ToolsValidate personnummer

Validate Swedish Social Security Numbers | Personnummer Validator

Free online tool to validate Swedish Personnummer and Samordningsnummer. Supports format validation, Luhn algorithm, gender detection, age calculation, and number parsing.

Online Swedish Personnummer Validator

What is a Swedish Personnummer?

The Swedish personal identity number (Swedish: Personnummer) is a unique identifier issued by the Swedish Tax Agency (Skatteverket) to individuals registered in the Swedish population register. It is an essential identity token in Swedish society, used for interactions with public authorities, healthcare, schools, banks, and many other services.

Structure of a Personnummer

A Swedish Personnummer typically consists of 10 or 12 digits in the format YYYYMMDD-XXXX or YYMMDD-XXXX. Each part carries specific information:

  • First 6/8 digits (date of birth)

    Format YYMMDD or YYYYMMDD. When a person turns 100, the delimiter changes from hyphen (-) to plus (+), e.g., 900101+1234.

  • Digits 7-9 / 10-12 (birth order number)

    A three-digit number that distinguishes individuals born on the same day. Odd numbers are assigned to males, even numbers to females.

  • Last digit (checksum)

    Calculated from the previous 9 or 11 digits using the Luhn algorithm (mod 10) to verify the number's authenticity.

Difference Between Personnummer and Samordningsnummer

The Swedish ID number system includes two main types: Personnummer and Samordningsnummer (coordination number). They apply to different groups.

Personnummer

For persons planning to live in Sweden for at least one year or those with a residence permit for long-term stay. This is the primary official identity number, lifelong once assigned.

Samordningsnummer

For persons staying in Sweden temporarily (less than one year) or those who cannot obtain a Personnummer but have a connection to Sweden (e.g., owning a vacation home). Its structure is similar to Personnummer, but the day part of the birth date is increased by 60.

This validator supports both Personnummer and Samordningsnummer, automatically detecting the number type.

Validation Rule Explained: Luhn Algorithm (Mod 10)

The checksum of a Swedish Personnummer is computed using the Luhn algorithm (also known as the "mod 10" algorithm). This algorithm is widely used for credit card numbers, IMEI numbers, and other identification codes to prevent input errors.

Luhn Algorithm Steps

Take the Personnummer 310317-099x as an example (x is the checksum to compute):

  1. Take the first 9 digits: 3 1 0 3 1 7 0 9 9
  2. Multiply each digit by the weight pattern 2,1,2,1,2,1,2,1,2 from left to right:
    3×2=6,1×1=1,0×2=0,3×1=3,1×2=2,7×1=7,0×2=0,9×1=9,9×2=18
  3. For any product greater than 9, sum its tens and units digits (e.g., 18 → 1+8=9)
  4. Sum all results: 6+1+0+3+2+7+0+9+9=37
  5. Checksum = (10 - (sum mod 10)) mod 10 = (10 - 7) mod 10 = 3

Therefore the complete Personnummer should be 310317-0993. This tool automatically performs Luhn validation to ensure number validity.

Who Can Get a Swedish Personnummer?

The following persons can obtain a Swedish Personnummer:

  • Children born in Sweden – automatically assigned at birth
  • Persons planning to live in Sweden for more than 12 months and registered in the population register
  • Persons holding a Swedish residence permit for long-term stay

If you stay in Sweden for less than one year but still need an official identification number, you can apply for a Samordningsnummer (coordination number) as a temporary substitute.

How to Apply

If you meet the criteria, you need to submit an application to the Swedish Tax Agency (Skatteverket):

  1. Prepare documents: valid passport, residence permit (if applicable), proof of Swedish address, etc.
  2. Online notification: Use the Tax Agency's e-service "Flytta till Sverige" (Moving to Sweden).
  3. Identity verification: Book an appointment and visit a Skatteverket service centre for in‑person identity verification, presenting original documents and having your photo taken.
  4. Wait for approval: The Tax Agency will send your Personnummer by letter to your registered address.