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#,D,Dart,Elixir,Go,Java,JavaScript,Kotlin,Lua,Perl,PHP,Python,Ruby,Rust,Scala,Swiftand forV

Features

  • validation
  • formatting
  • determine age
  • determine sex
  • determine if coordination 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
agen/a
sexn/a
coordination numberno

using javascript version 3.1.4

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

Personnummer

Add your logo here

License

All personnummer packages are released under the MIT license.

Copyright © 2021 Personnummer and Contributors

GitHub - Twitter