How to Customize a QR Code Without Breaking It
You can customize a QR code's colours, dot shape and centre logo and still have it scan, as long as you keep three things: dark modules on a lighter background, a clear margin around the code, and a logo small enough for the code's error correction to cover. We tested it: a code built at the highest error-correction level still scanned with a solid logo over 18% of its area and failed at 19%. At the lowest level it failed at 5%. The rest is taste. Change the look freely, then test the final file on more than one phone before you print.
Key takeaways
- Error correction comes in four levels, L, M, Q and H, which repair roughly 7%, 15%, 25% and 30% of damaged data (see Sources).
- Those percentages are not the share of the picture you can cover. The largest centre logo that still scanned in our test was 4%, 8%, 13% and 18% of the code area.
- Higher error correction makes the code denser, so each dot gets smaller at the same print size.
- Keep a quiet margin around the code. With no margin on a busy background, our test code could not be read at all.
- Dark on light is the safe choice. Light-on-dark codes only work when the scanner looks for them.
What you can safely change
A QR code is a grid of small squares, called modules, plus three large square markers in the corners that tell a scanner where the code is and which way up it sits. A scanner does not care what the modules look like as long as it can tell dark from light and find those corner markers. That gives you more freedom than most people expect:
- Colour. The modules can be any colour that reads as clearly darker than the background.
- Background. White, a pale brand colour, or transparent so the code sits straight on a flyer or a photo.
- Dot and corner shape. Square for a classic look, rounded for a softer one.
- A logo in the middle. Possible because of error correction, with limits explained below.
What you should not change is the structure: the corner markers must stay intact, the grid must stay square, and the code needs space around it.
How error correction makes a logo possible
Every QR code carries two things: the data itself and extra recovery data that lets a scanner rebuild missing pieces. When you choose a level, you choose how much recovery data to add:
| Level | Data that can be restored | Version for our test link | Modules across |
|---|---|---|---|
| L (low) | about 7% | 3 | 29 |
| M (medium) | about 15% | 3 | 29 |
| Q (quartile) | about 25% | 4 | 33 |
| H (high) | about 30% | 5 | 37 |
A logo works because a scanner treats the covered modules as damage and repairs them. As the Wikipedia article on QR codes puts it, with an artistic code "the embellishments are treated as errors, but the codes still scan correctly."
The cost is size. The recovery data has to live somewhere, so a higher level needs a bigger grid for the same link. Our test link, the address of the ScanMint AI Create QR page, fitted a 29 × 29 grid at level L or M. At level H it needed 37 × 37.
Our test: how big can the logo be?
We wanted a usable number, not just "keep the logo small". So we generated the same link at each level and pasted a solid square in the centre, growing it one percentage point of the code's area at a time until an open-source QR reader could no longer decode it. These are our own results from clean digital images, not photos taken with a phone camera:
| Level | Restores about | Largest logo that scanned | First size that failed |
|---|---|---|---|
| L | 7% | 4% of the code area | 5% |
| M | 15% | 8% | 9% |
| Q | 25% | 13% | 14% |
| H | 30% | 18% | 19% |
Each time, the logo that broke the code was well under the headline percentage. The headline figure counts damaged data, and a solid square in the middle damages the data unevenly, so you run out of repair capacity sooner than the area suggests. Treat the numbers above as an upper limit from a clean test. A camera in dim light, a slightly curved can or a glossy finish all add their own errors, and those use up the same repair budget your logo is already spending.
A practical rule that follows from this: if you want a logo, use level H, keep the logo to about a tenth of the code's area, and leave a little white space around the logo so it does not blur into the modules next to it.
Colours: contrast first, brand second
Scanners sort modules into dark and light, and anything that blurs the difference makes that harder. The safest combination is the classic one: dark modules on a light background.
We measured the contrast of a few colour pairs with the same formula the web accessibility guidelines use, and then decoded each code from a clean image:
| Modules on white | Contrast ratio | Decoded from a clean image? |
|---|---|---|
| Black | 21.0 : 1 | Yes |
| Navy (#0B1D3A) | 16.8 : 1 | Yes |
| Mint (#2ED4B7) | 1.9 : 1 | Yes |
| Light grey | 1.7 : 1 | Yes |
| Yellow | 1.4 : 1 | Yes |
Every pair decoded, and that is the trap. A clean image on a screen hides problems that appear once the code is printed and photographed under a shop light. Our test cannot tell you how a pale code behaves in the real world. That is exactly why it gives you no reason to trust one. Pick the pale shade for decoration around the code and use a dark one for the modules. For ScanMint AI's own colours, that means navy modules with a mint frame, not mint modules.
Light on dark (inverted) codes
White modules on a black background look striking on dark packaging. Whether they scan depends on the reader. The open-source reader we used found our inverted code only when its "try inverted" option was switched on, and missed it with that option off. Other readers may behave either way, and you cannot know which one your audience will use. If a code has to work for everyone, keep it dark on light. If the design must be dark, put the code on a light panel.
The quiet zone: the margin people crop off
The quiet zone is the empty border around a QR code. The documentation of the open-source Python qrcode library describes its default border of 4 modules as "the minimum according to the specs". It is tempting to trim it to make the code fit, or to place the code right against a busy photo.
To see what that does, we pasted a level M code onto a random black-and-white pattern with different margins. With no margin at all, the reader could not find the code. With 1, 2 or 4 modules of white space, it read the code every time. In print, aim for the full 4-module margin. A clean digital image forgave a narrow border in our test, but a crumpled flyer will not be so kind.
Size: why more correction needs a bigger print
Because higher error correction means more modules, each module gets smaller at the same printed size. Here is our calculation for a code printed 25 mm wide, including the 4-module margin on each side:
- Level L or M: 37 modules across, about 0.68 mm each.
- Level Q: 41 modules across, about 0.61 mm each.
- Level H: 45 modules across, about 0.56 mm each.
Smaller modules are harder to read from a distance or on a cheap printer. When you add a logo and switch to level H, consider printing the code a little larger to win that detail back. Shortening the content helps too: a shorter link needs fewer modules at every level.
How to customize a QR code on your phone
With ScanMint AI's Create QR tool, the whole process happens on your phone:
- Choose what the code holds. A web address, plain text, a Wi-Fi network, an SMS, a WhatsApp message or a contact card.
- Set the colours. Pick the code colour and the background, including a transparent background for codes that sit on a coloured design.
- Shape the dots and corners. Square or rounded.
- Add your logo. Drop your own mark into the centre. On Premium the logo stays; on the free plan, one short ad covers one export.
- Save and share. Export the image to print or send.
Free codes carry a small ScanMint AI mark built into the pattern, and Premium codes are unmarked. For the basics of making a first code, see our guide on how to create a QR code.
A five-minute test before you print
- Open the final exported file, not an earlier draft, on a screen.
- Scan it with at least two different phones, ideally one iPhone and one Android phone, using their built-in camera apps and a scanner app such as Scan QR.
- Print one copy at the real size on the real paper, then scan it from the distance people will stand at.
- Try it in poor light and at an angle.
- Check that the link opens the right page, not just that the code scans.
If any scan is slow or fails, change one thing at a time: shrink the logo, darken the modules, widen the margin or print larger.
Frequently asked questions
Can I change the colour of a QR code?
Yes. Keep the modules clearly darker than the background, and avoid light-on-dark unless you control which scanner reads it.
How big can a logo in a QR code be?
At level H, the largest solid centre logo that still decoded in our test covered 18% of the code area. For real-world printing, staying near 10% leaves room for blur, glare and creases.
Which error correction level should I use?
Level M is a sensible default for a plain code. Use level H when you add a logo or expect wear, and print the code a little larger to make up for the smaller modules.
Do rounded dots make a QR code harder to scan?
Not by themselves, as long as the corner markers stay recognizable, and the dots do not merge. Test the final file to be sure.
Why does my custom QR code not scan?
The usual causes are a logo that is too big, low contrast, a cropped margin, a code printed too small or light-on-dark colours.
Summary
Customizing a QR code is safe when you respect how scanners read it. Keep dark modules on a light background, leave a 4-module margin, use level H for a logo and keep the logo well below the limit. In our test that limit was 18% of the area at level H and just 4% at level L. Then test the printed result on more than one phone. To design one now, download ScanMint AI and open Create QR.
Sources and method
- Error-correction levels L and M (7% and 15% of data bytes restorable), the version sizes and the quote on artistic codes: Wikipedia, "QR code", read 20 November 2026.
- Levels Q and H (about 25% and 30%) and the 4-module border as the minimum: documentation of the Python qrcode library, version 8.2.
- Logo, inverted-colour, quiet-zone, contrast and module-size figures are our own calculation, 20 November 2026: codes generated with qrcode 8.2 and decoded with the open-source zxing-cpp 3.1.1 reader from clean digital images. Contrast ratios use the WCAG relative-luminance formula. The script and its output are stored with this article's draft record.
- ScanMint AI features are taken from the app's published Create QR feature page on scanmintai.com.
Tools covered in this guide
Open any of these in ScanMint AI to follow along.
Related guides
- Mobile Barcodes: How to Make Them ScanWhy a barcode on your phone scans at one counter and not the next, and six fixes for brightness, size, margins, colours and glare, from our own decoder test.
- How to Decode a Barcode: Read the Bars by HandA barcode is 95 narrow units of bars and spaces. Here is how to turn them into 13 digits by hand, find the hidden first digit and check your answer.
- Why Won't My Barcode Scan? 9 Phone FixesA barcode that won't scan usually needs one clean, complete line across its bars. Nine phone fixes for glare, distance, curves and clutter, from our own decoding test, and what to do when nothing works.
Try ScanMint AI free
Turn your phone into a pocket scanner and PDF toolkit — 18 tools, privacy-first.
