Generate and validate Argentinian CBU (Clave Bancaria Uniforme) bank codes. Free tool using official BCRA algorithms for developers, testers, and financial applications.
Generate a random but valid CBU for testing your applications and integrations.
Click the button above to generate a valid 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.
Working with Argentina's banking system means dealing with the CBU (Clave Bancaria Uniforme)—a 22-digit code that uniquely identifies every bank account in the country. If you've ever needed to test a payment integration, verify banking details before a transfer, or understand why a transaction failed, you know how critical it is to work with properly formatted CBUs.
This tool helps you generate structurally valid CBUs for testing environments and validate existing codes against the official format specified by Argentina's Central Bank (BCRA). When you're building financial applications or processing payments, catching format errors early saves hours of debugging and prevents failed transactions.
The CBU (Clave Bancaria Uniforme) is Argentina's answer to international banking identifiers like IBAN or US routing numbers. Think of it as a comprehensive package that bundles the bank, branch, and account information into a single 22-digit code. The Central Bank of Argentina (BCRA) rolled out this system in November 2000 to standardize electronic transfers across the country's financial network.
Every valid CBU consists of exactly 22 digits divided into two main blocks:
First Block (8 digits): Identifies the financial institution and branch
Second Block (14 digits): Identifies the specific account
The verification digits use a weighted modulo-10 algorithm that catches common typos—like transposed digits or single-digit errors—before any money moves. This safeguard has proven remarkably effective: most CBU entry errors get caught at the validation stage rather than resulting in failed transfers.
The generator creates random but structurally valid CBUs that pass all format checks. Here's what happens behind the scenes:
When you'll find this useful:
The validator runs the same checks that Argentina's banking systems use to verify CBU integrity. What gets checked:
When validation fails, you'll see which specific check didn't pass. This is particularly helpful when debugging why a banking API rejected a CBU—often it's something simple like an extra space or transposed digit.
The BCRA uses a weighted modulo-10 checksum algorithm to calculate verification digits. If you're implementing CBU validation in your application, here's the exact logic:
For the first block (first 8 digits), the verification digit is calculated as follows:
For the second block (last 14 digits), the verification digit is calculated as follows:
Here's how to implement CBU validation in your application. These examples follow the official BCRA specification and will work with production banking data:
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}
281# 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 }
301// 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}
411// 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
141' 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
27When building fintech applications or e-commerce platforms that process Argentine payments, you need valid CBUs for your test environment. A common scenario: your staging environment requires 50 test accounts with valid CBUs for load testing. Manually calculating check digits for each would take hours. The generator handles this in seconds, giving you properly formatted test data that behaves like production CBUs without the risk of accidentally using real account numbers.
Pro tip: Keep a set of generated CBUs in your test fixtures. This ensures consistent test data across your team and makes debugging easier when tests fail.
Here's what typically happens: a client provides their CBU for a wire transfer, but they've accidentally included spaces or transposed two digits. If you process the transfer without validation, the bank rejects it—but only after a delay, and you've already recorded the transaction intent in your system. Now you're dealing with reconciliation headaches.
Validating the CBU format before submission catches these errors immediately. The validator won't tell you if the account exists or belongs to the right person (that requires banking API access), but it will confirm the structure is correct according to BCRA standards.
For developers new to Argentina's financial system, this tool provides hands-on learning. You can see exactly how the check digits work, understand why certain numbers are invalid, and experiment with edge cases before writing production code.
Common mistake: Assuming CBU validation is the same as IBAN validation. While both use check digits, the algorithms differ completely. Testing with this tool helps you understand the specific requirements of Argentine banking codes.
When designing input forms that accept CBUs, you need to test how the system handles various error states. What happens when a user pastes a CBU with spaces? What error message appears when the check digit is wrong? This tool helps you test these scenarios and design better user feedback.
Depending on your requirements, you might also need these complementary tools:
Important limitation: This tool only validates the format and check digits. It cannot confirm whether a CBU corresponds to an active bank account or verify the account holder's identity. For those checks, you'll need integration with Argentina's banking APIs or payment processors.
Before November 2000, sending money between Argentine banks was surprisingly complicated. Each financial institution used its own account numbering system—some with 10 digits, others with 15, and no standardized way to identify which bank or branch held an account. Interbank transfers required manual verification and often took days to process.
The BCRA introduced the CBU to solve this fragmentation. By mandating a single 22-digit format across all financial institutions, Argentina aligned with international standards like Europe's IBAN system. The embedded check digits were particularly clever: they catch most data entry errors automatically, reducing failed transfers and the associated costs of investigating and reversing transactions.
What's interesting: The CBU format has barely changed in over 20 years. While banking technology has evolved dramatically—mobile apps, instant transfers, digital wallets—the underlying CBU structure remains the same. This stability speaks to how well the original design anticipated future needs.
Today, Argentines use CBUs for virtually every electronic financial transaction: payroll deposits, bill payments, tax filings, government benefits, and e-commerce. The format has proven so effective that when digital wallets emerged (like Mercado Pago), regulators adopted the same structure for CVUs (Clave Virtual Uniforme) rather than inventing something new.
CBUs identify traditional bank accounts, while CVUs (Clave Virtual Uniforme) identify digital wallet accounts from fintech providers like Mercado Pago, Ualá, or Brubank. The format is identical—22 digits with the same validation algorithm—which makes sense because they're interoperable. You can transfer money from a CBU to a CVU and vice versa just like any other bank transfer. The first three digits reveal whether you're looking at a traditional bank or a digital wallet provider.
Yes. The first three digits are the bank identifier assigned by the BCRA. For example, codes starting with "011" belong to Banco NaciĂłn, while "017" indicates BBVA Argentina. The BCRA publishes an official registry of these codes, which banking applications typically reference to display the bank name automatically when you enter a CBU.
Not quite. Your account number is buried inside the CBU, but the CBU packages it with additional routing information. Think of it like the difference between a street address and GPS coordinates—both identify a location, but one includes more context. The CBU bundles your bank code, branch code, account number, and two verification digits into a single transferable string.
Your CBU is designed to be shared—that's the whole point. Recipients need it to deposit money into your account. Unlike passwords or PINs, a CBU only allows incoming transfers, not withdrawals. That said, treat it like any financial information: share it with people or companies you trust, and be cautious about posting it publicly online. Some people prefer giving out their CBU selectively rather than publishing it openly.
Your CBU stays with you as long as the account remains open. The only time it changes is if you close that account and open a new one, or in rare cases when banks merge or restructure their numbering systems. Even then, banks typically maintain the old CBU for a transition period to avoid disrupting recurring payments.
Check your bank's mobile app—it's usually in the account details section. Most Argentine banks also display it prominently in online banking, print it on monthly statements, and some even include it on the back of debit cards. If you can't locate it, any bank representative can provide it immediately; it's not considered sensitive information like a PIN.
Yes. Opening a bank account in Argentina as a foreigner gives you a CBU just like any other account holder. Requirements vary by institution—some banks only require a passport, while others ask for proof of residency or a CDI (tax identification number). Digital wallets (CVU) are often easier for foreigners to access than traditional bank accounts.
Modern banking systems perform format validation before submitting the transfer. If the check digits don't match or the length is wrong, you'll get an immediate error—the transfer never leaves your account. This is why front-end validation is so valuable; it catches typos before they cause problems.
The trickier situation is when a CBU passes format validation but doesn't match an active account. The transfer gets submitted to the interbank network, then bounces back hours or days later. You've already recorded it as "sent" in your accounting, and now you need to reconcile the return. This is why some applications also check CBUs against bank databases before allowing transfers, though that requires paid API access.
Absolutely. Each account generates its own CBU. If you have a checking account and a savings account at the same bank, you'll have two distinct CBUs. Different accounts at different banks? More CBUs. Each one uniquely identifies a specific account at a specific branch of a specific institution.
No, CBUs are Argentina-specific. Every country has its own system: Europe uses IBAN, the US uses routing numbers plus account numbers, Australia uses BSB codes, and so on. When sending money internationally, you'll typically need the recipient's SWIFT code plus their local account identifier—which in Argentina's case would be the CBU.
For authoritative information about Argentina's banking standards:
Central Bank of Argentina (BCRA) - Financial System Regulations - Official BCRA documentation on payment system standards and banking regulations
Law No. 25,345 - "Prevention of Tax Evasion and Modernization of Payments" (November 2000) - The legislation that established Argentina's electronic payment systems framework
BCRA Communication "A" Series - Technical circulars defining CBU implementation requirements for financial institutions
Interbanking S.A. - The organization that operates Argentina's interbank electronic payment network and maintains CBU routing tables
These sources provide the technical specifications used to implement this validator and are regularly updated by Argentine financial authorities.
Whether you're building a payment integration, testing a fintech application, or learning about Argentina's banking system, understanding CBU validation is essential. This tool implements the exact same checksum algorithms that Argentine banks use, so you can catch format errors before they cause transaction failures.
Remember: format validation is just the first step. A properly formatted CBU doesn't guarantee the account exists or that you have the right recipient. For production systems handling real money, combine format validation with additional verification through banking APIs or payment processors.
The tool requires no registration or installation—just open it and start validating or generating CBUs according to official BCRA standards.
Discover more tools that might be useful for your workflow