Crop SVG — trim whitespace and fit the viewBox

Remove the empty space around an SVG, or bring back drawing that spills outside its frame, without touching the drawing itself: the crop only rewrites the viewBox. The visible area is measured from the rendered pixels, so strokes, shadows and blurs count and invisible shapes don't. Add padding, make the result square for icons and avatars, drag the crop rectangle or type exact values, and crop a whole set of files at once.

Loading the tool…

How to use it

  1. 1

    Drop SVG files or a folder, or paste SVG code.

  2. 2

    Each file is cropped to its visible drawing; set padding and square, or drag the rectangle on any file.

  3. 3

    Download the cropped SVG, or every file as a ZIP.

Questions

Does cropping change the drawing?

No. Only the viewBox — the frame the drawing is shown through — changes, plus width and height if you keep the drawing's size. Every path and shape stays exactly as it was, so you can crop again later.

Why is there space around my SVG?

Design tools export the whole artboard, not just the artwork, so a small icon on a large artboard comes with a wide empty margin. Cropping fits the viewBox to what is actually drawn.

How is the visible area found?

The SVG is drawn in your browser and its pixels are scanned for the outermost painted ones. Unlike a geometric bounding box this includes stroke width, markers, shadows and blur, and ignores shapes that are fully transparent.

What does Keep the drawing's size do?

On, width and height are rescaled with the crop, so the drawing shows at the same size as before, just without the margin. Off, they are removed and the SVG scales to fill whatever container it's placed in.

Can I crop many SVGs at once?

Yes. Every file is cropped with the same padding and square setting; adjust any one by hand, then download them all as a ZIP with their original names.

Are my files uploaded?

No. Measuring and cropping run in your browser; nothing is sent to a server.

More free SVG tools

Need more than one change?

The Splice editor edits SVGs visually — shapes, text, colors, layers — across many files at once, with the code in sync.

Open the editor