Test data for Brazilian software
EN
Fictitious data for software testing. Using fake documents for fraud is a crime in Brazil (Penal Code, arts. 297–299, 307).

Brazilian bank account generator and validator

Brazilian bank accounts are identified by a 3-digit bank code, a branch (agência) and an account number, often each with its own check digit. Generate fictitious combinations for Banco do Brasil, Itaú, Bradesco, Santander and Caixa to test payout forms, onboarding flows and payment sandboxes.

—

Up to 1000 items at once. Everything is generated in your browser.

How to use

  1. On the generator tab, pick a Bank (or leave it on Any to rotate among the five) and toggle With mask (punctuation) to include the hyphen before each check digit.
  2. Click Generate. You get the bank code, bank name, branch and account. Click Copy to put a value on your clipboard.
  3. For a test dataset, set the Quantity (1–1000) and use Export CSV, Export JSON or Export SQL; columns are code, bank, branch and account.
  4. On the Validate tab, paste one account per line as <bank> <branch> <account>, e.g. 001 1584-9 00014715-X, itau 2545 02366-1 or 104 0001 001.00000001-2. The bank can be its code or a name (bb, itau, bradesco, santander, caixa).
  5. Each line is marked valid or shows the reason: unsupported bank, wrong branch or account length, unknown Caixa operation code, wrong branch digit or wrong account digit.

How it works

There is no public standard for account check digits

Bank codes are public: Banco Central do Brasil (the central bank) publishes the list of STR participants with each institution’s 3-digit clearing code (001, 033, 104, 237, 341…). The check digit of the branch and of the account, however, is defined by each bank and only documented in its integration manuals (CNAB file layouts, collection and payout specs). Neither FEBRABAN (the Brazilian banking federation) nor the central bank publishes a common standard. The rules below are the ones reproduced by maintained open-source validators such as ton-bank-account-validator, which we used to cross-check our examples. A pass only means the numbers are consistent, never that the account exists.

BankBranch digitAccount (no DV)Account methodSymbol for 10
001 Banco do Brasilyes, mod 11, weights 5-4-3-28 digitsmod 11, weights 9 down to 2X
341 Itaúno5 digitsmod 10 over branch + account, weights 2-1 from the left—
237 Bradescoyes, mod 11, weights 5-4-3-27 digitsmod 11, weights 2-7-6-5-4-3-2P (or 0)
033 Santanderno8 digitsmod 10 over branch + 00 + account, weights 9-7-3-1-0-0-9-7-1-3-1-9-7-3—
104 Caixano11 digits (3-digit operation + 8)(Σ branch+account × weights 8-7-6-5-4-3-2-9-8-7-6-5-4-3-2) × 10 mod 11, mod 10—

For the mod 11 banks (BB and Bradesco) the digit is 11 − (sum mod 11); 11 becomes 0 and 10 becomes the symbol in the table. For Caixa the accepted operation codes are 001 (personal checking), 013 (personal savings), 003 (business checking) and 022 (business savings).

Worked example: Banco do Brasil 1584-9 / 00014715-X

Branch 1584: 1×5 + 5×4 + 8×3 + 4×2 = 5 + 20 + 24 + 8 = 57. 57 mod 11 = 2; 11 − 2 = 9.

Account 00014715: 0×9 + 0×8 + 0×7 + 1×6 + 4×5 + 7×4 + 1×3 + 5×2 = 6 + 20 + 28 + 3 + 10 = 67. 67 mod 11 = 1; 11 − 1 = 10, which BB writes as X.

Worked example: Itaú 2545 / 02366-1

Join branch and account: 2 5 4 5 0 2 3 6 6. Apply weights 2, 1, 2, 1… from the left: 4, 5, 8, 5, 0, 2, 6, 6, 12. Two-digit products are reduced by adding their digits (12 → 1 + 2 = 3). Total: 4 + 5 + 8 + 5 + 0 + 2 + 6 + 6 + 3 = 39. 39 mod 10 = 9; 10 − 9 = 1.

FAQ

Does a valid result mean the account is real?

Not necessarily, and generated accounts are fictitious by design. The tool only checks lengths and check digits. Never send a deposit, wire (TED) or Pix transfer to these numbers: if a combination happened to exist, the money would go to a stranger. To confirm ownership, use the bank’s or your payment provider’s own verification services.

Why only five banks?

These are the banks whose check-digit rules are well documented in integration manuals and consistently reproduced by open-source validators. Many digital banks use no published formula or change formats without notice, so we do not offer rules we cannot cross-check.

What do Banco do Brasil’s X and Bradesco’s P mean?

When the mod 11 calculation yields 10, it does not fit in one digit. Banco do Brasil writes that case as X and Bradesco as P. Some Bradesco systems store 0 instead of P, so the validator accepts both forms for Bradesco.

How do I enter a Caixa account?

Use the 4-digit branch and put the operation code in front of the account: 3 operation digits plus the 8-digit number, then the check digit, as in 104 0001 001.00000001-2. The validator reports the operation type (001, 013, 003 or 022) and rejects unknown codes.

Should I store accounts without the mask?

Yes, that is usually best: keep bank code, branch, account and check digit in separate text columns so leading zeros and the X or P survive. Use the mask only for display. Turn off With mask (punctuation) to generate values without hyphens.

Sources

Related tools

Updated 2026-11-13 · Rafael Lima