Skip to content
UseQR
ESC

↑↓ MOVE↵ OPEN48 PLACES

How-to guides

How to make a transparent QR code

Turn on the transparent background toggle in the generator, or add bg=transparent to the API URL, and download PNG or SVG — both keep the alpha channel. Only the background is removed; the modules stay solid. Whatever shows through must still be at least 40% lighter than the modules or the code will not scan.

View as MarkdownPaste this page into any AI assistant — it is plain, portable Markdown.

1. Turn off the background

In any UseQR generator there is a Transparent toggle next to the background colour. Switch it on and the white rectangle disappears from the preview; the modules and corner squares stay whatever colour you set. This works for every code type — a URL code, a WiFi code, a vCard, anything.

From the keyless API the same thing is one parameter:

https://useqr.app/api/v1/qr?data=https://example.com&bg=transparent&size=1024

One asymmetry worth knowing: only the background can be transparent. Passing color=transparent for the modules falls back to solid black, because transparent modules would leave nothing for a camera to threshold against.

2. Download a format that keeps the alpha channel

Format Transparency Use it for
PNG Full alpha channel Screens, slides, most design tools
SVG Background simply is not drawn Print, and anything that might be resized
JPEG None — alpha is flattened to white or black Never for transparent codes

If a tool re-exports your code as JPEG somewhere in the pipeline, the transparency is gone and you may get a black background behind dark modules — an unscannable code. The same flattening happens when image compression runs on upload.

3. Place it, then re-check the contrast

This is the step people skip. A transparent code has no background of its own — it inherits whatever it is placed on, and the 40% luminance rule now applies to that surface:

  • Black modules on a white or pale page: fine.
  • Black modules on a dark navy hero image: dead on arrival.
  • Dark modules over a photo: the busiest failure mode — contrast varies module by module. See QR codes on a busy background.

If the placement background is dark, do not invert the modules to white — light-on-dark codes fail inconsistently. Put a light panel behind the code instead and keep dark modules.

4. Preserve the quiet zone yourself

A normal code carries its own white margin. A transparent one does not, so the quiet zone is now your layout's job: keep a clear, even area of at least 4 modules on every side, in the same tone as whatever shows through the code. Text or borders creeping into that band is the most common reason transparent codes fail in otherwise clean designs.

5. Verify the final composition

Screenshot or export the code in place — on the poster, the slide, the packaging — and run that image through the validator. It decodes the rendered result and reports the actual luminance contrast, which settles any argument about whether the placement works.

Gotchas

  • White modules become invisible the moment the code lands on a white page. Sounds obvious; happens constantly with codes styled for a dark mock-up.
  • Drop shadows and glows applied in a design tool bleed into the quiet zone and lower edge contrast. Leave the code unstyled.
  • Dark-mode surfaces: a transparent code that works on the light variant of a page can fail on the dark variant of the same page. Test both.
  • Email clients flatten and recompress images unpredictably — for signatures, prefer a solid white background. See adding a QR code to an email signature.

Generate one now with the background toggle off: make a transparent QR code, then check the placed result at /validate.

FAQ

Can a QR code have a transparent background?

Yes. The background carries no data — scanners only need the dark modules and enough light area behind them. Generate with a transparent background as PNG or SVG, then make sure whatever shows through is at least 40% lighter than the modules.

Can the modules themselves be transparent?

Not usefully. Transparent modules would take on the colour of the surface behind them, leaving nothing consistent to decode. UseQR's API deliberately falls back to black if you request transparent foreground modules.

Why does my transparent QR code not scan?

Almost always contrast: the surface showing through the code is too dark, too busy, or too close in luminance to the modules. Place it on a plain light area, keep a 4-module quiet zone, and verify the final composition.

Which format keeps transparency, PNG or SVG?

Both do. PNG carries an alpha channel; SVG simply never draws a background. JPEG supports no transparency at all and will flatten the background, so never let one into the pipeline.

Try it — free, no signup

  • How to make a QR codePick the type, enter your details, check the size against the scanning distance, and download SVG for print or PNG for screens. With UseQR the whole…
  • Transparent background QR codes — the moving floorA transparent QR code inherits whatever sits behind it as its background, so contrast must be re-checked per placement. When bg=t helps and when it bites.
  • Choosing QR code colours that scanDecoders threshold on luminance, not hue, so the rule is a luminance difference of at least 40% between modules and background, dark on light. Apply the…
  • How to make a QR code as an SVGChoose SVG at download or add format=svg to the API URL. A vector QR code scales to any size with perfectly sharp modules and weighs a few kilobytes.
  • QR code inverted and unreadableQR codes are defined dark-on-light. Inverted codes scan on some apps and fail on others, for no benefit. How to spot polarity problems and fix them fast.