QR Generator API
Generate professional, styled QR codes with a single GET request. Free, no API key, open CORS — the same engine behind this site.
Quick Start
One URL is all you need. Open it in a browser, an <img> tag, or curl:
GET https://qr.diqitech.com/api/qr?data=https://diqitech.comBasic Parameters
| Parameter | Values | Default | Description |
|---|---|---|---|
| datarequired | text, max 2000 chars | — | Text or URL to encode. |
| format | png · svg | png | Output image format. |
| size | 64–1024 | 320 | Image width & height in px. |
| margin | 0–10 | 2 | Quiet zone around the QR, in modules. |
| ecc | L · M · Q · H | M | Error correction level. Auto H when a logo is set. |
Styling Parameters
| Parameter | Values | Default | Description |
|---|---|---|---|
| style | square · dots · rounded · classy | square | Dot / module style. |
| corners | square · extra-rounded | square | Corner eye (finder) style. |
| dark | hex, with/without # | 000000 | Pattern color. |
| light | hex (8-digit = alpha) | ffffff | Background color. |
| cornercolor | hex | = dark | Corner eye color. |
Dot Styles
Live renders straight from the API — combine any style with the styling parameters above.
Logo Parameters (SVG only)
| Parameter | Values | Default | Description |
|---|---|---|---|
| logo | https URL, max 512 KB | — | Logo image (png/jpeg/webp/gif/svg). |
| logoshape | circle · square | circle | Canvas & masking shape. |
| logosize | 10–50 (%) | 30 / 25 | Logo width relative to the QR (default 30 circle, 25 square). |
| logopad | 0–40 (px) | 12 | Padding ring around the logo. |
| logobg | hex | ffffff | Logo canvas color. |
| logoborder | hex | = dark | Canvas border color. |
| logoborderw | 0–12 (px) | 3 | Border width (0 = none). |
The logo is fetched server-side, scaled to cover its canvas shape, and the QR modules behind it are cleared. Error correction is raised to H automatically. Keep logosize at its default when possible — oversized logos can make the QR unscannable.
Examples
Basic PNG
https://qr.diqitech.com/api/qr?data=Hello%20World&size=512Styled SVG with brand colors
https://qr.diqitech.com/api/qr?data=https://diqitech.com&format=svg
&style=classy&corners=extra-rounded
&dark=4c566a&cornercolor=2e3440&light=eceff4With embedded logo
https://qr.diqitech.com/api/qr?data=https://diqitech.com&format=svg
&style=rounded&corners=extra-rounded
&logo=https://qr.diqitech.com/logo.jpegDirect use in HTML
<img src="https://qr.diqitech.com/api/qr?data=https://diqitech.com&size=256" alt="QR" />Responses & Errors
Successful requests return the image directly. Invalid input returns JSON:
{ "error": "Parameter \"size\" harus bilangan bulat 64-1024." }| 400 | Invalid or missing parameter — the error message states which one. |
| 422 | QR could not be generated (data too long, logo unreachable, etc). |
| 405 | Method not allowed — only GET is supported. |
Good to Know
- Open CORS (Access-Control-Allow-Origin: *) — call it from any website.
- Responses are immutable and cached at the CDN edge: identical URLs are served from cache and count as a single generation.
- Output is deterministic — the same URL always produces the exact same image.
- Free to use. QR codes are generated on the fly; nothing is stored.
© 2026 diqitech. Boundless Creativity.
