SVG Cropper: Crop SVG Visually with a Draggable Box
Drag a box over your artwork, or crop to content in one click, and the SVG viewBox updates instantly.
SVG Cropper tool
1Add your SVG
2Adjust the options
3Preview and download
Input and output codeView, edit and copy the code
Under the hood
How SVG Cropper works
An SVG cropper changes the visible area of an SVG by editing its viewBox. You drag a crop box over the artwork, and the SVG instantly shows only the part you chose.
Read the viewBox
The cropper parses the SVG and reads its viewBox, which defines the drawing area in SVG units.
DOMParser · viewBoxPosition the crop box
Drag the box to move it and drag its corners to resize. You can also type exact X, Y, width and height, or lock a 1:1, 4:3 or 16:9 aspect ratio.
Pointer events · aspect lockCrop to content
One click measures the artwork, ignores any full-canvas background, adds a small margin and fits the crop box around what remains.
getBoundingClientRectRewrite the viewBox
The new viewBox is written, and the width and height are scaled to match so the SVG keeps its display scale.
viewBox · width · height
How SVG cropping works
- Non-destructive
- Shapes outside the crop are not deleted. They are simply hidden by the new viewBox.
- Exact numbers
- The crop is expressed in SVG units, so it is precise.
- Aspect ratios
- Lock 1:1 for avatars, 16:9 for banners and 4:3 for slides.
Step by step
SVG Cropper process
Four steps crop an SVG. Crop to content is the fastest way to remove empty space.
Add your SVG
Drop a file, paste code or press the sample button. The sample has plenty of empty space.
Tip: The crop box starts at the full canvas.
Crop to content
Press Crop to content to trim the empty space automatically.
Tip: Or drag the box yourself.
Fine-tune the box
Drag the corners, or type exact values. Choose an aspect ratio if you need one.
Tip: The kept-area tile shows the percentage kept.
BeforeAfterDownload the cropped SVG
Press Download to save it.
Tip: Rendered locally.
Reference
SVG Cropper settings / conversion chart
The table lists aspect ratios and where to use them. The chart shows how much area is kept at different crop sizes.
Share of canvas kept by crop width
At a glance
- Largest: 100% × 100%.
- Smallest: 25% × 25%.
Cropping both width and height shrinks the kept area quickly: half the width and half the height keeps a quarter of the canvas.
| Aspect ratio | Shape | Common use |
|---|---|---|
| Free | Any | Trim to content |
| 1:1 | Square | Avatars and app icons |
| 4:3 | Landscape | Slides and thumbnails |
| 16:9 | Wide | Banners and video thumbnails |
Answers
SVG Cropper FAQ
Questions people ask about the SVG Cropper, answered for this specific use case.
Does cropping delete parts of my SVG?
No. It changes the viewBox, so shapes outside the crop are hidden but remain in the file.
How do I remove empty space around a drawing?
Press Crop to content. It fits the crop box around the artwork and ignores a full-canvas background.
Can I type exact crop values?
Yes. The X, Y, Width and Height boxes use SVG units.
Why does my crop look different in another app?
Some apps ignore the viewBox. Test the cropped file in your target app.
Can I keep a specific aspect ratio?
Yes. Choose 1:1, 4:3 or 16:9 and the box keeps that ratio while you resize.
All converters
Every free converter and SVG tool
43 free tools that run in your browser. Pick a converter below, or search by format or task.
No converter matches that search. Try “SVG”, “logo” or “PNG”.