SVG Optimizer
Make SVG icons, logos and illustrations smaller without changing how they look — compare before and after, tune precision, optimise many files at once and copy the result as a data URI, CSS or a React component.
At a glance
- Uses SVGO, the standard open-source SVG optimiser, running entirely in your browser — files are never uploaded.
- Removes editor leftovers (Inkscape, Illustrator, Sketch, Figma metadata), comments and unused definitions, rounds numbers and rewrites path data — exports often shrink by half or more.
- Before/after preview on a transparent, white or dark background, with an automatic pixel check that warns if the optimised file looks different.
- Options for precision, multipass, responsive SVG (removes width/height), keeping IDs, removing scripts and pretty printing, plus every SVGO step individually.
- Batch: optimise many files at once and download them as a ZIP.
- Copy the result as SVG code, a compact data URI, CSS background, <img> tag, base64 or a React (JSX) component.
Step by step
How to optimise an SVG
- 1
Add SVG files
Drop one or more .svg files, or paste SVG code.
- 2
Check the preview
Compare the original and optimised image and the size saved.
- 3
Adjust if needed
Lower the precision for smaller files, or raise it if shapes change. Turn on Keep IDs if your CSS or scripts use them.
- 4
Download or copy
Download the file (or all files as a ZIP), or copy it as code, a data URI or a React component.
Features
Everything you need, nothing you don’t
Smaller, same look
A pixel comparison checks the optimised SVG against the original every time.
Safe to publish
Scripts and event handlers are removed by default; previews never run scripts.
Many files at once
Drop a folder’s worth of icons and download them all as a ZIP.
Ready-to-paste code
Data URI, CSS, <img> and React component outputs with one-click copy.
Full control
Switch any of SVGO’s steps on or off, and keep IDs your CSS or JavaScript uses.
Private
Optimisation runs on your device — nothing is uploaded.
Which options to use
| Situation | Setting |
|---|---|
| Icons for a website | Precision 2–3, Make responsive on |
| Logos and detailed illustrations | Precision 3–4; check the pixel comparison |
| SVG styled or animated with CSS/JS | Keep IDs on |
| SVG pasted into HTML | Remove xmlns on |
| SVG from an unknown source | Remove scripts on (the default) |
| Code you will edit by hand | Pretty print on |
FAQ
Frequently asked questions
Does optimising change how my SVG looks?
Are my files uploaded?
What is SVGO?
Should I use a data URI or base64?
Why is the title kept?
Keep going
Related tools
SVG to PNG, JPG & WebP Converter
Convert SVG to PNG, JPG or WebP online at any size — 1x, 2x, 3x or exact pixels — with a transparent or coloured background. Batch convert, free, no upload.
Image Compressor
Compress JPG, PNG, WebP and AVIF images online for free. Shrink photos by up to 90% or hit an exact KB target — right in your browser, with no upload.
Favicon Generator
Create a favicon from an image, text or emoji: get favicon.ico, SVG, Apple touch and Android icons, the web manifest and HTML code. Free, nothing uploaded.
CSS to Tailwind Converter
Convert CSS to Tailwind classes online: hover, media queries, dark mode and gradients become variants, colours match the palette. Tailwind v4 and v3, free.
Image Resizer
Resize JPG, PNG and WebP images by pixels, percentage or social media presets. Crop to fill or fit, batch resize and download a ZIP — no upload needed.
WebP Converter
Convert PNG, JPG, GIF and HEIC images to WebP in your browser. Lossy or lossless, transparency kept, batch ZIP download — free, private and with no upload.
Last updated Report a problem or suggest a feature