Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

SVG Optimizer

This tool makes SVG code smaller. It removes comments, metadata, editor data and empty groups, trims white space and rounds the numbers.

How to use SVG Optimizer online

  1. Paste the SVG code. Open the file in a text editor and copy it.
  2. Choose options. What to remove and how to round.
  3. Check the size. See the bytes saved.
  4. 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?
It should not, apart from tiny changes from rounding.
How many decimal places should I keep?
3 is safe for most icons.
Is editor data needed?
Only to edit the file in that editor. Keep an original copy.
Does it work on SVG with scripts?
It keeps them as they are. Remove scripts yourself if they are not needed.
Does my SVG leave my computer?
No. The code is changed in your browser.
Where does my text go when I use the SVG Optimizer?
No copy is made on a server; the SVG Optimizer runs in your browser.
How do I keep the result of the SVG Optimizer?
Yes. Use the copy button on the SVG Optimizer result, or select it and copy it by hand.

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.

More tools in Text & Writing Tools →

Search tools