SVG Optimizer
This tool makes SVG code smaller. It removes comments, metadata, editor data and empty groups, trims white space and rounds the numbers.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use SVG Optimizer online
- Paste the SVG code. Open the file in a text editor and copy it.
- Choose options. What to remove and how to round.
- Check the size. See the bytes saved.
- Copy the code. Save it as an SVG file.
Why use this free SVG Optimizer
- Comments and metadata removed
- Editor data removed
- Number rounding
- Empty groups removed
- Bytes saved shown
- Share by link
Why optimise an SVG
SVG files made in a drawing program often hold much that a browser does not need: comments, the editor’s own data, metadata, empty groups and numbers with many decimal places. Removing it makes the file smaller, so pages load faster, and the drawing looks the same. Small SVGs also fit better inside HTML and CSS.
What the tool removes
It can remove comments, the XML declaration and doctype, metadata and empty title tags, data added by Inkscape and Sodipodi, empty groups and extra white space between tags. Each step is an option. It also rounds long decimals, such as 12.123456, to the number of places you choose, and writes 0.5 as .5.
A worked example
The sample has a declaration, a comment, editor data, metadata, an empty group and a path with long numbers. It is 303 bytes before and 117 after, a saving of 61.4%. The path M12.123456 2.000001 becomes M12.123 2, and the viewBox is kept.
Check the picture
Rounding numbers changes a drawing slightly, so choose enough places for the size of your picture: 3 is safe for most icons, and a very large or detailed drawing may need more. Always look at the result before you use it. Set the places to -1 to keep every digit. The tool leaves paths, shapes and styles otherwise as they are.
What it does not do
This is a light, safe clean-up. It does not merge paths, convert shapes, minify path data or remove unused definitions, which full tools can do for a larger saving. If a file needs that, run a full optimiser after trying this. Keep your original file, because editor data may be needed to edit the drawing again.
Using the tool
There is no button to wait for: the SVG Optimizer result follows every change. Open a text file into the box, or drop one on it.
SVG Optimizer: frequently asked questions
Does optimising change how the picture looks?
How many decimal places should I keep?
Is editor data needed?
Does it work on SVG with scripts?
Does my SVG leave my computer?
Where does my text go when I use the SVG Optimizer?
How do I keep the result of the SVG Optimizer?
Related searches for SVG Optimizer
- SVG Optimizer online
- free SVG Optimizer
- SVG Optimizer online free
- SVG Optimizer for mobile
- SVG Optimizer without sign up
- SVG Optimizer – Text & Writing Tools
SVG Optimizer is a free online tool on MAITBOX, in the Text & Writing Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.