IBAN Number Regex Pattern
Validates International Bank Account Numbers with country code, check digits, bank code, and account number.
Live Regex Tester
Pattern Breakdown
Code Examples
JavaScript
const regex = /^[A-Z]{2}\d{2}[A-Z0-9]{4}\d{7}([A-Z0-9]?){0,16}$/;
const test = "GB29NWBK60161331926819";
console.log(regex.test(test)); // true
// Extract matches
const matches = test.match(regex);
console.log(matches);Python
import re
pattern = r'^[A-Z]{2}\d{2}[A-Z0-9]{4}\d{7}([A-Z0-9]?){0,16}$'
test = "GB29NWBK60161331926819"
match = re.search(pattern, test)
print(match) # Found!Go
package main
import (
"fmt"
"regexp"
)
func main() {
re := regexp.MustCompile(`^[A-Z]{2}\d{2}[A-Z0-9]{4}\d{7}([A-Z0-9]?){0,16}$`)
fmt.Println(re.MatchString("GB29NWBK60161331926819")) // true
}Common Use Cases
Match Examples
| Input | Result |
|---|---|
| GB29NWBK60161331926819 | Match |
| 1234567890 | No Match |
About the IBAN Number Regex
Validates International Bank Account Numbers with country code, check digits, bank code, and account number.
Regular expressions (regex) are powerful pattern matching tools used across virtually all programming languages. The iban number pattern is classified as advanced difficulty in the identity & documents category. It works in all major programming languages.
When using this regex, always consider edge cases and test thoroughly with real-world data. Use the interactive tester above to validate the pattern against your specific inputs before deploying to production.
More Identity & Documents Patterns
Need More Regex Patterns?
Browse our complete library of 100+ regex patterns with interactive testers.
Frequently Asked Questions
What is the IBAN Number regex pattern?
Validates International Bank Account Numbers with country code, check digits, bank code, and account number.
How do I use the IBAN Number regex?
Use the pattern /^[A-Z]{2}\d{2}[A-Z0-9]{4}\d{7}([A-Z0-9]?){0,16}$/ in your code. In JavaScript: new RegExp('^[A-Z]{2}\d{2}[A-Z0-9]{4}\d{7}([A-Z0-9]?){0,16}$', ''). Test it above with your own input.
What does this IBAN Number regex match?
This pattern matches: "GB29NWBK60161331926819". It does NOT match: "1234567890". Banking, international transfers, payment processing.
Is the IBAN Number regex beginner-friendly?
This pattern is rated Advanced. It uses advanced features like lookaheads, backreferences, or complex alternation.
What languages support the IBAN Number regex?
This pattern works in all major programming languages including JavaScript, Python, Java, C#, Go, Ruby, PHP, and more. Syntax may vary slightly between regex engines.
Can I modify the IBAN Number regex for my use case?
Yes! Use the interactive tester above to modify the pattern and test with your own data. Common modifications include making it case-insensitive (add 'i' flag), matching globally (add 'g' flag), or adjusting character classes.
Related Tools
Social Security Number (US) Regex
Beginner Identity & Documents pattern
US Zip Code Regex
Beginner Identity & Documents pattern
US State Code Regex
Intermediate Identity & Documents pattern
UK Postcode Regex
Intermediate Identity & Documents pattern
Canadian Postal Code Regex
Beginner Identity & Documents pattern
Passport Number Regex
Beginner Identity & Documents pattern