PHPackages                             marshmallow/iban - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. marshmallow/iban

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

marshmallow/iban
================

With this package you will be able to check iban numbers and get BIC information.

v1.2.3(5y ago)067MITPHPPHP ^7.0|^8.0CI passing

Since Apr 3Pushed 2w ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/iban)[ Packagist](https://packagist.org/packages/marshmallow/iban)[ Docs](https://github.com/Marshmallow-Development/)[ RSS](/packages/marshmallow-iban/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (6)Used By (0)

[![alt text](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67 "marshmallow.")](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67)

IBAN
====

[](#iban)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a9a156cb82581f8817f47ffba1b3b804cad832b11d5dd87c66b61f61f173588b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f6962616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/iban)[![Total Downloads](https://camo.githubusercontent.com/ec8131abfc6addc13678e23d454a945231a894aced3f2993b28eeb53c7939c78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f6962616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/iban)[![License](https://camo.githubusercontent.com/5615b63964016543eb79898d2d66d54155be0f3e26e9c5c91d241c205b39416d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d617273686d616c6c6f772f6962616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/iban)

With this package you will be able to validate IBAN numbers and get BIC information.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require marshmallow/iban
```

The package requires PHP `^7.0|^8.0`. Everything is exposed through static methods, so there is nothing to register or configure.

Usage
-----

[](#usage)

The package exposes a single class, `Marshmallow\IBAN\IBAN`, with three static methods.

### Validate an IBAN

[](#validate-an-iban)

Call `Marshmallow\IBAN\IBAN::validate($iban)` to check whether the provided IBAN is valid. Returns `true` or `false`. Spaces are ignored, so both spaced and unspaced IBANs are accepted.

```
use Marshmallow\IBAN\IBAN;

IBAN::validate('NL93 RABO 0317 7456 46'); // true
IBAN::validate('NL00RABO0000000000');     // false
```

### Get the bank account number

[](#get-the-bank-account-number)

Call `Marshmallow\IBAN\IBAN::getBankAccount($iban)` to get the bank account number. Returns the account number as a string, or `null` when the IBAN is not valid.

```
use Marshmallow\IBAN\IBAN;

IBAN::getBankAccount('NL93RABO0317745646'); // "317745646"
```

### Get the BIC from an IBAN

[](#get-the-bic-from-an-iban)

Call `Marshmallow\IBAN\IBAN::getBic($iban)` to look up the BIC information for an IBAN. Returns an `array` when a match is found, or `null` when the IBAN is invalid or no match exists.

```
use Marshmallow\IBAN\IBAN;

IBAN::getBic('NL93RABO0317745646');
```

```
[
    "bic"            => "RABONL2U",
    "identifier"     => "RABO",
    "name"           => "RABOBANK",
    "iban"           => "NL93RABO0317745646",
    "account_number" => "317745646",
]
```

Tests during development
------------------------

[](#tests-during-development)

When the package is installed as a path dependency inside a host application, you can run its tests with:

```
php artisan test packages/marshmallow/iban
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please report security vulnerabilities by email to  rather than via the public issue tracker.

Credits
-------

[](#credits)

- [Stef](https://marshmallow.dev)
- [All Contributors](https://github.com/marshmallow-packages/iban/contributors)

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance63

Regular maintenance activity

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 87% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~368 days

Total

2

Last Release

1911d ago

PHP version history (2 changes)v1.2.2PHP &gt;=7.0.0

v1.2.3PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/be33d2624e24c516e73892b0929447cc762f3622c024ab8d0d2a59042e5d2c7f?d=identicon)[marshmallow](/maintainers/marshmallow)

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

IBANBICmarshmallow

### Embed Badge

![Health badge](/badges/marshmallow-iban/health.svg)

```
[![Health](https://phpackages.com/badges/marshmallow-iban/health.svg)](https://phpackages.com/packages/marshmallow-iban)
```

###  Alternatives

[intervention/validation

Additional validation rules for the Laravel framework

6827.2M18](/packages/intervention-validation)[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8123.5M26](/packages/ronanguilloux-isocodes)[abcaeffchen/sepa-utilities

SepaUtilities provides useful methods for validating and sanitizing inputs used in SEPA files supporting PHP &gt;= 8.1.

312.1M3](/packages/abcaeffchen-sepa-utilities)[jschaedl/iban-validation

A small library for validating International BankAccount Numbers (IBANs).

1033.2M17](/packages/jschaedl-iban-validation)[cmpayments/iban

IBAN utility library

34383.5k5](/packages/cmpayments-iban)[iamfarhad/validation

🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes &amp; more. Modern Laravel 10-13 support with both ValidationRule objects &amp; string-based rules.

3017.3k](/packages/iamfarhad-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
