IBAN Tools 🏦
A comprehensive Python toolkit for IBAN operations including validation, extraction, generation, formatting, parsing, and BIC lookup.
Features (6 Core Functions)
| Function | Description |
|---|---|
extract_ibans_from_text() |
Extract validated IBANs from any text |
extract_ibans_from_pdf() |
Extract validated IBANs from PDF files |
generate_mock_iban() |
Generate random but valid test IBANs |
format_iban() / sanitize_iban() |
Format or clean IBAN strings |
parse_iban() |
Decompose IBAN into structured components |
iban_to_bic() |
Look up SWIFT BIC code from IBAN |
Quick Start
from iban_tools import (
validate_iban,
extract_ibans_from_text,
generate_mock_iban,
format_iban,
sanitize_iban,
parse_iban,
iban_to_bic,
)
# 1. Validate
validate_iban("DE89 3704 0044 0532 0130 00") # True
# 2. Extract from text
text = "Transfer to DE89370400440532013000 or GB29NWBK60161331926819"
extract_ibans_from_text(text)
# ['DE89370400440532013000', 'GB29NWBK60161331926819']
# 3. Generate mock IBANs for testing
generate_mock_iban("TR") # 'TR...' (valid random IBAN)
# 4. Format / Sanitize
format_iban("DE89370400440532013000")
# 'DE89 3704 0044 0532 0130 00'
sanitize_iban("DE89 3704-0044.0532/0130 00")
# 'DE89370400440532013000'
# 5. Parse
parse_iban("DE89370400440532013000")
# {
# 'is_valid': True,
# 'country_code': 'DE',
# 'check_digits': '89',
# 'bank_code': '37040044',
# 'account_number': '0532013000',
# 'bban': '370400440532013000',
# 'country_name': 'Germany'
# }
# 6. IBAN to BIC
iban_to_bic("DE89370400440532013000") # 'COBADEFFXXX'
Installation
pip install iban-tools
Or from source:
git clone https://github.com/ademakdogan/iban-tools.git
cd iban-tools
uv sync --all-extras
Tech Stack
- Python 3.13
- uv package manager
- pypdf (PDF extraction)
- pytest (testing)
Supported Countries
BIC Lookup: AT, BE, DE, ES, FR, LU, NL
IBAN Validation & Generation: 76 countries (full ISO 13616 registry)
License
MIT
Metadata
Release files for iban-tools 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iban_tools-0.1.1.tar.gz | 57.5 kB | Without provenance | Details for iban_tools-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iban_tools-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for iban_tools-0.1.1-py3-none-any.whl |
Total release size: 105.6 kB
Release files / iban_tools-0.1.1.tar.gz
| Download URL | iban_tools-0.1.1.tar.gz |
|---|---|
| Size | 57.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4babbbb3c4da4dbcb4512d19402540ab6faa49999897dd313decf570ac574452
|
|
BLAKE2b-256 checksum How to use checksums |
2727c51665c966f0fb2667b9362e42f8bb3205f567b0baebd43e026c57eab1f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / iban_tools-0.1.1-py3-none-any.whl
| Download URL | iban_tools-0.1.1-py3-none-any.whl |
|---|---|
| Size | 48.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a9dfb0ade5b0eb44d7c71a11f39423a02fce06e06dad8ec3a095d9fd02d1831
|
|
BLAKE2b-256 checksum How to use checksums |
d24ff7d0d58f54267bc22f0b22e6f4d3c634d5c781a2313e30abccb7dd0dc685
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for iban-tools 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.