Skip to content
UseQR
ESC

↑↓ MOVE↵ OPEN48 PLACES

Spec & internals

Vector vs raster QR codes

A vector QR code (SVG or PDF) scales to any size with perfectly sharp edges; a raster (PNG) must be generated at 300 DPI or more at the final printed size — a 3 cm code needs at least 354 pixels across. When in doubt, hand the print shop the SVG.

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

The difference in one sentence

A raster file stores pixels — a fixed grid of colour samples that can only be stretched; a vector file stores geometry — "a filled square from here to here" — that is redrawn from scratch at whatever resolution the output device offers. A QR code is pure geometry (a matrix of squares), which makes it the ideal vector subject: the SVG representation is small, exact and resolution-independent.

The practical asymmetry: a vector QR code is always sharp, at business-card size and on a building wrap, from the same file. A raster QR code is sharp at exactly one size and degrades above it.

The raster arithmetic

Print quality convention: 300 DPI minimum at the final physical size (600 for fine work — the trade-offs are on QR code DPI for printing). The conversion:

pixels needed = size in cm ÷ 2.54 × DPI

Worked example — a 3 cm code on a flyer:

3 ÷ 2.54 × 300 ≈ 354 px minimum

More reference points at 300 DPI:

Printed size Minimum pixels
2 cm 236 px
3 cm 354 px
5 cm 591 px
10 cm 1,181 px
20 cm (poster) 2,362 px

Two habits follow. First, generate raster for the destination, not from whatever file is lying around — a 512 px PNG is generous for a 3 cm flyer code and hopeless for a 20 cm poster. Second, never upscale: enlarging a small PNG interpolates new grey pixels along module edges, which is why enlarged codes look pixelated or soft and scan worse than their size suggests. Downscaling is comparatively harmless as long as modules keep enough pixels.

When each wins

Vector (SVG, vector PDF):

  • anything a print shop touches — see why you should print QR codes from SVG;
  • artwork that will be reused at multiple sizes;
  • cutters, engravers and plotters, which consume paths, not pixels;
  • design hand-off, where someone else chooses the final size after you.

Raster (PNG):

  • fixed-size screen use: web pages, email signatures, slides, chat;
  • systems that cannot place SVG (some office tools, some label printers);
  • final-step exports where you control the size and the DPI.

The honest caveat in the vector column: a vector file is only as good as the pipeline that rasterises it. Print RIPs and cutting software occasionally mangle advanced SVG features — which is why UseQR offers a stripped SVG Tiny profile for print hand-off — and a vector code with too-small modules still fails for the camera no matter how sharp the ink. Vector solves resolution; it does not solve size, contrast or the quiet zone.

Size the physical code with the size calculator, and prove the final artwork with /validate before committing to a run.

FAQ

Is SVG or PNG better for a QR code?

SVG whenever the code might be resized or printed — it stays perfectly sharp at any size. PNG is fine for fixed-size screen use, generated at or above the display size. JPEG is wrong in all cases.

How many pixels does a printed QR code need?

Final size in centimetres, divided by 2.54, times 300. A 3 cm code needs at least 354 pixels across; a 10 cm code needs about 1,181. Doubling to 600 DPI is worthwhile for small codes on quality stock.

Can I enlarge a QR code PNG for a poster?

Not meaningfully. Upscaling invents blurred pixels along module edges rather than adding detail, and large prints magnify the damage. Regenerate the code as SVG, or as a fresh PNG at the poster's full size and 300 DPI.

Do print shops accept SVG files?

Usually, though many prefer PDF. Exporting the SVG to PDF preserves the vector geometry, so either hand-off is equivalent. Confirm the code was not rasterised along the way by zooming into the proof — vector edges stay razor sharp at any zoom.

Try it — free, no signup

  • QR code anatomy — every region of the symbolA labelled tour of a QR code: finder patterns, separators, timing, alignment, format and version information, the data region and the quiet zone.
  • QR code file formats comparedPNG, SVG, JPEG, WebP, PDF and EPS for QR codes — lossless vs lossy, scaling behaviour, print hand-off, and why JPEG is never the right choice.
  • QR code SVG path structureHow a module matrix becomes SVG — one merged path versus thousands of rects, crisp-edges rendering, integer coordinates, and why seams appear.
  • Why you should print QR codes from SVGVector QR codes rasterise at the press's native resolution with exact module edges. The PNG-resample chain is how codes that looked sharp on screen die in print.
  • What DPI should a QR code be printed at?Print QR codes from vector artwork — SVG or PDF — and DPI becomes irrelevant, because the RIP renders exact edges at the device's native resolution. If…