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
| Use | Format | Why |
|---|---|---|
| Commercial print: flyers, posters, packaging | SVG | Sharp at any size; printers prefer vector artwork. |
| Large format: banners, signage, vehicle graphics | SVG | A bitmap would have to be enlarged far past its pixels. |
| Illustrator, InDesign, Affinity, Figma | SVG | Imports as editable shapes you can scale and position freely. |
| Canva | SVG or PNG | Canva accepts SVG uploads; the PNG also works at modest sizes. |
| Word, Google Docs, Pages | PNG | Universally supported and prints well at document sizes. |
| PowerPoint, Google Slides, Keynote | PNG | Works everywhere; recent PowerPoint and Keynote also take SVG. |
| Email newsletters and signatures | PNG | Many email clients do not display SVG at all. |
| Social media posts | PNG | Platforms accept PNG; most reject SVG uploads. |
| Web pages | PNG or SVG | Both work in browsers; SVG stays crisp on high-density screens. |
| Office or home printer | PNG | Fine 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.
| Resolution | Typical use | Maximum width |
|---|---|---|
| 300 DPI | Material read close up: cards, flyers, labels | about 8.7 cm |
| 150 DPI | Posters and signage read from a distance | about 17 cm |
| 72–96 DPI | Screens, slides, web | Not 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.