Checked against the Banco Central's own example
The Banco Central do Brasil's Manual de Padrões para Iniciação do Pix includes a worked example of a static code: random key 123e4567-e12b-12d1-a456-426655440000, receiver "Fulano de Tal", city BRASILIA. We typed those three values into our generator and it produced the manual's string character for character, checksum included:
00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D
The format is the BR Code, built from numbered fields that each state their own length:
| Piece | Meaning |
|---|---|
000201 | Format version 01 |
26… | Pix account info: br.gov.bcb.pix and the key |
52040000 | Merchant category, not used for Pix |
5303986 | Currency 986, the Brazilian real |
54… | Amount, only when you set one |
5802BR | Country: Brazil |
59… and 60… | Receiver name and city |
62070503*** | Transaction ID; *** means none |
6304… | CRC16 checksum, so a damaged code is rejected |
What changes when you add an amount
With R$ 25,90 and the city typed as "São Paulo", the same key gives:
00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-426655440000520400005303986540525.905802BR5913Fulano de Tal6009Sao Paulo62070503***63049AF0
Three things moved. Field 54 appeared with 25.90 (you can type 25,90 or 25.90). The city lost its accent and became Sao Paulo, with its case kept. And the checksum at the end changed from 1D3D to 9AF0, because it covers everything before it. The payer's app still shows the account holder's name as registered with the key.
Print it bigger than you'd think
Both strings are around 140 characters, which makes a version 7 code, 45 squares across. That's denser than a UPI code or a payment link. Our size calculator gives a minimum of 5.4 cm on a counter read from 30 cm, and 27 cm for a sign read from 1.5 m. Print the receiver's name under the code so payers can compare it with what their bank shows, and look at printed codes regularly for a sticker on top. Are QR codes safe? explains that trick.
Static is what we make
A static (estático) code holds your key, name, city and an optional fixed amount, and can be paid any number of times. It suits a counter, a feira stall, a donation box or a price tag.
A dynamic (dinâmico) code is created by a bank or payment provider for one charge, usually with its own ID and an expiry. If you sell online and need every payment matched to an order automatically, use your bank's dynamic codes, not ours. Static vs dynamic QR codes explains the difference in general.
Fields with limits
- Transaction ID (txid): optional for static codes. Letters and digits only, up to 25.
- Message (informação adicional): optional. It shares a 99-character field with your key, so a longer key leaves less room. With a random key, that's 37 characters.
- Phone keys need the country code:
+55 11 91234 5678. A number without it reads as a CPF and fails the check.
A typo in an email or phone key passes every check we can run, because the key is valid in form. That's the case the R$ 0,01 test exists for.