.N .NET Landscape

IbanNet

Utilities & Core Helpers
github.com/skwasjer/IbanNet

C# .NET IBAN validator, parser, builder and generator

builderc-sharpcsharpdotnetdotnet-coredotnet-standardgeneratoribaniban-validatorparservalidator
GitHub stars
155
Forks
35
Open issues
12
NuGet downloads
11,752,155
latest 6.2.0
License
Apache-2.0
Language
C#
Last push
1 month ago
23 Sept 2026
Created
25 Dec 2017

IbanNet

IbanNet is a .NET library providing functionality to validate and parse an International Bank Account Number also known as IBAN.

Additionally, IbanNet provides:

  • the Iban primitive type, which can be used as a drop in replacement for a string in your domain.
  • a builder to construct IBAN's from a Basic Bank Account Number (BBAN).
  • a generator to assist with (unit) testing.

Stand With Ukraine Main workflow Quality Gate Status Coverage

IbanNet NuGet NuGet Documentation
IbanNet.DataAnnotations NuGet NuGet Documentation
IbanNet.DependencyInjection.Autofac NuGet NuGet Documentation
IbanNet.DependencyInjection.ServiceProvider NuGet NuGet Documentation
IbanNet.FluentValidation NuGet NuGet Documentation

Example with validator

IIbanValidator validator = new IbanValidator();
ValidationResult validationResult = validator.Validate("NL91ABNA0417164300");
if (validationResult.IsValid)
{
    // ..
}

Example with Iban type

Iban iban;
IIbanParser parser = new IbanParser(IbanRegistry.Default);
bool success = parser.TryParse("NL91 ABNA 0417 1643 00", out iban);
if (success)
{
    Console.WriteLine(iban.ToString(IbanFormat.Obfuscated)); // XXXXXXXXXXXXXX4300
}

Contributions

Please check out the contribution guidelines.

Other info