Do inverted QR codes work?
Sometimes. An inverted QR code — light squares on a dark background — is a valid QR code, and many scanners read it. Many others only look for dark squares on a light background, so an inverted code looks like nothing to them. If yours won’t scan, the data is still all there: flip it back to dark on light and it reads again.
What an inverted QR code is
A normal QR code is dark modules — the small squares — on a light background. An inverted QR code swaps them: white on black, or any light colour on a dark one. Nothing else changes. The pattern, the error correction and the content are identical; only the polarity is reversed. The QR code standard (ISO/IEC 18004) calls this reflectance reversal and has allowed it since its 2006 edition.
Inverted codes usually aren’t anyone’s mistake. They come from:
- a dark brand design, where a black-on-white square looked out of place;
- white ink or vinyl on a dark surface — a black menu board, a tinted shop window, a dark T-shirt;
- laser engraving on dark anodised metal or slate, where every mark the laser makes comes out light;
- a generator’s colour picker, with the foreground and background set the wrong way round.
Why an inverted QR code won’t scan
A scanner finds a QR code by its three corner squares, the finder patterns. Each one is a run of dark, light, dark, light, dark in a strict 1:1:3:1:1 ratio, and the scanner looks for exactly that sequence in every frame from the camera.
On an inverted code the sequence runs light, dark, light, dark, light. A scanner that only searches for the dark-first version finds no corners — so it doesn’t report a damaged code, it reports nothing at all. To read an inverted code, the decoder has to flip the image and search again, which costs time on every camera frame. Some scanners do that; some skip it to stay fast. Support is uneven even among developer tools: html5-qrcode, a widely used library for scanning in the browser, has had an open request for inverted codes since 2020.
The quiet zone flips too. A normal code needs four modules of light margin around it; an inverted code needs four modules of dark margin. A white-on-black code cropped tight and dropped onto a white page has neither, and it can fail even on scanners that do try the flipped image.
For the other common reasons a code fails, see why a QR code won’t scan.
Do inverted QR codes work on iPhone and Android?
It depends on the scanning software, not the phone brand. The built-in camera, a dedicated scanner app and the scanner inside a banking or payments app can all behave differently on the same phone, and the answer can change with a software update.
That is the real problem with an inverted code: you can’t know which scanner your audience will use. If the code is going on something you print, test it with the phones and apps people will actually have — and test the print, not the file on your screen.
How to fix an inverted QR code
If you have the design file, swap the colours back: dark modules, light background. If the design has to stay dark, keep the code normal and put it on a light panel instead — a white tile with at least four modules of white margin around the code reads everywhere and still sits comfortably on a dark layout.
If you only have the image, flip its colours. Most photo editors have an Invert or Negative filter; the result is the same code in normal polarity, and the content doesn’t change.
If you only need the content, read the QR code from an image — light-on-dark codes included.
Or let the repair tool flip it for you. Repair a QR code reads light-on-dark codes as well as normal ones and rebuilds a clean, dark-on-light copy you can download as PNG or SVG. That includes inverted codes that are also blurry — the deblurring and clean-up passes run on the flipped image too. Every rebuilt code is decoded again and must match the original content character for character before you can download it. Nothing is uploaded — your image never leaves your device.
Should you design an inverted QR code at all?
If you control the design, the safe answer is no: a dark-on-light code works with every scanner, an inverted one with most. If the inverted look matters to you, treat it like any other risky print decision — check the file first, then test the printed piece on several phones before you print the full run. Check a QR code before you print it decodes the image in your browser and measures its quiet zone, contrast and module size.
Frequently asked questions
Do QR codes work if inverted?
Often, but not everywhere. An inverted QR code is valid under the QR standard, and many scanners read it — but scanners that only look for dark squares on a light background ignore it completely. For anything printed, dark on light is the only choice that works with every scanner.
Is a white QR code on a black background the same as an inverted QR code?
Yes. White on black is the most common inverted QR code. Any light colour on a dark one counts too — what matters to a scanner is which of the two is darker, not the colours themselves.
How do I invert a QR code?
To read one that won’t scan, flip the image’s colours with an Invert filter, or drop it into a repair tool that tries both polarities. To make one, most generators let you swap the foreground and background colours — but test the result on several phones before you print it.
Can I turn an inverted QR code back into a normal one?
Yes, without losing anything — it’s the same data in reverse polarity. Repair a QR code reads the inverted code and rebuilds a dark-on-light copy with exactly the same content.
Why does my inverted QR code scan on one phone but not another?
Because the two phones run different scanning software. One decoder tries the flipped image when it can’t find a normal code; the other doesn’t. The code is the same — the scanner is the variable.