personnummer

validate swedish social security numbers

personnummer is a small open-source project that validates, formatting and determine sex and age from swedish social security numbers.

select language to show usage

installation

dotnet add package Personnummer

example

use Personnummer;

class Example
{
  public Example()
  {
    Personnummer.Valid("19121212+1212")
  }
}

read more

features

  • validation
  • formatting
  • determine age
  • determine sex
  • determine if coordination number

all features might not be implemented in all languages.

try

input

result

validno
short formatn/a
long formatn/a
agen/a
sexn/a
coordination numberno

using javascript version 3.0.1

license

All personnummer packages are under MIT license.