Compress your SVG.
SVG · 5 MB max
SVG · 5 MB max
Often 30 to 80% for an export from Figma, Illustrator or Inkscape. An icon that is already optimized may gain nothing: FileDiet tells you so and you keep your file.
These apps add metadata, comments, empty layers and coordinates with lots of decimals. None of it is visible on screen.
Yes. An SVG is a text file that can contain a script, an automatic action (onload) or a javascript: link. Shown on a website, this code can run. FileDiet keeps only the known drawing elements and removes the rest, then checks the result a second time.
What draws nothing: metadata, comments, useless elements, extra decimals. And what can be dangerous: scripts, automatic actions, javascript: links, web page content, fonts and images loaded from another site.
Yes. Ids, classes, styles and the viewBox are kept: your SVG fits into your code as before.
No. An SVG is a vector drawing, sharp at any size. We remove useless text, not pixels. Compare before and after on a checkerboard, white or black background.
No, everything happens in your browser and nothing is stored. You can check for yourself: How FileDiet works.
An SVG rarely weighs more than a few hundred KB. If it is heavier, it often contains an embedded photo: in that case, Compress an image will do better.
Many social networks and forms do not accept SVG. Turn it into an image with SVG → PNG: you choose the width and the background.
For an animation made in After Effects or LottieFiles, the Lottie format is a better fit: Compress a Lottie.