SVG Tools

SVG Width / Height Editor

Adjust SVG display dimensions with a fixed ratio or custom values while preserving internal coordinates.

Your SVG stays in your browser and is never uploaded to a server.

About This Tool

SVG Width / Height Editor changes the outer display size of icons and illustrations. It keeps the SVG as a vector file and does not rewrite path coordinates to resize the graphic.

How to Use

  1. Choose an SVG file or paste its source, then read the current dimensions.
  2. Enter a new width. When the ratio is known and locked, the height updates accordingly.
  3. To set dimensions independently, unlock the ratio and enter both values.
  4. Apply the dimensions, check the preview, and download resized.svg.

Features

  • Sets display dimensions in pixels, with the aspect ratio locked by default.
  • Uses a valid viewBox ratio first, or explicit width and height when no viewBox is available.
  • If reliable dimensions are missing, the tool reports an unknown ratio and asks you to enter both dimensions.

Display size and internal coordinates

  • width and height set the display area; viewBox sets the internal coordinate range. This tool changes the display size and preserves the existing viewBox.
  • For example, with viewBox 0 0 800 600 and the ratio locked, changing the width to 400 sets the height to 300.
  • Without a viewBox, changing dimensions may only change the visible area instead of scaling the graphic. Check the result and use ViewBox Calculator if needed.
  • The main download preserves unchanged original content, which may include scripts or external references. The preview filters these out; a separate filtered SVG download is available.

SVG Safety

Previews use a filtered static copy. Scripts, click events, animations, external images, fonts, and styles do not run or load. External references, embedded web pages, and unsupported content are removed, so the preview may differ from the original. Documents with a DOCTYPE or custom entities are not supported.

SVG files and UTF-8 source are limited to 2 MiB, 20,000 nodes including elements and text, and 96 nesting levels. Simplify files that are too large or complex before trying again.

Privacy

Your SVG stays in your browser and is never uploaded to a server.

Inputs and results are not saved automatically. Download anything you want to keep before clearing the tool or leaving the page, and keep a copy of your original.

FAQ

How do width, height, and viewBox differ?

width and height control the outer display area. viewBox describes the internal coordinate range. Changing dimensions does not directly rewrite path coordinates.

Will resizing an SVG reduce sharpness?

Vector shapes still scale sharply, but embedded pixel images do not gain detail. Text rendering also depends on the font and browser.

Why do SVGs usually stay sharp when enlarged?

Vector shapes are described with paths and coordinates, so the browser redraws them at the current size. Bitmap images contain a fixed number of pixels.

How is the aspect ratio maintained?

An 800:600 image has a 4:3 ratio. At a new width of 400, the height is 400 × 3 ÷ 4 = 300. If the ratio is unknown, enter both dimensions yourself.

Back to the Developer Tools Directory