SVG Tools / SVG Crop / Trim ViewBox

Free · Trim · Private

Free SVG Crop / Trim ViewBox

Tighten viewBox to the content bounding box with optional padding. Remove empty margins without redrawing paths — 100% in your browser.

  • Auto getBBox
  • Padding Control
  • No Uploads

Open the interactive tool

Run SVG Crop / Trim ViewBox entirely in your browser. Files stay on your device — nothing is uploaded to process this tool.

Launch SVG Crop / Trim ViewBox

Crop empty space from icons

Fix oversized artboards and inconsistent icon framing in seconds.

Content-aware Trim

Measure the real drawing bbox and rewrite viewBox to fit.

Padding Control

Add a small margin so strokes and anti-alias edges are not clipped.

Width / Height Sync

Optionally write concrete dimensions from the trimmed viewBox.

Before → After Report

See the old and new viewBox values after each trim.

Live Preview

Confirm framing on checkerboard, white, or dark artboards.

Local Measurement

BBox measurement uses your browser DOM — files stay on device.

How it works

Trim a viewBox in three steps

  1. Load your SVG

    Upload or paste an icon with excess empty margins.

  2. Set padding

    Choose how much margin to keep around the content bbox.

  3. Download the trimmed SVG

    Copy or save the file with the new viewBox.

Frequently Asked Questions

Questions about trimming SVG viewBox

How is the crop measured?

The tool mounts your SVG off-screen and reads getBBox() for the content, then rewrites viewBox (± padding).

Why do I need padding?

getBBox() often excludes stroke width. A little padding prevents clipped edges on stroked icons.

Does trim change path data?

No. Only viewBox (and optionally width/height) are updated. Geometry stays the same.

Is trimming private?

Yes. Measurement and rewrite happen entirely in your browser.