curly{bits}

Free developer tools. Nothing leaves your browser.

All tools

curlybits / SVG Optimizer

SVG Optimizer

SVG files exported from Figma, Illustrator, Inkscape or Sketch are full of metadata, comments and over-precise numbers. Drop your files here to clean them up with SVGO, the industry-standard optimizer, and compare the result side by side. Files never leave your browser.

Or paste SVG code

Drop SVG files here

or ·

    How to use the SVG Optimizer

    1. Drop one or more .svg files into the box, choose them, or paste SVG code.
    2. Each file is optimized immediately. Compare the original and optimized previews to check nothing changed.
    3. Adjust Number precision: lower numbers make smaller files; raise it if curves look different.
    4. Download each file, copy the code or a data URI for CSS, or download everything as a zip.

    What gets removed

    • Editor metadata, comments, XML declarations and doctype.
    • Hidden and empty elements, unused definitions and IDs.
    • Default attribute values and unnecessary groups.
    • Extra decimals: 50.0000000 becomes 50.
    • Path data is rewritten in a shorter form, and shapes are converted to paths when that's smaller.

    Icons exported from design apps often shrink by 30–70%.

    Accessibility: keep the title

    The <title> element is what screen readers announce for an SVG image, so it's kept by default. Only remove it for purely decorative graphics.

    width, height and viewBox

    The viewBox is always kept so the image scales correctly. Tick Remove width/height if you size icons with CSS: the SVG then fills its container.

    Is it safe to open SVGs here?

    SVG files can contain scripts. Previews here are shown as images, which browsers never allow to run scripts, and nothing is uploaded.

    Frequently asked questions

    Which optimizer does this use?

    SVGO version 4, the open-source tool used by most build systems and design-to-code tools, running entirely in your browser.

    Why does my optimized SVG look slightly different?

    Very low precision can move points slightly. Increase <b>Number precision</b> to 3 or more for detailed illustrations.

    Can I optimize many files at once?

    Yes. Drop as many as you like and use <b>Download all</b> to get a zip.

    How do I use an SVG in CSS?

    Click <b>Copy as data URI</b> and use it as <code>background-image: url("…")</code>.

    Add this SVG optimizer to your website

    Free for blogs, schools and businesses. Copy the code below and paste it into your page's HTML. The tool works exactly like this one and runs in your visitors' browsers, so nothing is uploaded. Please keep the credit line so others can find it too.

    Preview embed ↗