SVG Optimizer & Viewer
Strip editor junk, round numbers and shrink SVG files — then copy them as optimised SVG, a data URI, CSS or a React component.
SVG input
or drop a file, or paste code below ·
Optimisations
Before & after
SVG Optimisation Guide
What each option does, and when to leave it off.
Editor Data
inkscape: · sodipodi: · data-nameDesign apps save layer names, guides and settings inside the file. Browsers ignore all of it, so it's pure weight.
Decimal Places
12.3456789 → 12.352 decimals is invisible for icons and illustrations. Use 3+ for tiny viewBoxes (under 24 units) or detailed maps.
Unused IDs
kept if referencedIDs used by gradients, clip paths, masks or <use> are kept. Turn this off if your CSS or JavaScript targets IDs.
Title & Description
accessibilityKept by default: screen readers announce <title>. Remove only for purely decorative graphics.
Responsive SVGs
viewBox, no widthWith a viewBox and no fixed width/height, the SVG scales to its container. Set the size in CSS instead.
Data URIs
url("data:image/svg+xml,…")URL-encoded SVG is smaller than Base64 and works in CSS backgrounds without an extra file request.
React / JSX
class → classNameAttributes are converted to camelCase, styles become objects, and props spread onto the <svg> so you can size and colour it.
Safe Previews
scripts never runPreviews are shown as images, so scripts inside an SVG can't run. The scripts option also strips them from the output.
Why SVGSlim?
SVGSlim is a fast, lightweight SVG cleaner for web designers and developers — exports from design tools are often half metadata; this trims them to what the browser actually needs.
All processing happens entirely in your browser. Your files never leave your device.