PNG or SVG for a QR code?
SVG
A vector description of the pattern — a list of rectangles and their coordinates. It has no resolution, so it renders with mathematically exact edges at any size, from a favicon to a building wrap, from one small file.
PNG
A fixed grid of pixels captured at whatever dimensions you exported. Universally supported by every application, email client and print workflow, and correct at exactly one size — the one you chose when you saved it.
Side by side
| Criterion | SVG | PNG |
|---|---|---|
| ResolutionThis is the whole distinction, and every row below follows from it. | None — the file describes shapes, not pixels | Fixed at export; enlarging it softens every edge |
| Scaling behaviour | Identical quality at 2 cm and at 2 metres | Degrades as soon as it is displayed above its native size |
| File size for a typical codeSVG size tracks module count, not output size, so a big print costs nothing extra. | Two to eight kilobytes, roughly constant | Grows with dimensions; a print-resolution export runs to hundreds of kilobytes |
| Print suitabilityWork back from centimetres: multiply by about 118 to get the pixel count you need. | Preferred by every commercial printer that accepts it | Acceptable only if exported at the final size at 300 dpi |
| Support in email and messaging | Inconsistent — many clients strip or refuse to render it | Universal. Every client on every platform displays it |
| Support in office software | Modern versions handle it; older ones silently rasterise it | Works everywhere, including decade-old installations |
| Editability after exportUseful when a brand team wants to adjust the code without returning to the generator. | Colours and module shapes can be changed in any vector editor | Effectively fixed; recolouring means regenerating the code |
| Risk of being scaled wrongly | None. There is no wrong size | High, and it is the most common cause of a soft, unscannable print |
| TransparencyKeep a light background behind the code whichever format you choose. | Background is optional and behaves predictably | Supported, but a transparent background over dark artwork breaks scanning |
| Rendering as a web image | Sharp on every display density with a single file | Needs a two-times export to stay crisp on high-density screens |
The short answer
Which one should you use?
Send SVG to anything that will be printed, and PNG to anything that will be pasted. A printed code is the case where resolution independence is worth something real, because the same file has to survive a designer scaling it, a press rasterising it, and a substrate spreading the ink — and a vector file gives the press exact edges to work from at whatever size the layout ends up at. A code going into a slide deck, an email signature or a web page is displayed at a known size on a screen, where a correctly exported PNG is indistinguishable from the vector and far less likely to be mangled by software that half-supports vectors. When you cannot control which of the two situations you are in, export both and label them clearly.
Choose SVG when
- The code is going to a commercial printer, a large-format press or any workflow where the final size is not yet fixed.
- The layout is still moving and someone will resize the code before it ships.
- You want the smallest possible file that stays sharp on every screen density on the web.
- A brand team needs to adjust the colours or module shape without regenerating the pattern.
Choose PNG when
- The destination is an email signature, a chat message or a slide deck, where vector support is unreliable.
- You are pasting into software old enough that it will rasterise a vector unpredictably anyway.
- The final display size is known and fixed, so exporting once at the right dimensions has no downside.
- Someone downstream needs to open the file by double-clicking it without any design tooling installed.
Common questions
Can I convert a PNG QR code to SVG afterwards?
Tracing a raster image back into vectors produces wobbly module edges that follow the pixel artefacts rather than the true grid, and that is worse than the PNG you started with. The correct move is always to regenerate from the original content, which takes a few seconds and costs nothing. Keep a note of what you encoded rather than treating the exported image as the master copy — the payload is the real source file.
What pixel dimensions should I use for a printed PNG?
Work backwards from the final printed size at 300 dpi. A three centimetre code needs roughly 355 pixels across, a ten centimetre code about 1,180, and a thirty centimetre poster code around 3,540. Export at that figure rather than exporting small and enlarging in the layout, because enlargement interpolates new pixels along every module edge and soft edges are precisely what a decoder struggles to threshold.
Does the file format change how well a code scans?
Not directly — a decoder sees whatever the camera captures, and both formats can produce an identical printed result. The formats differ in how likely they are to be damaged along the way. A PNG scaled up in a layout tool arrives at the press with softened edges, while an SVG arrives with the same crisp geometry it left with. The scanning difference is real but it comes from the workflow, not the pixels.
What about PDF, EPS or JPEG?
PDF and EPS are both fine for print and are effectively vector containers, so treat them as SVG with a different wrapper if that is what your printer asks for. JPEG is the one to avoid outright: its compression is designed for photographs and introduces ringing artefacts around exactly the kind of hard black-and-white boundary a QR code is made of. Even at high quality settings it softens module edges for no benefit.
Should the exported file include a margin?
Yes, and it should be four modules wide on every side, because that quiet zone is part of the specification rather than an aesthetic choice. Exports from this site include it. The risk is downstream: designers frequently crop it away to make a code sit tighter in a layout, which is one of the most common reasons a code that worked in testing fails in print. Lock the exported file inside a white box that already contains the margin.
Try it in a generator
Other comparisons
- Static vs dynamic QR codesStatic codes carry the data themselves and never expire. Dynamic codes add editing and analytics but depend on a subscription. Here is where each one belongs.
- vCard vs MeCard contact codesvCard carries every contact field but encodes long. MeCard is far more compact and loses detail. Which one belongs on a business card depends on the print size.
- QR code vs barcodeA retail barcode identifies a product for a till. A QR code carries arbitrary text for a phone. They solve different problems and are rarely interchangeable.