Embed a QR code with one URL
Pass your link, get back a QR image — PNG or SVG. No API key, no signup, CORS-enabled and CDN-cached. Drop it into any app, email or webpage.
Quick start
<img src="https://www.pdfforjoy.com/api/qr?data=https://example.com&size=300"> No API key
CORS-enabled
Nothing stored
PNG & SVG
Build your embed code
Tweak the options and copy the snippet — the preview updates live.
Image URL
https://www.pdfforjoy.com/api/qr?data=https%3A%2F%2Fwww.pdfforjoy.com&size=300&dark=0f172aHTML
<img src="https://www.pdfforjoy.com/api/qr?data=https%3A%2F%2Fwww.pdfforjoy.com&size=300&dark=0f172a" alt="QR code" width="300" height="300">Markdown
Parameters
| Param | Values | Default | Description |
|---|---|---|---|
| data | string | — (required) | The link or text to encode. Also accepts text or url. URL-encode it. |
| format | svg | png | svg | Output image format. SVG is crisp at any size and tiny. |
| size | 64–2000 | 300 | Width & height of the QR in pixels. |
| margin | 0–20 | 2 | Quiet-zone border, in modules. |
| ecc | L | M | Q | H | M | Error-correction level. Higher survives more damage but is denser. |
| dark | hex | 000000 | Foreground colour (also accepts color). e.g. 6d5dfb. |
| light | hex | transparent | ffffff | Background colour (also accepts bg). Use transparent for none. |
Examples
HTML
<img src="https://www.pdfforjoy.com/api/qr?data=https://example.com&size=300&dark=6d5dfb" alt="QR code">React / JSX
<img
src={`https://www.pdfforjoy.com/api/qr?data=${encodeURIComponent(url)}&size=300&format=svg`}
alt="QR code"
/>Markdown
cURL (save a PNG)
curl "https://www.pdfforjoy.com/api/qr?data=https://example.com&format=png&size=600" -o qr.pngFetch the SVG string
const svg = await fetch(
`https://www.pdfforjoy.com/api/qr?data=${encodeURIComponent(url)}`
).then(r => r.text());Good to know
- • Free & keyless for reasonable use. Responses are cached on our CDN, so repeated identical URLs don't hit the server. Please cache/host the image on your side for very high volume.
- • Solid colours only. The API generates clean solid-colour QR codes. For gradients, a centre logo and decorative frames, use the visual QR Code Generator and download the image.
- • Always URL-encode the data value, especially links with ?, & or spaces.
- • Static & private. The code encodes your link directly — it never expires and we don't track scans or store anything.
Need a branded QR with a logo?
Design a styled QR with gradients, your logo and a frame in the visual generator — then download PNG or SVG.
Open the QR Code Generator