Skip to main content
CodeLint.Dev AI · Dev · Finance

Payment QR Decoder

Paste the text inside a payment QR code — EMVCo, Pix, PromptPay, DuitNow, a UPI link, an EPC QR code or a Swiss QR-bill — and see every field named and checked, and what is wrong with it.

Mode

Decoded in your browser. The code you paste is never sent anywhere.

An EMVCo payload (it starts 000201), a upi://pay link, an EPC QR code (it starts BCD) or a Swiss QR-bill (it starts SPC). 155 characters · 155 bytes

Result

Pix (Brazil): valid. 4 checks passed and nothing is wrong.

Read as: EMVCo merchant QR (Pix, PromptPay, DuitNow, PayNow, QRIS …) (detected).

In plain English

Pix (Brazil) payment to Padaria Aurora, SAO PAULO, Brazil. Amount: BRL 25.90. Static Pix code: the key is in the code and it can be paid any number of times. Reference: PEDIDO0042.

Scheme
Pix (Brazil)
Paid to
Padaria Aurora
Account
Pix key 7d9f0a4e-3c1b-4e2a-9f6d-5b8c2e1a0f34
Amount
BRL 25.90
Kind
Static Pix code: the key is in the code and it can be paid any number of times
Reference
PEDIDO0042
Location
SAO PAULO, Brazil

Checks 0 errors · 0 warnings · 4 passed

  • Passed:The payload splits cleanly into 13 data objects, and every declared length matches its value.
  • Passed:The CRC 7010 matches the payload.
  • Passed:All mandatory data objects are present: payload format, merchant account, category code, currency, country, merchant name, merchant city and CRC.
  • Passed:The Pix template is well formed: it carries a key, the currency is BRL, the country is BR and the transaction id is valid.

Fields 13 in all · templates open and close

  • 00 Payload Format Indicator length 2 01 Version 01
    Raw, characters 1 to 6: 000201
  • Raw, characters 7 to 68: 26580014br.gov.bcb.pix01367d9f0a4e-3c1b-4e2a-9f6d-5b8c2e1a0f34
    • 00 Globally Unique Identifier length 14 br.gov.bcb.pix Pix, Brazil
      Raw, characters 11 to 28: 0014br.gov.bcb.pix
    • 01 Pix key (chave) length 36 7d9f0a4e-3c1b-4e2a-9f6d-5b8c2e1a0f34 Random key
      Raw, characters 29 to 68: 01367d9f0a4e-3c1b-4e2a-9f6d-5b8c2e1a0f34
  • 52 Merchant Category Code length 4 0000 Not specified
    Raw, characters 69 to 76: 52040000
  • 53 Transaction Currency length 3 986 BRL, Brazilian Real
    Raw, characters 77 to 83: 5303986
  • 54 Transaction Amount length 5 25.90
    Raw, characters 84 to 92: 540525.90
  • 58 Country Code length 2 BR Brazil
    Raw, characters 93 to 98: 5802BR
  • 59 Merchant Name length 14 Padaria Aurora
    Raw, characters 99 to 116: 5914Padaria Aurora
  • 60 Merchant City length 9 SAO PAULO
    Raw, characters 117 to 129: 6009SAO PAULO
  • Raw, characters 130 to 147: 62140510PEDIDO0042
    • 05 Reference Label length 10 PEDIDO0042
      Raw, characters 134 to 147: 0510PEDIDO0042
  • 63 CRC length 4 7010 Matches the payload
    Raw, characters 148 to 155: 63047010

How an EMVCo payment QR code is built

An EMVCo merchant-presented QR code holds one line of text made of data objects. Each object is three things written one after another: a two-digit ID, a two-digit length, and a value of exactly that many characters. 5913Fulano de Tal is ID 59 (the merchant name), length 13, value Fulano de Tal. A reader walks the line from the left, taking two digits, two digits, then as many characters as the length says, until nothing is left.

Some objects are templates: their value is itself a run of objects. The same ID means different things at different levels, so ID 01 under the root is the Point of Initiation Method, while 01 inside template 62 is a bill number. The first object is always ID 00, the Payload Format Indicator, and the last is always ID 63, the CRC. Everything else may come in any order.

A scheme such as Pix or PromptPay does not change this structure. It takes one of the merchant account templates, IDs 26 to 51, writes its own identifier in sub-ID 00 of that template, and defines the other sub-IDs as it likes. That identifier is how a payment app, and this decoder, tells which scheme a code belongs to. One code may carry several such templates, so a single sticker can be paid through more than one scheme.

A length counts characters, not bytes, and is at most 99, so no value, and no template, can be longer than 99 characters.

A worked example, field by field

This is the static Pix code printed in the Banco Central do Brasil manual, with a made-up payee. The whole payload is 00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400005204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D.

CharactersIDLengthValueMeaning
000201000201Payload Format Indicator: version 01
2658…2658the next two rowsMerchant Account Information, a template
0014br.gov.bcb.pix26 › 0014br.gov.bcb.pixGlobally Unique Identifier: this template is Pix
0136123e4567-e12b-12d1-a456-42665544000026 › 0136123e4567-…The Pix key, here a random key
5204000052040000Merchant Category Code: not specified
53039865303986Transaction Currency: BRL, by its ISO 4217 number
5802BR5802BRCountry Code
5913Fulano de Tal5913Fulano de TalMerchant Name
6008BRASILIA6008BRASILIAMerchant City
6207…6207the next rowAdditional Data Field Template
0503***62 › 0503***Reference Label; *** means no transaction id is used
63041D3D63041D3DCRC over everything up to and including 6304

There is no ID 54, so no amount is set and the payer enters it. There is no ID 01 either; in Pix the presence of a key rather than a URL is what makes the code static.

The data objects under the root

From Table 3.6 of the EMVCo specification. M is mandatory, C conditional, O optional. Format N is digits only; ans is printable ASCII (the EMV common character set); S is any Unicode string.

IDNameFormatLengthPresenceRule the decoder applies
00Payload Format IndicatorN2MFirst object; value 01. DuitNow specifies 02
01Point of Initiation MethodN2O11 static or 12 dynamic; nothing else
02–51Merchant Account Informationansup to 99MAt least one. 02–25 belong to card networks (02–03 Visa, 04–05 Mastercard, 09–10 Discover, 11–12 Amex, 13–14 JCB, 15–16 UnionPay); 26–51 are templates that must carry an identifier in sub-ID 00
52Merchant Category CodeN4MFour digits (ISO 18245)
53Transaction CurrencyN3MA three-digit ISO 4217 number, such as 986, not the letters BRL
54Transaction Amountansup to 13CDigits and at most one .; not zero. Absent when the payer is to enter the amount
55Tip or Convenience IndicatorN2O01 ask for a tip, 02 fixed fee, 03 percentage fee
56Value of Convenience Fee Fixedansup to 13CPresent exactly when ID 55 is 02; not zero
57Value of Convenience Fee Percentageansup to 5CPresent exactly when ID 55 is 03; 00.01 to 99.99, no % sign
58Country Codeans2MAn ISO 3166-1 two-letter code
59Merchant Nameansup to 25MPresent; a warning beyond 25 characters or outside printable ASCII
60Merchant Cityansup to 15MPresent; a warning beyond 15 characters
61Postal Codeansup to 10OA warning beyond 10 characters
62Additional Data Field TemplateSup to 99OSub-IDs 01–08 are bill number, mobile number, store, loyalty number, reference, customer, terminal and purpose; *** in any of them asks the app to prompt the payer. 09 holds only the letters A, M, E; 11 is a three-digit merchant channel
63CRCans4MLast object; recomputed and compared
64Merchant Information — Language TemplateSup to 99OMust hold a two-letter language (00) and a merchant name (01); may hold a city (02)
65–79Reserved for EMVCoSup to 99A warning: reserved for future use in version 1.1
80–99Unreserved templatesSup to 99OEach must carry an identifier in sub-ID 00

The Thai QR standard relaxes two of these for codes paid through PromptPay: the category code and the city are optional there, and the tip and fee objects are forbidden.

Schemes, their identifiers, and what is checked

The identifier is the value of sub-ID 00 in a merchant account template (IDs 26 to 51). "Validated" means the scheme's own document was read and its rules are applied; "recognised" means the code is named and its fields are shown, and only the generic EMVCo rules are applied.

SchemeIdentifierStatusWhat the decoder checksRules from
Pix (Brazil)br.gov.bcb.pix, in any letter caseValidatedA key (sub-ID 01) or a payload URL (sub-ID 25) is present; the key looks like an email, CPF, CNPJ, +55 phone number or random key; the URL has no protocol; currency is 986 and country BR; a transaction id (62 › 05) is present and, in a static code, only letters and digits or ***Banco Central do Brasil, Manual de Padrões para Iniciação do Pix v2.10.0, and BR Code Manual v2
PromptPay credit transfer (Thailand)A000000677010111; A000000677010114 for a customer-presented codeValidatedOne of mobile number (13 digits), national or tax ID (13 digits), e-wallet ID (15 digits) or bank account is present and numeric; an OTA is present in a customer-presented code; IDs 55–57 are absentBank of Thailand, Policy Guideline: Standardized Thai QR Code, 17 April 2019
PromptPay bill payment (Thailand)A000000677010112; A000000677012006 cross-borderValidatedA 15-digit Biller ID and a Reference 1 are present; IDs 55–57 are absentBank of Thailand, as above
DuitNow QR (Malaysia)A0000006150001ValidatedPayload format 02; ID 01 present; Acquirer ID and QR ID present; postal code is five digits; a warning when the currency is not 458PayNet, DuitNow QR Merchant Presented Mode, QR Data Object v1.5
Hong Kong common QR codeCountry HKPartly validatedThe generic rules, which the HKMA document repeats, and a warning for IDs 27–31, which it reservesHKMA, Common QR Code Specification for Retail Payments in Hong Kong
FPS (Hong Kong)Begins hk.com.hkiclRecognisedFields shown, not validated. The HKMA document reserves ID 26 for FPS but does not define its contentsIdentifier from secondary sources
PayNow / SGQR (Singapore)SG.PAYNOWRecognisedFields shown, not validatedIdentifier from secondary sources; the specification is not published
QRIS (Indonesia)ID.CO.QRIS.WWWRecognisedFields shown, not validatedIdentifier from secondary sources; the specification is not freely published
QR Ph (Philippines)Begins ph.ppmi., or com.p2pqrpayRecognisedFields shown, not validatedIdentifiers from a payment provider's API documentation
VietQR (Vietnam)A000000727RecognisedFields shown, not validatedIdentifier from secondary sources
BharatQR (India)Country IN, no known identifierGeneric onlyDecoded as generic EMVCo; card-network IDs 02–05 are named. UPI codes that hold a upi://pay link are checked in full, as a linkThe BharatQR specification is not published

A code whose identifier is not in this table is still decoded in full as a generic EMVCo payload, and the identifier is shown.

How the CRC is computed

The checksum is CRC-16/CCITT-FALSE: polynomial 0x1021, initial value 0xFFFF, no bit reflection, no final XOR. It is computed over the UTF-8 bytes of the whole payload including the four characters 6304 that introduce the CRC object, and excluding only the CRC value itself. The result is written as four hexadecimal characters, upper case, with leading zeros kept. The check value for the ASCII string 123456789 is 29B1; both samples below print 1D3D, the CRC of the worked example above.

JavaScript
function crc16(text) {
  let crc = 0xFFFF;
  for (const byte of new TextEncoder().encode(text)) {
    crc ^= byte << 8;
    for (let i = 0; i < 8; i++) {
      crc = crc & 0x8000 ? ((crc << 1) ^ 0x1021) & 0xFFFF : (crc << 1) & 0xFFFF;
    }
  }
  return crc.toString(16).toUpperCase().padStart(4, '0');
}

// Everything up to and including "6304":
const body = '00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-426655440000'
  + '5204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***6304';
console.log(body + crc16(body));   // …63041D3D
Python
def crc16(data: bytes) -> str:
    crc = 0xFFFF
    for b in data:
        crc ^= b << 8
        for _ in range(8):
            crc = ((crc << 1) ^ 0x1021) & 0xFFFF if crc & 0x8000 else (crc << 1) & 0xFFFF
    return f"{crc:04X}"

body = ("00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-426655440000"
        "5204000053039865802BR5913Fulano de Tal6008BRASILIA62070503***6304")
print(body + crc16(body.encode("utf-8")))   # …63041D3D

UPI link parameters

A UPI QR code usually holds a link of the form upi://pay?name=value&amp;name=value. These are the parameters in NPCI's linking specification, version 1.6. "Static" is a link with no amount; "dynamic" is one that fixes it.

ParameterMeaningStaticDynamicWhat the decoder checks
paPayee address (VPA)MandatoryMandatoryPresent; a warning unless it has the form name@handle
pnPayee nameMandatoryMandatoryPresent
amAmount, as a decimal number. Without it the payer enters the amountOptionalMandatoryDigits with an optional . and decimals; warnings for zero and for more than two decimals
cuCurrencyOptionalOptionalINR, the only supported value
trTransaction reference: an order, bill or booking numberOptionalConditionalA warning when an amount is set and tr is missing
tnTransaction noteOptionalOptionalShown
mcPayee merchant codeOptionalOptionalShown
tidTransaction id generated by the payment service providerOptionalOptionalShown
mamMinimum amount; when absent, empty or null the amount cannot be editedOptionalConditionalA decimal number; a warning when it exceeds am
urlA link to the bill or order behind the paymentOptionalOptionalBegins with http or https
modeHow the request was initiated: 00 default, 01 QR code, 02 secure QR code, 04 intent, 05 secure intent, 06 NFC, 07 BLE, 08 UHF, 15 SEBIMandatoryMandatoryA warning for a value not in that list
orgidSix digits; 000000 for a link made by a merchantMandatoryMandatoryA warning unless it is six digits
signBase64 digital signature over the rest of the linkMandatoryMandatoryA warning unless it is the last parameter. The signature itself is not verified
mid, msid, mtidMerchant, store and terminal idsOptionalOptionalA warning beyond 20 characters

A space in a value must be written %20. The specification marks mode, orgid and sign as mandatory and tells apps to warn the payer when a request is unsigned; when all three are absent the decoder says so as information rather than as an error. Parameters that are not in version 1.6 are shown and not checked. To check the address itself, use the UPI ID validator.

The EPC QR code, line by line

The code printed on European invoices for a SEPA credit transfer (in Germany, "GiroCode") is plain text of up to twelve lines, separated by a line feed or a carriage return and line feed. Empty lines keep their place; lines after the last filled one are left off.

LineElementRule
1Service tagBCD
2Version001 or 002
3Character setOne digit: 1 UTF-8, 2 ISO 8859-1, 3 ISO 8859-2, 4 ISO 8859-4, 5 ISO 8859-5, 6 ISO 8859-7, 7 ISO 8859-10, 8 ISO 8859-15
4Identification codeSCT
5BIC of the beneficiary's bank8 or 11 characters. Mandatory in version 001, optional in 002
6Name of the beneficiaryMandatory, up to 70 characters
7IBAN of the beneficiaryMandatory, up to 34 characters; the decoder verifies the check digits
8AmountOptional. EUR followed by the number, from 0.01 to 999999999.99, such as EUR12.3
9PurposeOptional, up to 4 characters
10Remittance information, structuredOptional, up to 35 characters; an ISO 11649 reference beginning RF may be used. Not together with line 11
11Remittance information, unstructuredOptional, up to 140 characters. Not together with line 10
12Beneficiary to originator informationOptional, up to 70 characters

The whole payload may not exceed 331 bytes, and the QR code itself is to use error correction level M. The decoder checks the IBAN's check digits but not its length for the country; the IBAN validator does that.

The Swiss QR-bill

The Swiss QR code is also line-based, but every element up to the trailer must be present, as an empty line when it has no content. It has 31 lines, and up to three more for billing information and alternative procedures: a header (SPC, version 0200, coding type 1); the IBAN, which must begin CH or LI and be 21 characters; the creditor's structured address (type S, name, street, building number, postal code, town, country); seven lines for an ultimate creditor that must stay empty; the amount and the currency (CHF or EUR); the debtor's address, which is optional as a whole; the reference type and reference; an unstructured message; and the trailer EPD.

The decoder checks all of that, and the rule that ties the account to the reference: a QR-IBAN (one whose institution number, characters 5 to 9, lies between 30000 and 31999) must be used with reference type QRR and a 27-digit QR reference whose last digit is a modulo 10 recursive check digit; a regular IBAN must be used with SCOR and an ISO 11649 creditor reference, or with NON and no reference. The rules are those of version 2.3 of the SIX implementation guidelines, in which a structured address is the only address type.

What goes wrong, and how to fix it

The messages are the ones the decoder shows.

The CRC is 1A2B but the payload gives 9F3C

Cause: The text is not what the CRC was computed over. Either it changed afterwards — a character dropped in copying, a name or amount edited by hand — or the generator left the 6304 out of the calculation, hashed characters instead of UTF-8 bytes, or used another CRC-16 variant.

Fix: If you made the code, compute CRC-16/CCITT-FALSE over every byte up to and including 6304 and append it as four upper-case hex characters. If you received it, ask for it again; do not correct the CRC on a code whose content you cannot vouch for.

ID 59 at position 81 declares 25 characters but only 12 remain

Cause: A length does not match its value, so everything after it is misread. This happens when a value is edited without updating its length, when the payload is cut off, or when a generator counts bytes for a value with accented or non-Latin characters; lengths count characters.

Fix: Recompute each length from its value, and the length of every template that contains it. Then recompute the CRC.

The Transaction Currency is "BRL". It must be the three-digit ISO 4217 number

Cause: ID 53 takes the numeric code, not the letters.

Fix: Use the number: 986 for BRL, 356 for INR, 764 for THB, 458 for MYR, 702 for SGD, 360 for IDR, 840 for USD, 978 for EUR.

The Transaction Amount is "1,234.50"

Cause: The amount allows only digits and one . as the decimal mark. A thousands separator, a decimal comma, a space or a currency sign makes it invalid.

Fix: Write 1234.50. Leave ID 54 out altogether when the payer should enter the amount; do not write zero.

There is no Merchant City (ID 60). It is mandatory

Cause: EMVCo requires a merchant account, category code, currency, country, merchant name and merchant city in every code, even where the scheme takes the real name from its own directory.

Fix: Add the object. Schemes give fallback values: Pix and Hong Kong use 0000 for an unspecified category code; DuitNow says to use MY as the city when none applies. PromptPay codes may omit the category code and city.

The Pix payload URL starts with a protocol

Cause: In a dynamic Pix code the location of the charge is written without https://; the payer's app always fetches it over HTTPS.

Fix: Remove the protocol, so the value begins with the host name. The value cannot exceed 77 characters, which is what fits in the template beside the identifier.

There is no transaction id (ID 62, sub-ID 05)

Cause: A BR Code always carries the Reference Label, which Pix uses as its transaction id.

Fix: Add 62070503*** when you do not use a transaction id. In a static code a real one may contain only letters and digits, up to 25.

The link contains a literal space

Cause: A UPI link is a URL, and a space is not allowed in one. The payee name or note was inserted without encoding.

Fix: Percent-encode every value: a space becomes %20, &amp; becomes %26.

Line 5, the BIC, is empty. Version 001 makes the BIC mandatory

Cause: An EPC QR code that declares version 001 must carry the beneficiary bank's BIC.

Fix: Add the BIC, or set line 2 to 002, which makes it optional. Keep line 5 in place as an empty line either way.

The reference type is QRR but the account is a regular IBAN

Cause: In a Swiss QR-bill a QR reference may be used only with a QR-IBAN, and a QR-IBAN only with a QR reference.

Fix: Use the QR-IBAN your bank issued for this purpose, or change the reference type to SCOR with an RF creditor reference, or to NON with no reference.

Sources

Every check reported as an error rests on a statement in one of these documents. All were read on 23 November 2026.

About

The Payment QR Decoder reads the text inside a payment QR code and tells you what it says. Most national QR payment schemes — Pix in Brazil, PromptPay in Thailand, DuitNow in Malaysia, PayNow in Singapore, QRIS in Indonesia, QR Ph, VietQR, Hong Kong's FPS and India's BharatQR — are built on one format, the EMVCo merchant-presented QR code: a single line of ID / length / value objects that ends in a checksum. Paste that line and the decoder splits it into its objects, including the templates nested inside it, names each one, recomputes the CRC and shows the value it should have, checks that the mandatory objects are present and well formed, and works out which scheme the code belongs to from the identifier in its merchant account template. For Pix, PromptPay and DuitNow it also applies the scheme's own published rules. It reads three other formats as well: a UPI payment link (upi://pay?pa=…), the EPC QR code used on European invoices for a SEPA credit transfer, and the Swiss QR-bill. The result is a one-line verdict, a plain-English summary — who is paid, how much, in which currency, whether the code is reusable, and the reference — the list of checks, and every field with the exact characters it occupies. A second mode builds an EMVCo payload, a UPI link or an EPC QR code from fields, with a correct CRC, and shows it as a QR image. Everything runs in your browser; the code is never sent anywhere.

How to use

  1. 1 Scan the QR code with any scanner that shows the raw text, or copy the "copia e cola" string or payment link, and paste it into the box. The page opens on a sample so you can see a full report first.
  2. 2 Leave "Format" on automatic detection. Choose a format by hand only when the text is too damaged to recognise, to see how far it parses.
  3. 3 Read "Result" first: it names the scheme and says whether the code is valid. "In plain English" gives the payee, amount, currency, whether the code is static or dynamic, and the reference.
  4. 4 "Checks" lists each problem with its cause, errors first. A wrong CRC is shown with the value the payload should have carried.
  5. 5 "Fields" shows every data object with its ID, name, value and the raw characters it occupies. Nested templates open and close; a field with a problem is marked.
  6. 6 Switch "Mode" to "Build" to make a payload from fields. The builder computes the CRC, checks its own output with the decoder and draws the QR image.
Is the QR code I paste sent to a server?
No. The decoding runs in JavaScript in your browser and the page makes no request with your data. A payment code names a payee and usually an account, key or phone number, so that matters. It also means the decoder works offline once the page has loaded.
How do I get the text out of a QR code?
Any general-purpose QR scanner shows it: the camera app on most phones offers to copy the text, and desktop tools read a code from a screenshot. Payment apps do not show it, because they act on it instead. For Pix, the "Pix copia e cola" string a merchant gives you is the same text. Where the browser has a built-in barcode reader, this page shows a "Read image" button that reads a code from a picture without uploading it.
Which schemes does it validate, and which does it only recognise?
The generic EMVCo rules are applied to every EMVCo code. On top of that, Pix, PromptPay and DuitNow are checked against their own published specifications, and Hong Kong codes against the rules in the HKMA common QR code document. PayNow, QRIS, QR Ph, VietQR and the FPS account template are recognised by their identifiers and their fields are displayed, but nothing scheme-specific is validated, because those specifications are not published. The table of schemes below says exactly what is checked for each.
The CRC is wrong. What does that mean?
The last four characters of an EMVCo payload are a checksum of everything before them. If the decoder computes a different value, either the text changed after the code was made — a character lost in copying, a name edited by hand — or the generator computed the CRC over the wrong bytes. The usual generator mistakes are leaving the "6304" that introduces the CRC out of the calculation, and using a different CRC-16 variant. The decoder shows the value it expected so you can compare.
What is the difference between a static and a dynamic code?
A static code is printed once and paid many times; it usually has no amount, so the payer types one. A dynamic code is made for one transaction and carries the amount and a reference. In an EMVCo payload the Point of Initiation Method says which: "11" for static, "12" for dynamic. Pix is a special case: a dynamic Pix code holds a URL instead of a key, and the payer's app fetches the amount from that URL. In a UPI link the presence of the am parameter makes the difference.
Does a valid result mean the payment will go through?
No. It means the payload is well formed. The decoder cannot know whether the Pix key, UPI address, IBAN or merchant ID exists, whether the account is open, or whether a dynamic code has expired or been paid already; only the payment system knows those. An IBAN or reference with valid check digits is correctly written, not necessarily real.
Why is my UPI link reported as unsigned?
Version 1.6 of NPCI's linking specification marks the mode, orgid and sign parameters as mandatory and says an app should warn the payer when a request carries no signature. Links made by hand or by simple generators leave all three out. The decoder reports this as information, not as an error, and it cannot verify a signature that is present, because that needs the payee's public key, which only payment apps can fetch.