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

Drop your SVG here, or click to browse Or paste SVG code anywhere on the page. Nothing is uploaded.
No file?

2Adjust the options

3Preview and download

Live preview
sample.svg
Input and output codeView, edit and copy the code
Input SVG code
Output

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.

  1. Read the viewBox

    The cropper parses the SVG and reads its viewBox, which defines the drawing area in SVG units.

    DOMParser · viewBox
  2. Position 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 lock
  3. Crop to content

    One click measures the artwork, ignores any full-canvas background, adds a small margin and fits the crop box around what remains.

    getBoundingClientRect
  4. viewBox="0 0 400 300"viewBox="115 80 170 140"

    Rewrite 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
The four stages of the SVG Cropper, from your input to the finished file.

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.

  1. 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.

    Drop SVG
  2. Crop to content

    Press Crop to content to trim the empty space automatically.

    Tip: Or drag the box yourself.

    X / YWidthAspect
  3. 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.

  4. Download the cropped SVG

    Press Download to save it.

    Tip: Rendered locally.

    Download SVGsvg-cropper.svg

Use the SVG Cropper

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

Share of canvas kept by crop width100% × 100%: 1; 75% × 75%: 0.56; 50% × 50%: 0.25; 25% × 25%: 0.06.100% × 100%175% × 75%0.5650% × 50%0.2525% × 25%0.06
Cropping both width and height shrinks the kept area quickly: half the width and half the height keeps a quarter of the canvas.

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.

SVG Cropper aspect ratios and uses
Aspect ratioShapeCommon use
FreeAnyTrim to content
1:1SquareAvatars and app icons
4:3LandscapeSlides and thumbnails
16:9WideBanners 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.

Ready to try it?

Your result is one drop away.

Open the SVG Cropper

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.