PNG or SVG for a QR code?

The difference between a bitmap and a vector file, what 1024 pixels really buys you on paper, and which of the two to reach for in each place a code ends up.

Short answerUse the SVG for anything printed or edited in a design tool, because it scales to any size with perfectly sharp module edges. Use the PNG for documents, slides, email, social posts, and web pages, placed at its natural size or smaller. Never enlarge a small PNG, and never convert a QR code to JPG.

Bitmap versus vector

A PNG is a bitmap: a fixed grid of pixels, each with a colour. A QR code stored this way looks perfect at its natural size, but every module is a block of pixels, and the file has no idea that those blocks are meant to be squares with hard edges.

An SVG is a vector file: a description of shapes. A QR code stored as SVG is literally a list of squares with coordinates. Whatever renders it — a printer’s RIP, a browser, a design tool — draws those squares fresh at the size you ask for, so the edges stay hard at 2 cm and at 2 m alike.

That distinction matters more for QR codes than for most graphics. A scanner finds modules by looking for the sharp transition between dark and light. Anything that softens that transition — resampling, compression, blur — eats directly into how reliably the code reads.

The generator on this site gives you both: a 1024 × 1024 px PNG (qr-code.png) and a vector SVG (qr-code.svg). Both include the four-module quiet zone and any colours or logo you chose, so neither needs a margin added — and neither should be cropped.

Which file to use where

Choosing a QR code format by use
UseFormatWhy
Commercial print: flyers, posters, packagingSVGSharp at any size; printers prefer vector artwork.
Large format: banners, signage, vehicle graphicsSVGA bitmap would have to be enlarged far past its pixels.
Illustrator, InDesign, Affinity, FigmaSVGImports as editable shapes you can scale and position freely.
CanvaSVG or PNGCanva accepts SVG uploads; the PNG also works at modest sizes.
Word, Google Docs, PagesPNGUniversally supported and prints well at document sizes.
PowerPoint, Google Slides, KeynotePNGWorks everywhere; recent PowerPoint and Keynote also take SVG.
Email newsletters and signaturesPNGMany email clients do not display SVG at all.
Social media postsPNGPlatforms accept PNG; most reject SVG uploads.
Web pagesPNG or SVGBoth work in browsers; SVG stays crisp on high-density screens.
Office or home printerPNGFine up to its natural print size; SVG if you need larger.

If you are unsure, keep both files. They encode exactly the same link, so there is no risk in using one for the poster and the other for the newsletter. Detailed placement advice lives in the guides for flyers and posters and presentations.

What 1024 × 1024 pixels means on paper

Print resolution is measured in dots per inch. Dividing the pixel width by the DPI gives the largest size at which the image prints at that resolution.

Maximum print width of a 1024 px PNG
ResolutionTypical useMaximum width
300 DPIMaterial read close up: cards, flyers, labelsabout 8.7 cm
150 DPIPosters and signage read from a distanceabout 17 cm
72–96 DPIScreens, slides, webNot a print constraint

Below those widths the PNG is a safe choice. Above them you are asking software to invent pixels, and it will smooth the edges as it does. QR codes are more tolerant of this than photographs, because the modules are large blocks, but there is no reason to take the risk when the SVG exists. How large the code should actually be is a separate question, covered in QR code size for printing.

Three ways to ruin a good file

  • Upscaling a small PNG. A 200-pixel code from a screenshot, stretched to fill an A4 page, prints with soft or stepped edges. Generate the code again and use the SVG instead of enlarging what you have.
  • Saving as JPG. JPEG compression is designed for photographs and leaves faint artefacts around hard edges — exactly where a QR code has the most edges. A code that scans in PNG can turn marginal after a JPG round trip. Keep it as PNG or SVG.
  • Screenshotting the code. A screenshot captures whatever size the code happened to be on screen, often with scaling already applied. Download the file rather than capturing it.

Recolouring and adding logos are separate decisions with their own risks; see QR code colours and QR codes with a logo, or let the custom QR code generator apply them within safe limits instead of editing the SVG by hand. Whatever you change, scan the final file before it goes anywhere.

Get both a PNG and an SVG of your link:Generate a QR code

Related questions

SVG. It is a vector file, so it prints with sharp module edges at any size, and professional printers prefer vector artwork. A PNG is fine for office printing as long as you do not enlarge it beyond its natural print size.

About 8.7 cm wide at 300 DPI, which suits material read up close, or about 17 cm at 150 DPI, which is normal for signage viewed from a distance. Above that, use the SVG.

It is best not to. JPEG compression adds artefacts around hard edges, which is exactly where a QR code carries its information. Use PNG for bitmaps and SVG for everything that needs scaling.

Yes. Canva accepts SVG uploads, and the code can then be resized without losing sharpness. Keep the white margin around it and do not place it over a photograph.

PNG. Many email clients do not display SVG images, while PNG is supported almost everywhere. Insert it at a size where it is comfortably scannable from a screen, around 150–250 pixels wide.