Argentinian CBU Generator & Validator Tool | Banking Codes
Generate valid random CBU numbers and validate existing Argentinian bank account codes with this simple, user-friendly tool for testing and verification purposes.
Argentinian CBU Generator & Validator
Generate a valid random CBU (Clave Bancaria Uniforme) for testing purposes.
Click the button above to generate a valid CBU
About CBU
The CBU (Clave Bancaria Uniforme) is a 22-digit code used in Argentina to identify bank accounts for electronic transfers and payments.
Each CBU contains information about the bank, branch, and account number, along with verification digits that ensure its validity.
CBU Structure
Documentation
Argentinian CBU Generator & Validator Tool
Introduction
The Argentinian CBU (Clave Bancaria Uniforme) is a standardized 22-digit code used throughout Argentina's banking system to uniquely identify bank accounts for electronic transfers, direct deposits, and automated payments. Whether you're a developer testing financial applications, a finance professional verifying account information, or simply need to validate a CBU, our Argentinian CBU Generator and Validator tool provides a simple, efficient solution. This free online tool allows you to instantly generate valid random CBUs for testing purposes and validate existing CBUs to ensure their structural integrity and compliance with the official format.
What is a CBU?
A CBU (Clave Bancaria Uniforme, or Uniform Banking Code in English) is Argentina's standardized bank account identifier, similar to the IBAN used in Europe or the routing and account number system in the United States. Implemented by the Central Bank of Argentina (BCRA), the CBU system ensures secure and accurate electronic fund transfers between accounts within the Argentine banking system.
CBU Structure and Format
Every valid CBU consists of exactly 22 digits divided into two main blocks:
-
First Block (8 digits): Identifies the financial institution and branch
- First 3 digits: Bank code assigned by the BCRA
- Next 4 digits: Branch code within the bank
- Last digit: Verification digit for the first block
-
Second Block (14 digits): Identifies the specific account
- First 13 digits: Account number (may include account type and other identifiers)
- Last digit: Verification digit for the second block
The verification digits are calculated using a specific algorithm that ensures the integrity of the CBU. This helps prevent typographical errors and fraudulent transactions by validating the code before processing any transfer.
How Our CBU Generator Works
Our CBU generator creates valid, random CBUs that conform to the official structure and pass all verification checks. Here's how it works:
- The system generates random digits for the bank code, branch code, and account number portions
- It calculates the appropriate verification digits using the official algorithm
- The complete 22-digit CBU is assembled and displayed in the standard format
The generator is perfect for:
- Software developers testing financial applications
- QA engineers validating payment systems
- Educational purposes to understand the CBU structure
- Creating sample data for demonstrations or documentation
Step-by-Step: Generating a CBU
- Navigate to the "Generator" tab of the tool
- Click the "Generate CBU" button
- A valid, random 22-digit CBU will appear in the display area
- Use the "Copy" button to copy the CBU to your clipboard for use in your applications
How Our CBU Validator Works
The CBU validator analyzes any 22-digit code to determine if it meets the official CBU requirements. The validation process includes:
- Checking the length (must be exactly 22 digits)
- Verifying that all characters are numeric
- Validating the first block verification digit
- Validating the second block verification digit
If any of these checks fail, the validator will identify the specific issues, helping you understand exactly why a CBU is invalid.
Step-by-Step: Validating a CBU
- Navigate to the "Validator" tab of the tool
- Enter the 22-digit CBU you want to validate
- Click the "Validate CBU" button
- Review the validation result:
- Green indicator for valid CBUs
- Red indicator with specific error messages for invalid CBUs
The CBU Verification Algorithm
The verification algorithm used for CBUs employs a weighted sum calculation followed by a modulo operation to determine the check digits. Here's how it works:
First Block Verification
For the first block (first 8 digits), the verification digit is calculated as follows:
- Take the first 7 digits of the CBU
- Multiply each digit by its corresponding weight: [7, 1, 3, 9, 7, 1, 3]
- Sum the resulting products
- Calculate: 10 - (sum % 10)
- If the result is 10, the verification digit is 0; otherwise, it's the calculated value
Second Block Verification
For the second block (last 14 digits), the verification digit is calculated as follows:
- Take the first 13 digits of the second block
- Multiply each digit by its corresponding weight: [3, 9, 7, 1, 3, 9, 7, 1, 3, 9, 7, 1, 3]
- Sum the resulting products
- Calculate: 10 - (sum % 10)
- If the result is 10, the verification digit is 0; otherwise, it's the calculated value
Code Examples
Here are examples of how to implement CBU validation and generation in various programming languages:
1// JavaScript: Calculate CBU check digit
2function calculateCheckDigit(number, weights) {
3 if (number.length !== weights.length) {
4 throw new Error('Number length must match weights length');
5 }
6
7 let sum = 0;
8 for (let i = 0; i < number.length; i++) {
9 sum += parseInt(number[i]) * weights[i];
10 }
11
12 const remainder = sum % 10;
13 return remainder === 0 ? 0 : 10 - remainder;
14}
15
16// Validate first block of CBU
17function validateFirstBlock(block) {
18 if (block.length !== 8 || !/^\d{8}$/.test(block)) {
19 return false;
20 }
21
22 const number = block.substring(0, 7);
23 const checkDigit = parseInt(block[7]);
24 const weights = [7, 1, 3, 9, 7, 1, 3];
25
26 return checkDigit === calculateCheckDigit(number, weights);
27}
28
1# Python: Validate a complete CBU
2import re
3
4def validate_cbu(cbu):
5 # Check basic format
6 if not cbu or not re.match(r'^\d{22}$', cbu):
7 return {
8 'isValid': False,
9 'errors': ['CBU must be 22 digits']
10 }
11
12 # Split into blocks
13 first_block = cbu[:8]
14 second_block = cbu[8:]
15
16 # Validate each block
17 first_block_valid = validate_first_block(first_block)
18 second_block_valid = validate_second_block(second_block)
19
20 errors = []
21 if not first_block_valid:
22 errors.append('First block (bank/branch code) is invalid')
23 if not second_block_valid:
24 errors.append('Second block (account number) is invalid')
25
26 return {
27 'isValid': first_block_valid and second_block_valid,
28 'errors': errors
29 }
30
1// Java: Generate a random valid CBU
2import java.util.Random;
3
4public class CBUGenerator {
5 private static final Random random = new Random();
6
7 public static String generateCBU() {
8 // Generate first 7 digits (bank and branch code)
9 StringBuilder firstBlockBase = new StringBuilder();
10 for (int i = 0; i < 7; i++) {
11 firstBlockBase.append(random.nextInt(10));
12 }
13
14 // Calculate check digit for first block
15 int[] firstBlockWeights = {7, 1, 3, 9, 7, 1, 3};
16 int firstBlockCheckDigit = calculateCheckDigit(
17 firstBlockBase.toString(),
18 firstBlockWeights
19 );
20
21 // Generate first 13 digits of second block
22 StringBuilder secondBlockBase = new StringBuilder();
23 for (int i = 0; i < 13; i++) {
24 secondBlockBase.append(random.nextInt(10));
25 }
26
27 // Calculate check digit for second block
28 int[] secondBlockWeights = {3, 9, 7, 1, 3, 9, 7, 1, 3, 9, 7, 1, 3};
29 int secondBlockCheckDigit = calculateCheckDigit(
30 secondBlockBase.toString(),
31 secondBlockWeights
32 );
33
34 // Combine all parts
35 return firstBlockBase.toString() + firstBlockCheckDigit +
36 secondBlockBase.toString() + secondBlockCheckDigit;
37 }
38
39 // Implementation of calculateCheckDigit method...
40}
41
1// PHP: Format a CBU for display
2function formatCBU($cbu) {
3 if (!$cbu || strlen($cbu) !== 22) {
4 return $cbu;
5 }
6
7 // Format as: XXXXXXXX XXXXXXXXXXXXXX
8 return substr($cbu, 0, 8) . ' ' . substr($cbu, 8);
9}
10
11// Usage example
12$cbu = '0123456789012345678901';
13echo formatCBU($cbu); // Outputs: 01234567 89012345678901
14
1' Excel VBA: Validate a CBU
2Function ValidateCBU(cbu As String) As Boolean
3 ' Check length
4 If Len(cbu) <> 22 Then
5 ValidateCBU = False
6 Exit Function
7 End If
8
9 ' Check if all characters are digits
10 Dim i As Integer
11 For i = 1 To Len(cbu)
12 If Not IsNumeric(Mid(cbu, i, 1)) Then
13 ValidateCBU = False
14 Exit Function
15 End If
16 Next i
17
18 ' Extract blocks
19 Dim firstBlock As String
20 Dim secondBlock As String
21 firstBlock = Left(cbu, 8)
22 secondBlock = Right(cbu, 14)
23
24 ' Validate both blocks
25 ValidateCBU = ValidateFirstBlock(firstBlock) And ValidateSecondBlock(secondBlock)
26End Function
27
Use Cases
Testing Financial Applications
Developers and QA engineers working on financial software need valid CBU numbers for testing. Our generator provides an unlimited supply of valid test CBUs without requiring access to real banking data, protecting privacy and security while ensuring thorough testing.
Educational Purposes
Students and professionals learning about Argentina's banking system can use this tool to understand the structure and validation of CBUs. The tool serves as a practical demonstration of the verification algorithms and helps visualize the components of a valid CBU.
Verification of Banking Information
When receiving a CBU for making transfers, you can quickly verify its structural validity before attempting a transaction. While our tool cannot confirm if a CBU corresponds to an actual bank account, it can help identify obvious errors in the format or check digits.
Development of Banking Interfaces
Designers and developers creating user interfaces for banking applications can use this tool to test input validation, formatting, and error handling for CBU fields.
Alternatives
While our CBU Generator and Validator is specifically designed for Argentine banking codes, you might also consider these alternatives depending on your needs:
- CUIT/CUIL Validator: For validating Argentine tax identification numbers instead of bank accounts
- IBAN Validator: For international bank account numbers used in Europe and other regions
- ABA/Routing Number Validators: For US banking system codes
- Full Banking API Services: For production environments requiring actual account verification
History of the CBU System
The CBU system was implemented by the Central Bank of Argentina (Banco Central de la República Argentina, or BCRA) in November 2000 as part of the modernization of the country's financial system. The introduction of the standardized 22-digit code aimed to:
- Facilitate electronic transfers between different banks
- Reduce errors in manual entry of account information
- Accelerate the processing of interbank transactions
- Improve security in the banking system
Before the CBU system, each bank in Argentina used its own format for account identification, making interbank transfers cumbersome and error-prone. The standardization brought Argentina's banking system in line with international practices, similar to the IBAN system used in Europe.
Over the years, the CBU has become an essential part of Argentina's financial infrastructure, used for:
- Salary deposits
- Bill payments
- Tax payments
- Government subsidies
- Interbank transfers
- Online shopping
The system has remained largely unchanged since its introduction, demonstrating the robustness of its design and its effectiveness in meeting the needs of Argentina's financial system.
Frequently Asked Questions
What is the difference between a CBU and a CVU?
A CBU (Clave Bancaria Uniforme) is used for traditional bank accounts, while a CVU (Clave Virtual Uniforme) is used for digital wallets and fintech platforms. Both have the same 22-digit format and validation rules, but CVUs are assigned to accounts in non-banking financial institutions.
Can I find out the bank name from a CBU?
Yes, the first three digits of a CBU identify the financial institution. The Central Bank of Argentina maintains a registry of these codes that can be consulted to determine which bank issued a particular CBU.
Is a CBU the same as an account number?
No, a CBU contains more information than just the account number. It includes the bank code, branch code, account number, and verification digits. The account number is just one component of the CBU.
How secure is it to share my CBU?
Sharing your CBU is generally safe as it can only be used to deposit money into your account, not withdraw funds. However, it's still personal financial information, so you should share it only with trusted parties.
Can a CBU expire or change?
A CBU remains valid as long as the associated bank account exists. It will only change if you close your account and open a new one, or if your bank undergoes a merger or restructuring that affects account numbering.
How do I find my own CBU?
You can find your CBU in your bank's mobile app or online banking portal, on your bank statements, or by requesting it directly from your bank. Many Argentine banks also print the CBU on the back of debit cards.
Can foreigners have a CBU in Argentina?
Yes, foreigners who open a bank account in Argentina will be assigned a CBU. The requirements for opening an account vary by bank and may include residency documentation.
What happens if I make a transfer to an invalid CBU?
Most banking systems will validate the CBU format before processing a transfer. If the format is invalid, the transfer will be rejected immediately. However, if the CBU is valid but doesn't correspond to an active account, the transfer may be initiated but will eventually be returned.
Can I have multiple CBUs?
Yes, each bank account you own will have its own unique CBU. If you have multiple accounts, even at the same bank, each will have a distinct CBU.
Is the CBU system used outside of Argentina?
No, the CBU system is specific to Argentina. Other countries have their own bank account identification systems, such as IBAN in Europe, BSB+Account Number in Australia, or Routing+Account Number in the United States.
References
-
Central Bank of Argentina (BCRA). "Financial System Regulations." Official BCRA Website
-
National Payment System Law (Law No. 25,345). "Prevention of Tax Evasion and Modernization of Payments." Argentine Official Bulletin, November 2000.
-
Argentine Banking Association (ABA). "CBU Technical Specifications." Banking Standards Documentation, 2020.
-
Interbanking S.A. "Electronic Funds Transfer Guidelines." Technical Documentation for Financial Institutions, 2019.
-
Ministry of Economy of Argentina. "Electronic Payment Systems in Argentina." Financial Inclusion Report, 2021.
Conclusion
The Argentinian CBU Generator & Validator Tool provides a simple yet powerful solution for anyone working with Argentine banking codes. Whether you're developing financial software, testing payment systems, or simply verifying a CBU you've received, our tool offers fast, accurate results with a user-friendly interface.
Try generating a random CBU or validating an existing one today, and experience the convenience of having this specialized tool at your fingertips. No registration or installation required—just a straightforward, accessible web tool designed with your needs in mind.
Feedback
Click the feedback toast to start giving feedback about this tool
Related Tools
Discover more tools that might be useful for your workflow