Best Image Format for QR Codes
SVG is the best format for QR codes because QR codes are geometric, vector-native graphics that need to scale from business card size to billboard size while remaining perfectly scannable. A QR code in SVG format renders with pixel-perfect precision at any resolution, ensuring reliable scanning regardless of the output size or medium.
PNG is the best raster alternative when SVG is not supported by your output context (social media uploads, certain print workflows, email). At sufficient resolution, PNG produces equally scannable results. JPG should never be used for QR codes because its lossy compression blurs the precise module boundaries that scanners depend on.
Here is how to generate, save, and use QR codes with maximum reliability.
Why SVG for QR Codes
QR codes are composed of discrete square modules arranged in a precise grid. This is inherently vector content: each module is a defined rectangle at a defined position. SVG represents these rectangles mathematically, meaning the code can scale from 1cm to 10 meters with zero quality loss.
For print materials, SVG is essential because the output size varies dramatically. The same QR code might appear on a business card (2cm), a product label (4cm), a poster (15cm), and a banner (50cm). A single SVG file works perfectly for all sizes. A raster PNG would need to be regenerated at the correct resolution for each size.
When to Use PNG
PNG is the correct choice when the output context does not support SVG, which includes most social media platforms, many email clients, and some printing workflows that require raster files.
- Social media posts: PNG at minimum 500x500 pixels, 1000x1000 preferred.
- Email: PNG at 300x300 pixels minimum. Some email clients block SVG.
- Websites: SVG preferred, PNG as fallback for older browsers (rare issue in 2026).
- Print: SVG preferred. If PNG is required, use 300 DPI at the physical print size.
- Always set the quiet zone (white border) to at least 4 modules wide.
Why JPG Fails for QR Codes
JPG is specifically designed to compress photographic content by discarding visual information that humans are unlikely to notice. QR code scanners are not human eyes. They rely on precise, high-contrast boundaries between black and white modules.
JPG compression creates a gradient transition at every module boundary instead of a crisp edge. At small sizes or when scanned at an angle, these blurred boundaries can cause scanner misreads or complete scan failures. Never save QR codes as JPG.
QR Code Sizing Guidelines
The minimum scannable size depends on the QR code's complexity (how much data it encodes) and the scanning distance.
- Business cards: minimum 2cm x 2cm (0.8 x 0.8 inches).
- Product labels: minimum 1.5cm x 1.5cm for simple URLs.
- Posters and signage: minimum 2.5cm per meter of expected scanning distance.
- Rule of thumb: scanning distance divided by 10 equals minimum QR code side length.
- More data = more modules = larger minimum size. A URL with 50 characters needs a larger QR code than a 15-character URL.
- Error correction level affects both size and scan reliability. Level M (15%) or Q (25%) is recommended for print.
Color and Contrast Rules
While QR codes are traditionally black on white, colored QR codes work if you maintain sufficient contrast.
- Minimum contrast ratio: 4:1 between dark modules and light background.
- Dark modules on light background. Never invert (light modules on dark background) unless your scanner software supports it.
- The three finder patterns (large squares in corners) must be the highest-contrast elements.
- Avoid placing images or logos in the center unless you use high error correction (Level H, 30%).
- Test every colored or branded QR code with multiple scanner apps before printing.
Frequently Asked Questions
What format should QR codes be saved in?
SVG is the best format because QR codes are geometric graphics that scale perfectly as vectors. Use PNG when SVG is not supported by your output context. Never use JPG, as lossy compression blurs the precise module boundaries that scanners need.
What size should a QR code be for printing?
Minimum 2cm x 2cm (0.8 x 0.8 inches) for close-range scanning like business cards. For signage, the QR code side length should be at least one-tenth of the expected scanning distance. More data in the QR code requires a larger physical size.
Can I use a colored QR code?
Yes, but maintain at least a 4:1 contrast ratio between the dark modules and light background. Always keep dark modules on a light background, and test the colored code with multiple scanner apps before printing or publishing.
Why does my QR code not scan?
Common causes include insufficient contrast, too-small physical size, JPG compression blurring module boundaries, missing or too-narrow quiet zone (white border), or low error correction level combined with damage or obstruction. Regenerate as SVG or high-resolution PNG with adequate quiet zone.
Convert JPG to PNG for clean QR codes