CALCULATOR WORKSPACE
Writing & Creator article5 min read

QR Code SVG Print Size: Calculate Quiet Zone and DPI

The printed width must include the QR matrix and its four-module blank border on every side. Use the matrix count shown by our QR Code Generator to calculate both the physical margin and, if needed, raster pixels.

Start with the complete printed square

To size a QR code SVG for print, choose the final outer width, including its white quiet zone. The QR Code Generator shows the dark-and-light matrix count and downloads an SVG with a four-module border on all four sides. If it reports 25 × 25 modules, the full file occupies 33 × 33 module units: 25 for the matrix plus 4 on the left and 4 on the right. A 30 mm outer square would give each module about 0.91 mm and each blank side about 3.64 mm. That is an example layout, not a universal minimum size.

DENSO WAVE, the QR Code developer, specifies a clear margin four modules wide around a standard QR Code. A border, caption, crop line or background pattern should stay outside that area. Count the existing white area in this site's SVG once; do not add a second four-module border unless you deliberately want more space.

Calculate width from the module count

Outer width = (matrix modules + 8) × physical module width

The extra eight modules are four blank modules on each side of one dimension. Reversing the formula gives module width = chosen outer width ÷ (matrix modules + 8). Quiet-zone width on each side = 4 × module width. Use the same unit, such as millimetres, throughout.

The generator shows matrix modules, not the outer count. Its SVG's square viewBox includes the border. The width and height attributes inside the downloaded SVG are display pixels; they do not prescribe a millimetre size on paper. Set the physical width in your layout or print dialog and keep the aspect ratio at 1:1.

Worked example: a 30 mm SVG for a short URL

Enter the literal https://example.com in our generator. With its current Byte mode and level-M error correction, that 19-byte link produces a 25 × 25 matrix. The downloaded file already includes the four-module border, making the outer grid 33 × 33. Suppose the finished artwork assigns the entire SVG a 30 mm × 30 mm box.

Checked print geometry for this illustrative 30 mm box
MeasureResultCalculation
Outer grid33 modules across25 + 4 + 4
One module0.909 mm30 mm ÷ 33
Quiet zone, each side3.636 mm4 × 30 mm ÷ 33
Matrix only22.727 mm25 × 30 mm ÷ 33
Check the total30.000 mm22.727 + 3.636 + 3.636

The active matrix is only about 22.73 mm wide inside the 30 mm box. If a designer instead makes the matrix alone 30 mm, the entire SVG will be wider: 33 × (30 ÷ 25) = 39.6 mm. Specify whether a requested size means the whole square or only the patterned centre before sending artwork to print.

SVG, 300 DPI and raster pixels are different measurements

For a vector-capable print workflow, keep the SVG and set its output to 30 mm square. Its paths can be scaled without a fixed bitmap resolution. If a printer or design app requires PNG, calculate pixels from the outer physical width: pixels = width in mm ÷ 25.4 × DPI. At an illustrative 300 DPI, 30 ÷ 25.4 × 300 = 354.33, so round up to at least 355 × 355 pixels. The original SVG's on-screen pixel dimensions are not evidence that the final print is 300 DPI.

A whole-pixel module grid can also help preserve crisp square edges when rasterizing: 33 outer units × 11 pixels each = 363 × 363 pixels for this example, about 307 DPI across 30 mm. Use a rasterizer that keeps the modules sharp; avoid resampling a tiny bitmap upward. DENSO's own print-area example uses whole printer dots per module, but its arithmetic is not a guarantee that a particular phone will scan a small print.

The same generator gives 33 × 33 matrix modules for https://calculationguide.com/writing/qr-code-generator under its current settings, so its outer grid is 41 × 41. At the same 30 mm width, one module becomes 30 ÷ 41 = 0.732 mm, and the quiet zone becomes 2.927 mm per side. The printed box did not change, but each square became smaller. Copy your actual matrix count from the result instead of assuming every URL produces the 25-module example. Shortening a link may reduce the count, but a third-party short link adds a dependency; check the destination and its longevity.

Module width within the same 30 mm outer square; actual matrix depends on encoded text
25-module matrix0.91 mm/module19-byte example URL
33-module matrix0.73 mm/module54-byte site URL
  1. Generate the QR image from the final, checked text. Note the displayed matrix count and download its SVG.
  2. Set an explicit square physical size in the card, label, flyer or sign layout. Preserve the white border; keep text, artwork, folds and trim outside it.
  3. Export or print at actual size rather than judging a screen preview. Keep high contrast and avoid stretching the square or softening its edges.
  4. Scan a physical sample with the intended phone or scanner from the distance and angle people will actually use. Test on the real stock, especially if it is curved or glossy, and verify the destination opens correctly.

There is no single print width that guarantees scanning. Module count, print quality, surface, light, camera focus and viewing distance all matter. If the sample struggles, give the whole square more room, simplify the encoded text where possible and repeat the test. The QR Code Generator creates the artwork; it does not certify a print job or verify a URL's safety.

QR Code GeneratorGenerate your final SVG, read its matrix count in the result, and apply the width formula above to your actual layout.
COMMON QUESTIONS

Questions readers ask

01Does the 30 mm example include the white border?

Yes. The worked example assigns 30 mm to the entire SVG. Its 25-module matrix occupies about 22.73 mm and the built-in four-module quiet zone occupies about 3.64 mm on each side.

02Is 300 DPI enough to guarantee that a QR code scans?

No. DPI describes raster or printer resolution, not the final module size, contrast, surface, scan distance or camera behavior. Use the calculation to prepare artwork, then test a physical print at its intended size.

03Should I add another quiet zone to the downloaded SVG?

The Calculation Guide SVG already has a four-module white area on every side. Keep it unobstructed. Extra blank space is fine if your layout allows it, but do not mistake the existing border for disposable padding.

04Why did my longer URL produce more modules?

The generator chooses an automatic QR version for the exact UTF-8 bytes at error-correction level M. A longer input may require a larger matrix; read the displayed matrix count for the particular text you are printing.

SOURCES

Sources and further reading

Use the linked generator to check the matrix count for your exact text. Confirm the final print with your own scanner before relying on it. Found an error? Tell us.

MAKE YOUR QR CODE

Generator used in this article