Generate valid Mexican CLABE numbers for testing financial applications. Create single or multiple CLABEs with proper bank codes and check digits, or verify existing ones.
Generate valid Mexican CLABE (Clave Bancaria Estandarizada) numbers for software testing or verify existing ones.
The Mexican CLABE (Clave Bancaria Estandarizada or Standardized Banking Code) is an 18-digit numeric code used in Mexico's banking system to standardize and facilitate electronic funds transfers. For software developers, QA engineers, and financial technology professionals, having access to valid CLABE numbers is essential for testing payment systems, banking applications, and financial software that interacts with Mexican banking infrastructure.
This Mexican CLABE Generator tool creates valid CLABE numbers that follow the official format and validation rules established by the Mexican Banking Association (ABM). Whether you need a single CLABE for a quick test or multiple CLABEs for comprehensive testing scenarios, this tool provides properly formatted numbers with valid check digits that pass standard verification processes.
A CLABE (Clave Bancaria Estandarizada) is Mexico's standardized banking code used for all electronic funds transfers within the Mexican banking system. Introduced in 2004, the CLABE system ensures that bank transfers can be processed accurately and efficiently across different financial institutions in Mexico.
Every CLABE consists of exactly 18 digits, divided into four key components:
For example, in the CLABE number 012345678901234567
:
012
is the bank code (BBVA Bancomer)345
is the branch code67890123456
is the account number7
is the check digitThe first three digits of a CLABE represent the bank code, which identifies the specific financial institution in Mexico. These codes are standardized and assigned by the Mexican Banking Association (ABM). Our generator includes all official bank codes from the Mexican financial system, including major banks like:
The next three digits (positions 4-6) represent the branch code. While real branch codes correspond to specific physical locations of banks, for testing purposes, our generator creates random but valid-format branch codes.
Positions 7-17 contain the 11-digit account number. In production systems, these numbers are unique to each bank account. Our generator creates random account numbers that follow the proper format but are not linked to real accounts.
The 18th digit is a check digit calculated using a specific algorithm:
This algorithm ensures that the CLABE number passes validation checks.
1function calculateCheckDigit(clabe17) {
2 // Weights for each position
3 const weights = [3, 7, 1, 3, 7, 1, 3, 7, 1, 3, 7, 1, 3, 7, 1, 3, 7];
4
5 // Calculate the weighted sum
6 let sum = 0;
7 for (let i = 0; i < 17; i++) {
8 const digit = parseInt(clabe17[i], 10);
9 const product = digit * weights[i];
10 sum += product % 10; // Only the last digit of the product is used
11 }
12
13 // Calculate the check digit
14 const mod = sum % 10;
15 const checkDigit = (10 - mod) % 10; // If mod is 0, check digit is 0
16
17 return checkDigit;
18}
19
Our CLABE generator offers three main functions:
This option creates one valid CLABE number. You can:
When you need several CLABE numbers for testing:
To check if a CLABE number is valid:
When verifying a CLABE, our tool performs several checks:
1def validate_clabe(clabe):
2 # Check if CLABE is 18 digits
3 if not re.match(r'^\d{18}$', clabe):
4 return {"isValid": False, "errors": ["CLABE must be exactly 18 digits"]}
5
6 # Extract components
7 bank_code = clabe[0:3]
8 branch_code = clabe[3:6]
9 account_number = clabe[6:17]
10 provided_check_digit = clabe[17]
11
12 # Validate bank code
13 if bank_code not in MEXICAN_BANKS:
14 return {"isValid": False, "errors": ["Invalid bank code"]}
15
16 # Validate check digit
17 calculated_check_digit = calculate_check_digit(clabe[0:17])
18 if int(provided_check_digit) != calculated_check_digit:
19 return {"isValid": False, "errors": ["Invalid check digit"]}
20
21 # If all checks pass
22 return {
23 "isValid": True,
24 "bankCode": bank_code,
25 "bankName": MEXICAN_BANKS[bank_code],
26 "branchCode": branch_code,
27 "accountNumber": account_number,
28 "checkDigit": provided_check_digit
29 }
30
Payment System Integration: When developing systems that integrate with Mexican payment gateways or banking APIs, you need valid CLABE numbers to test the integration.
Form Validation: For applications that collect CLABE numbers, you can use this tool to generate valid test data and verify your validation logic.
Database Testing: When populating test databases with Mexican banking information, this tool provides realistic CLABE numbers.
Regression Testing: Use consistent, valid CLABE numbers across test suites to ensure your application handles Mexican banking data correctly.
Cross-Border Payment Testing: For applications handling international transfers to Mexico, test with valid CLABE numbers.
Banking App Simulation: Create realistic test scenarios for banking applications that process Mexican transfers.
Error Handling: Test how your system responds to valid and invalid CLABE numbers to ensure robust error handling.
Learning Mexican Banking Standards: Understand the structure and validation rules of CLABE numbers.
Financial Technology Training: Use the tool to demonstrate Mexican banking standards in fintech training programs.
While our CLABE generator creates technically valid numbers that pass standard validation checks, it's important to understand these limitations:
Not Connected to Real Accounts: Generated CLABEs are not linked to actual bank accounts and cannot be used for real transactions.
Testing Only: These CLABEs should only be used in testing environments, never in production systems.
Bank Code Updates: The Mexican Banking Association occasionally updates the list of official bank codes. Our tool is regularly updated, but there might be a short delay in reflecting the very latest changes.
Security Considerations: Never use generated test CLABEs in security-sensitive contexts or as substitutes for proper security testing.
While CLABE is the standard for Mexican interbank transfers, other identification systems exist in the financial world:
IBAN (International Bank Account Number): Used primarily in Europe and some other countries, but not in Mexico.
SWIFT/BIC Codes: Used for international transfers, often in conjunction with CLABE for transfers to Mexico.
ABA Routing Numbers: Used in the United States banking system.
Account Numbers: Simple bank account numbers without the standardized format of CLABE.
For testing Mexican financial systems specifically, CLABE is the required standard.
The CLABE system was introduced in Mexico in 2004 by the Mexican Banking Association (Asociación de Bancos de México, ABM) to standardize electronic funds transfers between Mexican banks. Before CLABE, each bank had its own account numbering system, making interbank transfers complicated and error-prone.
The implementation of CLABE coincided with the development of the Interbanking Electronic Payment System (Sistema de Pagos Electrónicos Interbancarios, SPEI), Mexico's real-time gross settlement system operated by the central bank, Banco de México.
Since its introduction, CLABE has become mandatory for all interbank electronic transfers in Mexico, significantly improving the efficiency and reliability of the Mexican banking system.
A CLABE number is used to identify bank accounts within the Mexican banking system for electronic funds transfers. It ensures that money is sent to the correct account at the correct bank and branch.
The first three digits of a CLABE number identify the bank. For example, 012 indicates BBVA Bancomer, 072 indicates Banorte, and 002 indicates Banamex.
No. The CLABE numbers created by this tool are structurally valid but are not connected to any real bank accounts. They should only be used for testing purposes.
A valid CLABE number must:
No. These are test CLABEs only and should never be used for real financial transactions. They will not route to actual accounts.
We regularly update our bank code database to reflect changes in the Mexican banking system. However, if you notice any discrepancies, please let us know.
While our tool verifies the structural validity of a CLABE, bank applications may perform additional checks specific to their systems, such as verifying that the account actually exists in their database.
Yes, our tool allows you to select a specific bank when generating CLABEs, ensuring that the bank code portion matches your selected institution.
The check digit is calculated using a weighted modulo 10 algorithm. Each of the first 17 digits is multiplied by a specific weight (3, 7, 1, 3, 7, 1, ...), and only the last digit of each product is used. These digits are summed, and the check digit is calculated as (10 - (sum mod 10)) mod 10.
For performance reasons, our tool limits generation to 100 CLABEs at a time, which should be sufficient for most testing scenarios.
Banco de México. "CLABE - Clave Bancaria Estandarizada." https://www.banxico.org.mx/servicios/clabe-estandarizada.html
Asociación de Bancos de México (ABM). "Catálogo de Claves de Instituciones de Crédito." https://www.abm.org.mx/
Sistema de Pagos Electrónicos Interbancarios (SPEI). "Reglas de Operación." https://www.banxico.org.mx/sistemas-de-pago/servicios/sistema-de-pagos-electronicos-interbancarios-spei/
Comisión Nacional Bancaria y de Valores (CNBV). "Disposiciones de carácter general aplicables a las instituciones de crédito." https://www.gob.mx/cnbv
Try our Mexican CLABE Generator now to create valid test CLABEs for your development and testing needs. Whether you're building a financial application, testing payment systems, or learning about Mexican banking standards, our tool provides the accurate test data you need.
Discover more tools that might be useful for your workflow