Numbers & Finance · In-Browser Regular Expression Lab
IBAN Regex — International Bank Account Number Validation
Validates canonical IBAN structure: 2-letter country code, 2-digit checksum, and up to 30 alphanumeric characters.
Flags:
//none
Match Found
Load Sample:
Match Inspection & Details1 match
Match #1:GB82WEST12345698765432
Test Samples Verification Matrix
Expected Valid Samples (Should Match)
GB82WEST12345698765432 Pass
DE89370400440532013000 Pass
FR1420041010050500013M02606 Pass
Expected Invalid Samples (Must Reject)
1282WEST123456 Rejected (Pass)
GB82WEST Rejected (Pass)
DE8937040044053201300099999999999 Rejected (Pass)
Code Implementation Generator
// JavaScript / TypeScript (ES6+)
const pattern = /^[A-Z]{2}[0-9]{2}[A-Z0-9]{4}[0-9]{7}([A-Z0-9]?){0,16}$/;
const text = "GB82WEST12345698765432";
const isMatch = pattern.test(text);
console.log("Is Match:", isMatch);
if (isMatch) {
const matches = text.match(pattern);
console.log("Matches:", matches);
}Regular Expression Token Breakdown
Conforms to ISO 13616 standard for international bank account representation. Each component of the regular expression serves a distinct syntactical purpose as mapped below:
| Token Pattern | Name / Component | Function & Rule |
|---|---|---|
| ^[A-Z]{2} | Country Code | Two-letter ISO 3166-1 alpha-2 code. |
| [0-9]{2} | Check Digits | Two check digits calculated via mod 97. |
| [A-Z0-9]{4} | Bank Code | Basic Bank Account Number (BBAN) prefix. |
| [0-9]{7} | Account number | Standardized account digits. |
Frequently Asked Questions
Does this regex allow spaces?
Related Regular Expressions
Browse All 40 PatternsNumbers & Finance
Credit Card (Visa & Mastercard)
Detects Visa and Mastercard credit card format with optional space or hyphen delimiters.
/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|2(?:22[1-9]|2[3-9][0-9]|[3-6][0-9]{2}|7[01][0-9]|720)[0-9]{12})$/Test regex
Numbers & Finance
US Phone Number Format
Flexible US phone number validator matching standard parentheses, hyphens, and spaces.
/^(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})$/Test regex
Data & Formatting
ISO Date (YYYY-MM-DD)
Validates 4-digit year, 2-digit month (01-12), and 2-digit day (01-31) in ISO format.
/^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/Test regex