Skip to main content
Skip to main content

Boleto Generator

Generate valid bank slips (Boletos) purposes. Perfect for software QA.

Waiting for generation...

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:

PositionFieldLengthMeaning & RuleExample
1 to 10Field 1 (Bank + Currency + CD1)10 digitsBank code (3), currency code (9 for BRL), 5 free digits and Modulo 10 check digit00190.00009
11 to 21Field 2 (Free Block + CD2)11 digitsPositions 6 to 15 of bank free block and Modulo 10 check digit01234.567802
22 to 32Field 3 (Free Block + CD3)11 digitsPositions 16 to 25 of bank free block and Modulo 10 check digit01234.567803
33Field 4 (Barcode Check Digit)1 digitGeneral barcode Modulo 11 check digit5
34 to 47Field 5 (Due Date + Value)14 digitsDue 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:

CD = (NextTen - Sum(DigitReduction(d[i]*p[i]))) % 10
  1. 1. Multiply digits right to left alternately by 2 and 1.
  2. 2. If a product exceeds 9, sum its individual digits (e.g. 14 -> 1 + 4 = 5).
  3. 3. Compute overall sum of all results.
  4. 4. Subtract sum from the next multiple of 10.
  5. 5. If sum is a multiple of 10, check digit is 0.

Frequently Asked Questions