SVG zoom and dimension calculator
Enlarge or shrink an SVG and see the new width and height before you copy the code.
About SVG Zoom and Dimension Calculator
Resizing an SVG by hand means editing width, height and viewBox so that they agree. Paste your SVG here, choose a percentage or give a target width or height, and the tool rewrites the size attributes on the root element and keeps the viewBox. If the SVG has no viewBox, one is added from its width and height so that it scales cleanly. The drawing itself is not touched.
- Making an icon 150 percent larger without opening an editor.
- Setting an exact width and letting the height follow the aspect ratio.
- Finding out the real dimensions of an SVG that has only a viewBox.
- Fixing an SVG that stays small because it has no viewBox.
How to use SVG Zoom and Dimension Calculator
Step 1
Paste the SVG code or choose an .svg file.
Step 2
Pick percent, target width or target height and type a value.
Step 3
Copy or download the new SVG.
Good to know
- A target width is read in the SVG's own unit, for example px or mm.
- Sizes written in percent or missing from the SVG fall back to the viewBox numbers, taken as pixels.
- Strokes and text scale with the drawing. Nothing inside the SVG is redrawn.
Common questions
What if my SVG has no width and height?
The viewBox numbers are used instead and the new width and height are written to the file.
Does the aspect ratio change?
No. Both sides are multiplied by the same factor, so the shape is kept.
What if the size is written in percent?
A percentage depends on the page around the SVG, so it cannot be scaled. The viewBox numbers are used as pixels instead.