Banks

Brazilian banks from the Banco Central do Brasil STR participants list, looked up by COMPE code or ISPB.

  • Parity matrix

List

Returns every bank with a COMPE code from the Banco Central do Brasil STR participants list.

  • Each call returns a fresh array of fresh objects, in a fixed table order, so mutating the result never affects the data or a later call.
  • Each entry carries the COMPE code (3 digits), the ispb (8 digits) and the name.
  • The table is regenerated from the STR participants list of 25/09/2026. Names follow that list (for example, 516 is now PLACARPAY and 692 is ZYDI).
ParameterTypeRequired
returnsBank[]

Get every Brazilian bank with a compensation code (COMPE), from the Banco Central do Brasil STR participants list.

  • Each bank (Bank) has a code (COMPE, 3 digits), an ispb (8 digits) and a name.
import { getBanks } from '@brazilian-utils/brazilian-utils';

getBanks();
// [
//   { code: '001', ispb: '00000000', name: 'Banco do Brasil S.A.' },
//   { code: '003', ispb: '04902979', name: 'BANCO DA AMAZONIA S.A.' },
//   { code: '004', ispb: '07237373', name: 'Banco do Nordeste do Brasil S.A.' },
//   ... 460 more items
// ]

Source: STR participants list.

Code: brazilian-utils/javascript
Try it with JavaScript getBanks
The inputs start with the first shared case. Change one to see the new result.

Runs @brazilian-utils/brazilian-utils 2.5.0 in your browser.

Shared test cases (0) and the result in each library bank.list

This function has no shared test cases yet.

Get by code

Looks up a bank by its 3-digit COMPE code in the Banco Central do Brasil STR participants list.

  • Every character that is not a digit is removed from a string, as in 2.4.0. So "0-01", "341/" and even "0x1" resolve. The remaining digits are left-padded with zeros to 3.
  • A number is read only when it is a safe non-negative integer, as the zero-padded 3-digit code. A negative or fractional number returns null.
  • The result carries the COMPE code (3 digits), the ispb (8 characters) and the name. It is a fresh copy.
  • Returns null when no bank has that code, when nothing is left after stripping, or when more than 3 digits are left.
  • The table is regenerated from the STR participants list of 25/09/2026.
ParameterTypeRequired
codestring | numberyes
returnsBank | null

Look a Brazilian bank up by its compensation code (COMPE), from the Banco Central do Brasil STR participants list. Accepts a string or a number.

  • A string has any non-digit characters stripped before the code is padded to 3 digits.
  • Returns the matching Bank, or null when no bank has that code.
import { getBankByCode } from '@brazilian-utils/brazilian-utils';

getBankByCode('001'); // { code: '001', ispb: '00000000', name: 'Banco do Brasil S.A.' }
getBankByCode(1); // { code: '001', ispb: '00000000', name: 'Banco do Brasil S.A.' }
getBankByCode('999'); // null

Source: STR participants list.

Code: brazilian-utils/javascript
Try it with JavaScript getBankByCode
The inputs start with the first shared case. Change one to see the new result.

Runs @brazilian-utils/brazilian-utils 2.5.0 in your browser.

Shared test cases (17) and the result in each library bank.getByCode

Get by ispb

Looks up a bank by its 8-character ISPB (Identificador do Sistema de Pagamentos Brasileiro).

  • Resolução BCB 585/2026 (art. 2º III) made the ISPB 8 alphanumeric characters. Letters are kept and read without regard to case.
  • Every character that is neither a letter nor a digit is removed, so the CNPJ-root mask works: "00.000.000" finds Banco do Brasil.
  • A shorter value is left-padded with zeros (0 is 00000000). An empty value, or one with more than 8 characters left, returns null.
  • 2.4.0 removed letters too, so "0000000A" was read as 00000000 (Banco do Brasil). Now it returns null.
  • A number is read only when it is a safe non-negative integer. A negative or fractional number returns null.
  • The dataset only has institutions that also have a COMPE code. Any other ISPB returns null. The result is a fresh copy.
ParameterTypeRequired
valuestring | numberyes
returnsBank | null

Look a Brazilian bank up by its ISPB (Identificador do Sistema de Pagamentos Brasileiro), the 8 character code of every SPB participant. Accepts a string or a number, with or without leading zeros.

  • Since Resolução BCB nº 585/2026 an ISPB may hold letters, so a string of 8 letters and digits is looked up as it is, in upper or lower case. Any character that is neither a letter nor a digit is ignored ('00.000.000' is '00000000'), and a letter is never stripped ('0000000A' is not '00000000').

  • Returns the matching Bank, or null when no bank has that ISPB. The base only carries institutions that also have a COMPE code.

import { getBankByIspb } from '@brazilian-utils/brazilian-utils';

getBankByIspb('00000000'); // { code: '001', ispb: '00000000', name: 'Banco do Brasil S.A.' }
getBankByIspb('60701190'); // { code: '341', ispb: '60701190', name: 'ITAÚ UNIBANCO S.A.' }
getBankByIspb('99999999'); // null

Source: STR participants list, BrasilAPI.

Code: brazilian-utils/javascript
Try it with JavaScript getBankByIspb
The inputs start with the first shared case. Change one to see the new result.

Runs @brazilian-utils/brazilian-utils 2.5.0 in your browser.

Shared test cases (23) and the result in each library bank.getByIspb

Official sources

See also Bank account, Boleto

Last updated on

On this page