SVG Optimizer
Clean up SVGs exported from Illustrator, Figma or Inkscape: editor data, comments and needless decimals are removed, which usually saves 20–70% with no visible change. Scripts and event attributes are always stripped, so the result is safe to put on a website.
For your safety, scripts and event attributes (onclick, onload…) are always removed, and previews are shown only as images.
Your images stay on your device. Processing happens entirely in your browser.
How to use SVG Optimizer
- Drop one or more SVG files.
- Choose the precision and whether to keep metadata and the viewBox. Turn on "Readable code" if you want to edit the file by hand.
- Click "Optimize SVG", compare before and after, then download the file or copy the code.
Frequently asked questions
How much smaller do SVGs get?
It depends on the source. Files exported from design programs usually shrink by 30–70% because of editor data and long decimals; icons that are already optimized may only lose a few percent.
What does precision mean?
The number of decimal places kept in coordinates. 3 is safe for almost everything. 1–2 gives smaller files, but small icons or detailed drawings may shift slightly, so check the preview. Choose 4–5 for very large or very detailed drawings.
Why keep the viewBox?
The viewBox lets the SVG scale freely with CSS. Without it the image may be cropped or stop resizing, so keep it unless you are sure you need fixed sizes.
Are scripts removed?
Yes, always. <script> elements, event attributes such as onclick or onload, and javascript: links are removed from the result. Both previews are shown only as images, so nothing in the file can run. If anything was removed, the result note says how many items.
Can I convert a PNG or JPG to SVG here?
No, this tool only optimizes files that are already SVG. To turn a picture into a vector use PNG/JPG to SVG, then optimize the result here. To make website icons from an SVG use Favicon Generator.
Are my files uploaded?
No. svgo runs in your browser and your files never leave your device.
Other tools
- Compress VideoShrink MP4, MOV and WebM videos for WhatsApp, email and Discord.
- Video ConverterConvert MOV, WebM and MKV videos to MP4, or the other way round.
- Trim VideoCut out the part of a video you need by choosing a start and end.
- Video to GIFTurn part of a video into an animated GIF.
- Video to MP3Extract the audio from a video as an MP3.
- Compress ImageMake JPG, PNG and WebP files much smaller without visible quality loss.
- Image to Text (OCR)Turn text in a photo or screenshot into copyable text.
- Remove Photo Metadata (EXIF)Delete GPS location, device and date info from photos before you share them.
- Crop ImageCrop photos freely or to square, 4:5, 16:9, or a round profile picture.
- Compress Image to KB (Under 100 KB)Shrink a photo below an exact size such as 50, 100 or 200 KB for online forms.
- Resize ImageChange the size of photos by percentage or exact pixels.
- Content-Aware ResizeChange the aspect ratio without stretching or cropping people and objects.
- Image ConverterConvert images between JPG, PNG and WebP in one click.
- HEIC to JPGOpen iPhone photos anywhere by converting HEIC to JPG.
- AVIF ConverterConvert JPG, PNG and WebP to AVIF, or AVIF to JPG and PNG.
- PNG/JPG to SVGConvert images, logos and drawings into scalable SVG vectors.
- PNG to JPGTurn PNG images into smaller JPG files.
- JPG to PNGConvert JPG photos to lossless PNG images.
- WebP to JPGConvert WebP images from websites into JPG.
- JPG to WebPMake website images smaller by converting to WebP.
- Passport & ID Photo MakerCrop a photo to 35 × 45 mm or other ID sizes and get a 10 × 15 cm print sheet.
- Resize Image for Instagram & Social MediaFit photos to Instagram, Story, YouTube, X, Facebook and LinkedIn sizes.
- Remove BackgroundRemove the background from a photo with AI and download a transparent PNG.
- Add WatermarkAdd your name or website as a watermark to your photos, in bulk and for free.
- Collage MakerCombine several photos into one image: grid, side by side or stacked.
- AI Image UpscalerEnlarge photos 2× or 4× with AI, e.g. 720p to 1080p, sharper than normal resizing.
- Magic EraserPaint over unwanted objects or people and AI removes them.
- Blur FacesAutomatically blur or pixelate faces in photos.
- Blur BackgroundPortrait mode: blur the background behind people with AI.
- Photo to SketchTurn a photo into a pencil drawing.
- Meme GeneratorAdd classic top and bottom meme text to your own image.
- Color Palette from ImageExtract the main colours of a photo as HEX and RGB.
- Batch Rename PhotosRename many photos at once with sequential numbers: holiday-01, holiday-02…
- Poster Maker (Split Photo into A4 Pages)Split one photo into A4 pages and print a giant poster at home.
- Rotate & FlipRotate photos 90°, 180° or flip them like a mirror.
- Favicon GeneratorMake a full favicon set (ICO, PNG, manifest) from an image or letters.
- Screenshot BeautifierPut a screenshot on a gradient with a window frame and shadow.