Developer tools

QR generator API

Generate QR codes as PNG, SVG, JPG or GIF — for URLs, text, Wi-Fi, email, vCards, geo and UPI payment strings.

/qrfree allowance included
api.apimitra.in /qr
am@mitra ~ %$curl "https://api.apimitra.in/qr?text=upi://pay?pa=you@upi&pn=YourName&size=400"
{
"status": "ok",

"api": "qr",

"type": "upi",

"size": 400,

"format": "png",

"qr": "data:image/png;base64,iVBORw0KGgoAA…",

"content": "upi://pay?pa=you@upi&pn=YourName&size=400"

}

PNG · SVG · JPG · GIF

output formats

UPI

payment-string support

50–2000

pixel range

wifi · vcard · geo

payload types

About the API

What this endpoint does.

Every Indian business now prints a UPI QR, and most apps need to mint QR codes on the fly — for payments, Wi-Fi logins or contact details. This endpoint generates them server-side in four formats with size, colour and background control.

The smart part is the payload types: pass a URL, Wi-Fi credentials, an email, a phone number, an SMS, a vCard or a full UPI payment string and it encodes the right format for you. Set json=1 to get the code back as a base64 data-URL instead of a file.

Who builds on this

Built for the teams shipping real products.

  1. 01

    Payments & fintech

    Mint a UPI QR for every merchant or checkout on request — PNG for print, SVG for screens.

  2. 02

    Events & ticketing

    Generate scannable ticket and check-in codes at issuance time.

  3. 03

    Retail & hospitality

    Print Wi-Fi login and menu QR codes per outlet without a design dependency.

Under the hood

What you send. What comes back.

Request

Inputs you send

  • url / textrequired

    the payload — a link or plain text. Type auto-detected.

  • sizeoptional

    pixels, 50–2000. Omitted → 200.

  • formatoptional

    png, svg, jpg or gif. Omitted → png.

  • color / bgoptional

    hex colours, e.g. 6366f1 on ffffff.

  • jsonoptional

    =1 returns a base64 data-URL instead of a file.

Response

JSON you get back

  • file

    the QR image in the requested format.

  • qr (json=1)

    base64 data-URL — safe to drop into an <img src>.

Try it

One call, real data.

Try it in the playground
/qr?text=upi://pay?pa=you@upi&pn=YourName&size=400
am@mitra ~ %$curl "https://api.apimitra.in/qr?text=upi://pay?pa=you@upi&pn=YourName&size=400"
{
"status": "ok",

"api": "qr",

"type": "upi",

"size": 400,

"format": "png",

"qr": "data:image/png;base64,iVBORw0KGgoAA…",

"content": "upi://pay?pa=you@upi&pn=YourName&size=400"

}

Base64 truncated — drop the full value straight into an <img src>.

Free tier

Ship on this API free, then pay only when your calls outgrow it.

  • A free monthly request allowance on your first key — enough to build and test.
  • The same key works across every endpoint, so you can switch APIs as you grow.
  • When the free requests end, upgrade to paid — your code and endpoints don’t change.

Every endpoint includes a free monthly request allowance — the size differs from API to API. When your free requests run out, you move to a paid plan with the same key. No card needed to start.

Start with QR generator, free.

Create an account and we’ll issue your free API key in minutes — this endpoint included.

© 2026 API Mitra. All rights reserved.

service statusMade in India