Home/How to fix an SVG that imports at the wrong size

How to fix an SVG that imports at the wrong size

An SVG can look correct in a browser and still arrive at an unexpected size elsewhere. Diagnose the viewport, coordinate system, and transforms before editing artwork.

Record one intended size

Write the target width and height with explicit units, then record the dimensions shown immediately after import. A clean ratio points to a unit conversion; different ratios by axis suggest aspect-ratio or transform trouble. Keep the original untouched and work in a copy.

Inspect width, height, and viewBox

Width and height describe the SVG viewport. A viewBox contains minimum x, minimum y, width, and height in user coordinates; it does not itself declare millimeters or inches. A straightforward 80 mm by 35 mm file might use width="80mm", height="35mm", and viewBox="0 0 80 35".

Do not replace viewBox numbers with target millimeters when paths use another scale. That can crop or stretch the drawing.

Set auditable SVG width and height →

Read SVG size and viewBox details →

Check transforms and stray objects

Group transforms can make path coordinates and rendered bounds differ. Apply or flatten transforms in a copy when appropriate. Use outline view and zoom to all objects; a distant hidden item can enlarge the selection.

Control the receiving application

Check the destination's units and automatic scaling. XCS, for example, documents ask, auto-scale, and keep-size choices for oversized imports. Set the intended width once with aspect ratio locked and reopen the result to verify persistence.

Use a concrete case to separate unit errors from art-bound errors. Suppose the intended label is 76 mm by 42 mm. If the receiving application shows 7.6 cm by 4.2 cm, the physical size is already correct; only the displayed unit changed. If it shows roughly 2.99 in by 1.65 in, that is also the same physical size. Convert units before resizing.

Next compare the SVG viewport with the visible art. A width of 76 mm and height of 42 mm can describe the page while the actual paths occupy only the middle half. Cropping the page to the art bounds changes the exported viewport; resizing the paths changes the artwork. Choose intentionally. For a label with required outer dimensions, preserve the 76 by 42 viewport. For artwork that should fit tightly, crop to visible bounds and then declare the target size.

Check proportional math after every correction. At 76 by 42, setting width to 152 mm should produce 84 mm height. If it does not, the aspect ratio is unlocked or the selection excludes part of the design. Select every intended path, exclude stray reference objects, lock proportions, and retry. Reopen the saved SVG rather than trusting only the editor session.

A source declared in pixels may reflect an exporter’s CSS-pixel convention, while another program may interpret missing physical units differently. Do not guess whether pixels mean centimeters or inches. Compare the viewBox ratio, intended measurement, and imported result, then add explicit mm, cm, or in dimensions to a copy. For 7.6 cm by 4.2 cm, the equivalent declaration is 76 mm by 42 mm.

This process analyzes metadata and documented behavior. It does not prove how an unobserved native import or physical cut behaved.

Calculate fit after sizing →

Check XCS automatic scaling →

Official references

References checked September 7, 2026.