Skip to main content
PicKit

Developer tool

Optimise SVG Files

SVG files from design tools carry editor data, comments and over-precise numbers. PicKit shrinks them with the open-source SVGO engine, removes scripts and other risky content, and checks that each optimised file still looks exactly like the original. Your files never leave your device.

Drag & drop images, or browse files

Up to 50 files · SVG · 10 MB each

Files stay on your device. SVGs are never run: previews are shown as images.

(subfolders included), or paste an image with Ctrl+V.

Import from a link

Your browser downloads the file straight from that website. PicKit never receives the link or the file. Sites that don’t allow other websites to read their files, or that need a login, can’t be imported: download the file there and add it from your device instead.

How to optimise SVGs

  1. Drop up to 50 SVG files above.
  2. Choose the number precision and options. “Remove risky content” is on by default.
  3. Click Optimise. Each file shows the before/after size, a side-by-side preview and whether it renders the same.
  4. Download each file, copy its code, or download all as a ZIP.

What is removed

  • Editor data (Inkscape, Illustrator, Sketch), metadata, comments, hidden and empty elements, default values and unneeded precision. The viewBox and the accessible <title> are kept.
  • With “Remove risky content”: scripts, event handlers such as onload, embedded HTML (foreignObject), iframes and objects, javascript: links (including obfuscated ones), animations that try to set a link or event attribute, and references that load files from other sites (remote images, sprites, CSS @import). Ordinary links are kept.
  • This reduces risk but is not a guarantee. If you publish SVGs from untrusted people, also serve them with a Content-Security-Policy and don’t inline them into your pages.
  • Unused IDs are removed or shortened. Turn on “Keep IDs and class names” if your page CSS or JavaScript targets them.

How the result is checked

  • The original and the optimised file are both drawn as images at up to 512 px and compared pixel by pixel. Tiny anti-aliasing differences from rounded numbers are ignored; anything more is reported.
  • SVGs are only ever displayed as images, which never run scripts, so opening an unsafe SVG here is safe.
  • If an SVG relies on fonts or images that aren’t inside the file, it may look different in different places; PicKit can only compare what the browser can draw.