Remove SVG viewBox Whitespace

Tighten the viewBox so empty padding around the art disappears

General fix? Fix SVG viewBoxFit content? Fit SVG to viewBox

FAQ

Quick answers

How do I remove whitespace from an SVG viewBox?
Paste an SVG with extra empty space, then click Remove whitespace. The viewBox snaps tightly to the artwork with no padding.
Will removing whitespace crop my strokes?
getBBox-based bounds follow geometry fills more than stroke overflow. Very thick strokes may need a tiny manual pad after trimming.
Is this the same as cropping the image?
It changes the coordinate window (viewBox), not raster pixels. The vectors stay intact; only empty canvas around them is removed.
Do root width and height stay after trimming?
No. The tool removes root width and height so scaling relies on the tightened viewBox.
Fix viewBox → Fit to viewBox → Change viewBox →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina