eMI Kennitala Validator is a library for validating Icelandic national identification numbers known as kennitala. The library is available in the following computer languages: Bash, C, C#, C++, ECMAScript, Go, Java, Perl, PHP, PowerShell, Python, Ruby and TypeScript. The library determines whether a given kennitala is valid but does not check whether it exists with the Registers Iceland.
https://emi.is/?page=solutions&solution=emi-kennitala-validator