SVG Cropper — Crop, Trim, and Resize SVG Files
Crop your SVG files to remove excess whitespace and resize the viewBox to fit your content precisely — no software needed.
Drop your image here
Supports PNG, JPG, BMP, WEBP up to 5MB
Why Crop Your SVG File?
SVGs exported from design tools often have extra whitespace around the content — the artboard or canvas is larger than the visible graphic. This adds unnecessary padding and can cause layout issues when the SVG is used in web pages or design tools. Cropping the SVG to its content bounds removes this whitespace and ensures the SVG displays correctly at any size.
- Remove unused whitespace added by design tool artboards
- Fix SVG padding that causes layout issues in web pages
- Ensure the SVG scales from its true visual bounds
- Reduce SVG file size by removing empty coordinate space
How to Crop SVG Manually
To crop an SVG file, edit the viewBox attribute in the SVG markup. The viewBox format is 'x y width height'. Change x and y to shift the viewport's origin, and adjust width and height to set the visible area. For example, viewBox='10 10 80 80' crops 10 units from each side. Open the SVG in a text editor or Boxy SVG to make this edit visually.
Frequently Asked Questions
How do I crop an SVG to its content bounds?
Edit the SVG viewBox attribute to match the exact bounding box of your content. You can find the bounding box with getBBox() in JavaScript or visually in Inkscape or Boxy SVG.
Can I crop an SVG without losing quality?
Yes. SVG cropping edits the viewBox (the visible window) without changing the paths. No quality is lost — only the canvas bounds change.
How do I remove whitespace from an SVG?
Open the SVG in Inkscape → Select all → File → Document Properties → Resize page to content. This automatically trims the SVG to its content bounds.
What is the SVG viewBox attribute?
viewBox defines the coordinate system and visible area of the SVG: 'min-x min-y width height'. Editing it crops or expands the visible portion of the SVG.
Does cropping reduce SVG file size?
Slightly — removing whitespace area can reduce the viewBox dimensions. For significant size reduction, optimize the SVG paths and attributes as well.
Related guides
Ready to Convert Your Image to SVG?
Free online converter — no sign-up, no watermarks, results in under 3 seconds.
Convert Image to SVG — Free