Personnummer personnummer

Validate swedish personal identity numbers

Personnummer is a small open-source project created to validate, format and determine sex and age from swedish personal identity numbers. Support the project by becoming a backer or sponsor at OpenCollective.

available in:Bash,C/C++,C#,Clojure,D,Dart,Elixir,Gleam,Go,Haskell,Java,JavaScript,Kotlin,Lua,Perl,PHP,Python,Ruby,Rust,Scala,Swiftand forV.

Features

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

All features might not be implemented in all languages. Full specification can be found here.

Try

input

result

validno
short formatn/a
long formatn/a
age0
sexn/a
coordination numberno
interim numberno

using javascript version 3.2.1

Generate personal identity numbers

result

qr code

Some implementations may be a work in progress if you find a bug, please open an issue in the specific implementation repository.

If an implementation for your favorite language is missing, feel free to port it over from one of the existing versions. There are still plenty of languages to contribute to: R, Nu, Groovy, Julia, Racket, F#, Clojure, Erlang.

Who is using Personnummer

OrganisationsnummerPersonnummer

Add your logo here.

License

All personnummer packages are released under the MIT license.

Copyright © 2024 Personnummer and Contributors

GitHub - Twitter