Boleto Generator
Generate valid bank slips (Boletos) purposes. Perfect for software QA.
About the Boleto Generator
A boleto (bank slip) is a standardized payment document used in Brazil that enables debt payment through banks, lottery outlets, and other authorized establishments. Each boleto contains essential information including the issuing bank, agency, cedent account number (issuer), amount, due date, payment instructions, and a unique barcode for automatic payment identification.
The Box4Dev Boleto Generator creates structurally valid boletos for testing and development purposes. Using the @box4dev/gerador-boleto library, this tool generates boleto numbers that follow the FEBRABAN standard (Brazilian Federation of Banks), complete with barcodes, typeable lines, and check digits calculated correctly according to each financial institution's official technical specifications.
This tool is designed exclusively for software development, system testing, prototyping, and form validation in sandbox environments. Use it to simulate payment flows, test input masks, validate payment gateway integrations, and ensure your system correctly handles boleto data - all without using real data or compromising security.
Legal Responsibility and Cautions: Boletos generated by this tool are fictitious and have no legal validity. Their issuance, distribution, or use for purposes other than testing and development is illegal and constitutes fraud. Using falsified boletos to attempt to receive payments, deceive third parties, or for any other dishonest purpose violates Brazilian law (Cybercrime Law) and can result in criminal prosecution, heavy fines, and imprisonment. You are responsible for how you use this tool. Use it only for legitimate development purposes.
Anatomy of Brazilian Bank Slip Typeful Line
The bank slip readable line comprises 47 decimal digits organized into 5 fields:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 10 | Field 1 (Bank + Currency + CD1) | 10 digits | Bank code (3), currency code (9 for BRL), 5 free digits and Modulo 10 check digit | 00190.00009 |
| 11 to 21 | Field 2 (Free Block + CD2) | 11 digits | Positions 6 to 15 of bank free block and Modulo 10 check digit | 01234.567802 |
| 22 to 32 | Field 3 (Free Block + CD3) | 11 digits | Positions 16 to 25 of bank free block and Modulo 10 check digit | 01234.567803 |
| 33 | Field 4 (Barcode Check Digit) | 1 digit | General barcode Modulo 11 check digit | 5 |
| 34 to 47 | Field 5 (Due Date + Value) | 14 digits | Due factor (4 digits) and face value in cents (10 digits) | 91230000015000 |
Bank Slip Algorithm (FEBRABAN Modulo 10)
Fields 1, 2 and 3 are validated by Modulo 10 with alternating weights 2 and 1:
- 1. Multiply digits right to left alternately by 2 and 1.
- 2. If a product exceeds 9, sum its individual digits (e.g. 14 -> 1 + 4 = 5).
- 3. Compute overall sum of all results.
- 4. Subtract sum from the next multiple of 10.
- 5. If sum is a multiple of 10, check digit is 0.