Free resizer

Resize SVG online

Set a new width and height for an SVG, with the aspect ratio locked by default, or strip the fixed size so the file scales with CSS. The viewBox is kept (and created if it was missing), so the artwork scales instead of being clipped.

Drop an SVG file to resize

or

Runs in your browser · Nothing is uploaded · No account

width, height and viewBox are different jobs

The viewBox is the drawing's internal coordinate system. width and height are only the size of the picture on the page. A 24-unit icon displayed at 96 pixels is still the same file:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="96" height="96">
  <circle cx="12" cy="12" r="10" fill="#111827"/>
</svg>

The circle is still centred at (12, 12) with radius 10. It is just drawn four times larger. That is what this tool does: it rewrites the size attributes and leaves the coordinates alone.

A worked example, including a missing viewBox

Many exports, especially older ones, look like this — a size, but no viewBox:

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
  <circle cx="12" cy="12" r="10" fill="#111827"/>
</svg>

If you naively changed width and height to 96, the circle (which lives in a 24-unit space) would sit in the corner of a 96-unit canvas and look cropped. The resizer prevents that. On load it reads the current size, fills the Width (px) and Height (px) fields, and when you download a 96 × 96 version it writes:

<svg xmlns="http://www.w3.org/2000/svg" width="96" height="96" viewBox="0 0 24 24">
  <circle cx="12" cy="12" r="10" fill="#111827"/>
</svg>

The added viewBox="0 0 24 24" is built from the original width and height. If a viewBox was already present, it is left untouched. Tick Responsive (remove width/height) and the same file is saved as:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
  <circle cx="12" cy="12" r="10" fill="#111827"/>
</svg>

That form is what you want for inline icons that should fill a button or a CSS grid cell. Give the element (or its parent) a size in CSS; the graphic keeps its aspect ratio.

How to use the resizer

  1. Drop an SVG or paste the markup. The preview and the width/height fields show the current size, rounded to whole pixels.
  2. Type a new width or height. The link button between the fields is on by default (aspect ratio locked), so the other side updates to match. Click it to unlock if you need a different viewport.
  3. Optionally tick Responsive (remove width/height). The number fields disable, because the file will no longer have a fixed pixel size.
  4. Download the file (named -{width}x{height}.svg, or -responsive.svg), copy the markup, or open it in the editor.

Unlocking the ratio does not stretch the drawing

It is reasonable to expect that typing 200 × 100 on a square icon would squash it. In this tool it does not, because the viewBox is never rewritten and SVG's default preserveAspectRatio is xMidYMid meet. The browser fits the square drawing inside the 200 × 100 viewport and leaves empty space on two sides. The element is 200 × 100 — useful if you need to reserve a wide slot in a layout — but the artwork is not distorted.

If you truly need to stretch the paths, that is a different operation (a non-uniform scale, or preserveAspectRatio="none"). This resizer does not do that, on purpose.

Resize, crop, or export a PNG?

Use this page when the canvas is already right and you want a different display size, or a responsive file for CSS. Use Crop SVG when there is empty space around the ink and you want that space gone. Use the editor when you want to change the artboard without scaling the artwork, or to type a size in millimetres for print work.

Resizing an SVG does not produce a bitmap. Social networks, older Office documents and many print labs still want a PNG at a specific pixel size. For that, take the (possibly cropped and resized) SVG to the SVG to PNG converter. SVG vs PNG: when to use each walks through which format the destination actually accepts, and the print guide covers the DPI arithmetic.

Questions

Does resizing an SVG reduce quality?

No. Changing width and height only changes the size at which the vector is drawn. The shapes are not turned into pixels, so they stay sharp at 16 px or at 1,600 px. If you need a bitmap at a particular size, convert the SVG to PNG separately.

Why does my resized SVG look cropped in another app?

If a file has width and height but no viewBox, those two attributes are the coordinate system as well as the display size. Changing them crops the drawing. This tool adds a viewBox of 0 0 {original width} {original height} when one is missing, so later size changes scale instead of clipping.

What does the Responsive checkbox do?

It removes the width and height attributes and keeps the viewBox. The SVG then fills whatever size you give it in CSS (for example width: 100% on a container) and keeps its proportions. The width and height fields are disabled while this is on. The download is named with a -responsive suffix.

What happens if I unlock the aspect ratio?

You can type width and height independently. The viewBox is still not rewritten, and SVG's default preserveAspectRatio (xMidYMid meet) letterboxes the drawing in the new viewport rather than stretching it. The element itself will be the size you typed, with empty space on two sides if the proportions do not match.

How is this different from changing the artboard in the editor?

Resize changes how large the existing canvas is drawn. It does not add or remove empty space around the artwork. To change the canvas around an unscaled drawing, open the file in the Vectopea editor and set the artboard width and height in the Properties panel. To trim empty space automatically, use Crop SVG.

Do strokes and text stay the same thickness?

Stroke widths and font sizes are in the SVG's user units. When you only change width and height, those units scale with the viewport, so a 2-unit stroke looks twice as thick at 48 px as it did at 24 px. That is usually what you want for a logo. If you need a hairline that stays 1 CSS pixel, you have to set that in CSS or vector-effect, not with this tool.