Sverige Personnummer

Validate and Generate a Sverige Personnummer Easily and Quickly


This is a Sverige Personnummer validation tool, you can enter the appropriate value to get the verification results, for the convenience of use, the tool provides a generator, you can use the generator to test the results.

What is Sverige Personnummer?

The Sverige Personnummer composed of 10 digits and a hyphen. The first 6 digits correspond to the person's birthdate, in YYMMDD format. They are followed by a hyphen, and four final digits. People over the age of 100 replace the hyphen with a plus sign. Among the four last digits, the first three are a serial number. The last digit of these three represents gender. An odd number is assigned to males and an even number to females. The last digit of SSN is the checksum which is calculated using Luhn algorithm.

SSN Generation and Validation?

The SSN Generator is designed to developers in need of randomly generated data for testing cases. The SSN validation validates the numbers pattern for a given state area code. Therefore, if a SSN passes this tool validation, it doesn't mean that it really exists, only that it's code, for the given pattern, is possible. This is the same validation that guarantees the basic authentication, of generated ssn's, for forms under development, as they merely checks for a possible pattern. Generated SSN's aren't real, and shouldn't be used on attempt of any illegal activity.

How the Luhn check digit works

The last digit of a personnummer is calculated from the nine before it using the Luhn algorithm — the same checksum used on payment cards. It is what lets software reject a mistyped number without contacting any register.

The calculation, step by step

  1. Take the nine digits before the check digit.
  2. Working from the left, double every second digit starting with the first.
  3. If doubling produces a two-digit result, subtract nine from it.
  4. Add all nine results together.
  5. The check digit is whatever brings that total up to the next multiple of ten.

A worked example

Take 850615-3876. The first nine digits are 8 5 0 6 1 5 3 8 7.

  • Doubling every second digit from the left gives 16, 5, 0, 6, 2, 5, 6, 8, 14.
  • Reducing the two-digit results: 16 becomes 7, and 14 becomes 5.
  • The nine values are now 7, 5, 0, 6, 2, 5, 6, 8, 5 — which total 44.
  • The next multiple of ten is 50, so the check digit is 6 — matching the number above.

What the checksum does and does not catch

Luhn was designed to catch the two mistakes people actually make: a single wrong digit, and two adjacent digits swapped. It catches both reliably.

What it cannot do is tell you whether a number belongs to anyone. Roughly one in ten correctly-formatted strings will satisfy the checksum by chance, so a passing number is a plausible number and nothing more. Use it to validate input at the point of entry, not as proof of identity.

Related Swedish personnummer tools