UPI QR Codes, Explained

By Udit Agarwal · Updated October 17, 2026

A UPI QR code is an ordinary QR code that stores a upi://pay link naming the UPI ID to be paid and the payee's name, such as upi://pay?pa=citybakery@bank&pn=City%20Bakery&cu=INR. When someone scans it with a UPI app, the app reads those details and opens a payment screen, and no money moves until the payer approves the payment with their UPI PIN. Because the code holds only text, anyone can make one for their own UPI ID, and anyone paying should check the name their app shows before approving.

What is inside the upi://pay link

The parameter names come from the UPI linking specification published by NPCI, the organisation that runs UPI. A code for a shop counter might hold this link, where citybakery@bank is a made-up UPI ID:

upi://pay?pa=citybakery@bank&pn=City%20Bakery&am=250.00&cu=INR&tn=Order%2042
Parameter Meaning Example
pa Payee address: the UPI ID that receives the money citybakery@bank
pn Payee name City%20Bakery
am Amount in rupees: digits and a decimal point, at most two decimals 250.00
cu Currency, which for UPI is INR INR
tn Transaction note shown to the payer Order%2042
tr Transaction reference, such as an order or bill number ORD42
mc Merchant category code, four digits 5411

Values are percent-encoded so that spaces and symbols survive. A space becomes %20, and the ampersand in "Sharma & Sons" becomes %26, which stops it being read as the start of the next parameter: pn=Sharma%20%26%20Sons. The specification defines a few more parameters, but a payee address and name, with an optional amount and note, are all a basic payment code needs.

What happens when someone scans it

  1. The payer opens a UPI app and scans the code, and the scanner decodes it back into the link text.
  2. The app recognises upi://pay, splits the link at each & and decodes the values, so %20 becomes a space again.
  3. It shows the payee and, if the code has one, the amount. Many apps look the UPI ID up first and display the name registered to it.
  4. The payer checks the name, types or confirms the amount, and approves with their UPI PIN.
  5. The money moves from the payer's bank account to the account linked to the UPI ID, and both sides get a confirmation.

Nothing in the code can take money on its own. The payer's PIN authorises each payment, and a PIN is needed only to send money, never to receive it.

Static codes and codes with an amount

A code without an am value is what shops call a static code: one printed code takes any number of payments, and the payer types the amount each time. A code with the amount filled in suits a single bill, an invoice or a fixed price, such as a ₹500 event fee. Most UPI apps show that amount prefilled, though some let the payer change it, and each amount needs its own code. An invoice made with the GST Invoice Generator can travel with a code for its exact total, as the GST invoice guide describes.

In UPI payments, a dynamic QR code usually means one generated for each sale by a billing system or payment provider, carrying the amount and a unique transaction reference so the merchant's system can match each payment automatically. A code you make yourself with an amount and a reference looks similar, but nothing reports back when it is paid. Check the credit in your own UPI app or bank account; a payment screen shown on the customer's phone is easy to fake.

Check the payee name before you pay

The name on the confirmation screen is the best safety check UPI offers. If it does not match the shop or person you mean to pay, stop. A mismatch can mean a typo in the UPI ID, a code that belongs to someone else, or a sticker pasted over the real code. Because many apps show the name registered with the bank for that UPI ID, which can differ from the pn text inside the code, trust the name the app displays.

Anyone who displays a code should put their real business or personal name in it and look at printed codes now and then for a sticker on top. Anyone paying should remember that receiving money never requires scanning a code or entering a PIN, so a stranger who sends a QR code "to pay you" is asking you to pay them. To see what a code holds before you act on it, the QR Code Reader decodes it and warns when a UPI link is a collect or mandate request rather than an ordinary payment.

Common mistakes

  • A mistyped UPI ID. One wrong character points to another account or to none, so copy the ID from the payee's app instead of retyping it, and watch for o and 0 or l and 1. The handle after the @ matters too: the same name on a different handle is a different UPI ID, possibly someone else's.
  • Spaces or a missing handle. A UPI ID has no spaces and exactly one @, followed by the bank handle.
  • Commas or symbols in the amount. In the link itself, am must be plain digits with a decimal point, so 1,250 or ₹250 is not a valid amount.
  • A comma used as a decimal point. 250,50 means 250.50 in many countries, but a form that reads commas as digit grouping turns it into ₹25,050.
  • A long note. Keep tn to an order number or a short label.
  • A merchant code on a personal ID. mc is a four-digit merchant category code from a business's bank, such as 5411 for grocery stores. Leave it out for a personal UPI ID.
  • Print problems. Low contrast, light modules on a dark background, a cramped margin or a code printed too small all cause failed scans.

Printing a UPI QR code

A UPI link is short, so the code is coarse: the 76-character example above makes a 37 × 37 module code at error-correction level M. Large modules are easy for phone cameras, which is why even a small counter card scans well.

The general rules in the QR code guide apply. Print at least 2 cm wide for close scanning, keep a blank margin (the quiet zone) of four modules, use dark modules on a light background, and allow roughly ten times the code's width as the scanning distance. Level Q or H suits a card that will be handled and scuffed. For print, export SVG or a large PNG.

Card Paper Code width Scanning distance (10× rule)
Counter card A6, 105 × 148 mm 64 mm about 0.6 m
Stand or window A5, 148 × 210 mm 92 mm about 0.9 m
Poster A4, 210 × 297 mm 130 mm about 1.3 m

On the A6 card, each module of the example code is about 1.4 mm wide.

Making a code with the UPI QR Code Generator

The UPI QR Code Generator builds the link and the code from a form. The UPI ID and payee name are required. Amount, note, transaction reference and merchant category code are optional, and empty ones are left out of the link. The UPI ID must have at least two letters, digits, dots, hyphens or underscores, one @ and a handle of letters and digits; capitals are saved as lowercase, and the tool says whether it recognises the handle. An unfamiliar handle only gets a hint, because new ones appear often, and the tool cannot check that an ID exists or who owns it.

Commas, spaces, a ₹ sign and a leading Rs or INR are ignored in the amount, which is written with exactly two decimals. A line under the field shows what will be encoded, such as 1250.00 (₹1,250.00), and that is where a comma typed as a decimal point shows up as ₹25,050.00. Zero, negative amounts, more than two decimals and anything above ₹10,00,00,000 are rejected, and amounts above ₹1,00,000 get a warning, because banks and apps often cap a single payment around that figure. The note is limited to 50 characters, the reference to 35 letters and digits, and the merchant code to four digits. The currency is always INR.

You get the link with a copy button and a QR code with a choice of colours, module shape (square, rounded, dots or diamond), quiet zone and error-correction level, M by default. It downloads as PNG from 256 to 2048 pixels or as SVG, and the page decodes the finished image to confirm it scans back to the same link. A printable Scan to pay card in A6, A5 or A4 carries the code, payee name, UPI ID, any amount and a reminder to check the payee name, with no logos; it opens the browser's print dialog, where you can also save a PDF. The tool only builds the code. It does not process payments, contact any bank or app, or track who has paid, and what you type is not uploaded.

Frequently asked questions

What does a UPI QR code contain? A upi://pay link with the payee's UPI ID (pa) and name (pn), and optionally an amount (am), the currency (cu=INR), a note (tn), a reference (tr) and a merchant code (mc). It holds nothing that lets anyone take money from you.

Can I make a UPI QR code with a fixed amount? Yes. Put the amount in am, as plain digits with up to two decimals. Most apps show it prefilled, though some let the payer change it, and you need a separate code for each amount.

Is it safe to display my UPI QR code? It shows your UPI ID and the name in the code, so anyone who sees it can pay you and read those details. It cannot be used to take money, because every payment needs the payer's own PIN.

Why does my UPI app show a different name from the one in the code? Many apps show the name registered with the bank for that UPI ID rather than the name typed into the code. A person's full name in place of a shop name can be normal, but an unrelated name is a reason to stop and check with the payee.

Does a UPI QR code expire? A code made from a UPI ID contains no expiry date. It keeps working as long as that UPI ID stays active and linked to a bank account.

Can I add a logo to a UPI QR code? Copy the link from the generator into QR Code with Logo, which accepts any text, keep error correction at Q or H, and test the result with a phone before printing.

Keep going

UPI-QR-Code-Generator

More guides

  • Base64 Encoding, Explained — Base64 explained: how it turns binary into text, the alphabet and padding, the URL-safe variant, size overhead, use cases, and why it isn't encryption.
  • ZIP Files, Explained — What a ZIP file is, how ZIP compression works, why photos and videos barely shrink, how to unzip safely on any device, and how ZIP compares with 7z and RAR.
  • URL Encoding (Percent-Encoding), Explained — How URL percent-encoding works: reserved and unreserved characters, %20 vs + for spaces, encodeURIComponent vs encodeURI, UTF-8 bytes and double-encoding bugs.
  • QR Codes: Error Correction, Size and Logos, Explained — How QR error correction works, how large a logo can be, what size to print, which colors scan reliably, and when to use PNG or SVG so your code always scans.
  • Linux File Permissions and chmod, Explained — What chmod 755, 644 and 777 mean: owner, group and others, read, write and execute, octal and symbolic modes, umask, setuid, setgid and the sticky bit.
  • DMS and Decimal Degrees, Explained — How to convert DMS to decimal degrees and back, how DD, DMS and DDM differ, how many decimal places you need, and which formats Google Maps and GPS accept.

All Encode / Decode tools · All guides