Content-aware Trim
Measure the real drawing bbox and rewrite viewBox to fit.
SVG Tools / SVG Crop / Trim ViewBox
Free · Trim · Private
Tighten viewBox to the content bounding box with optional padding. Remove empty margins without redrawing paths — 100% in your browser.
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 ViewBoxFix oversized artboards and inconsistent icon framing in seconds.
Measure the real drawing bbox and rewrite viewBox to fit.
Add a small margin so strokes and anti-alias edges are not clipped.
Optionally write concrete dimensions from the trimmed viewBox.
See the old and new viewBox values after each trim.
Confirm framing on checkerboard, white, or dark artboards.
BBox measurement uses your browser DOM — files stay on device.
Trim a viewBox in three steps
Upload or paste an icon with excess empty margins.
Choose how much margin to keep around the content bbox.
Copy or save the file with the new viewBox.
Questions about trimming SVG viewBox
The tool mounts your SVG off-screen and reads getBBox() for the content, then rewrites viewBox (± padding).
getBBox() often excludes stroke width. A little padding prevents clipped edges on stroked icons.
No. Only viewBox (and optionally width/height) are updated. Geometry stays the same.
Yes. Measurement and rewrite happen entirely in your browser.