Pix copia e cola generator

Generate the Pix copia e cola (copy-and-paste) text to send over WhatsApp, email or your website, and see field by field what is inside it. The same code also comes out as a QR code.

Examples: 123.456.789-09, +55 11 91234-5678, nome@email.com or the 36-character random key.
Up to 25 characters, no accents (removed automatically).
Up to 15 characters, no accents.
Comma or dot, up to two decimals: 25,90
Letters and digits, up to 25. Empty = ***
Sets field 01 = 12; the payer's app may refuse to reuse the code.

Nothing is sent. Your Pix key never leaves this page.

What is Pix copia e cola?

Pix copia e cola (copy-and-paste code) is the text behind a Pix QR code. It is a string of characters in the BR Code standard (EMV QR Code Merchant Presented Mode, adapted by the Central Bank of Brazil) that the payer pastes into their app instead of scanning an image. Every Pix QR code has a corresponding Pix copia e cola and vice versa; the generator above shows both at the same time, and the "Show the code" block is already open on this page.

How to generate the text

  1. Fill in the key, name and city and, if you want, the amount, identifier and description.
  2. Click Generate. Below the QR you get the full text and a field-by-field list.
  3. Use "Copy Pix copia e cola" and send it by message. Send the whole text, from 000201 to the four CRC characters, with no line breaks.

Anatomy of the code

The code is a list of fields in ID-length-value (TLV) format. Each ID has two digits, the length has two digits and the value has exactly that many characters. Fields 26 and 62 are blocks that contain subfields in the same format.

IDFieldValue in a static code
00Payload Format Indicator01, always
01Point of Initiation Methodomitted or 11 (reusable); 12 = single use
26Merchant Account Informationsubfield 00 = br.gov.bcb.pix, 01 = key, 02 = optional description
52Merchant Category Code0000 when there is no category
53Transaction Currency986 = Brazilian real (ISO 4217)
54Transaction Amountoptional; decimal point, up to 2 places, e.g. 25.90
58Country CodeBR
59Merchant Namerecipient name, up to 25 ASCII characters
60Merchant Citycity, up to 15 ASCII characters
62Additional Data Fieldsubfield 05 = txid (up to 25 alphanumeric characters) or ***
63CRCCRC16-CCITT (polynomial 0x1021, initial 0xFFFF) of everything before it, including 6304

Worked example, field by field

The example from the Central Bank's manual, with a random key, name Fulano de Tal and city BRASILIA:

00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D

SegmentReading
000201Field 00, 2 characters, value 01
2658 0014br.gov.bcb.pix 0136123e4567-…-426655440000Field 26 with 58 characters: subfield 00 (14) = Pix GUI, subfield 01 (36) = key
52040000Merchant category 0000
5303986Currency 986 = BRL
5802BRCountry BR
5913Fulano de TalName with 13 characters
6008BRASILIACity with 8 characters
6207 0503***Field 62 with 7 characters: subfield 05 = txid ***
63041D3DCRC16 of everything before it, including 6304

Note that there is no field 54: the amount is left to the payer. If you provide an amount, the 54 segment goes between the currency and the country, as in 540525.90. With the single-use option, the segment 010212 goes right after 000201.

How the CRC is calculated

Field 63 uses CRC-16/CCITT-FALSE: polynomial 0x1021, initial value 0xFFFF, no reflection, calculated over the UTF-8 bytes of the whole text up to and including 6304, and written as four uppercase hexadecimal digits. It is an error detector, not a signature: it catches typing or pasting mistakes, but does not stop someone from generating a new code with a different key. That is why you should always check the recipient name on the app's screen. To check a code you received, use the Pix decoder; to check just the key, the key validator.

References

Central Bank of Brazil (BCB), Manual de Padrões para Iniciação do Pix, section on BR Code and static QR codes; EMVCo, EMV QR Code Specification for Payment Systems, Merchant Presented Mode.

Questions about Pix copia e cola

Are Pix copia e cola and the Pix QR code the same thing?

Yes. The QR code is just an image of the same BR Code text. Anyone who cannot scan, for example because they received the code on the same phone, pastes the text into the app's Pix copia e cola option.

How does the payer use the text?

They copy the whole string, open their banking app, choose Pix and then Pix copia e cola, paste the text and confirm. The app shows the name, key and amount before completing.

Why does the code have odd numbers at the start of each part?

That is the TLV format of the EMV standard: each field starts with two identifier digits and two length digits, followed by the content. For example, 5913Fulano de Tal means field 59 with 13 characters.

Can I edit the text by hand?

Not without recalculating the CRC. Any changed character invalidates the CRC16 at the end of the code and the app rejects it. Generate a new code here or use the decoder to check it.

Does the text contain sensitive data?

It contains the Pix key, the name and the city, which anyone can read. It contains no password, balance or account details. If the key is your CPF or phone number, remember it will be visible to whoever receives the text.

What is the maximum length?

The standard limits the whole payload to 512 characters. A typical static code has between 100 and 180 characters; the key and description block (field 26) is limited to 99.