SVG Optimizer
Strip editor metadata, comments and excess precision from an SVG, with a live preview.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the svg optimizer
- Paste your SVG markup.
- Choose what to strip.
- Check the preview, then copy or download.
About this tool
SVGs exported from design tools carry a great deal that browsers ignore: editor namespaces, layer names, comments, and coordinates given to a dozen decimal places. On icons that overhead frequently outweighs the artwork itself.
Decimal precision is usually the biggest win. A coordinate written to eight places describes a position far finer than any screen can show, and rounding to two typically cuts the file substantially with no visible difference.
Removing width and height is offered but off by default, and only applies when a viewBox is present. That combination lets an SVG scale to its container — but without a viewBox, removing them leaves the image with no intrinsic size at all, so the tool checks first.
This works on the markup as text rather than parsing it into a tree, so it performs only the changes that are safe without one. It will not merge paths, remove unused definitions or restructure groups the way a full optimiser such as SVGO does. A live preview is shown so you can confirm the result still renders.
Common uses
- Shrinking icons exported from Figma or Illustrator.
- Cleaning SVGs before inlining them in HTML.
- Removing layer names and editor data before publishing.
Frequently asked questions
- Will optimising break my SVG?
- It should not — only changes safe without a full parse are made. The live preview is there so you can confirm before using the result.
- Should I remove width and height?
- Only when a viewBox is present; the tool enforces that. It lets the SVG scale to its container, but without a viewBox it would lose its size entirely.
- How is this different from SVGO?
- SVGO parses the document and can merge paths and drop unused definitions. This does the text-level cleanups, which cover most of the saving, without any upload.
Related tools
SVG Minifier
Collapse an SVG onto one line and cut its file size, with a preview.
SVG Formatter
Re-indent minified SVG markup so it can be read and edited.
SVG to PNG Converter
Rasterise SVG markup or a file to PNG, JPG or WebP at any scale.
Image Compressor
Reduce image file size with an adjustable quality setting and a side-by-side before and after comparison.