Optimize an SVG file

Strip comments, editor-specific metadata (Inkscape, Sodipodi), XML headers, and excess whitespace from an SVG.

Drop your file here

or click to browse

All files • or paste with ⌘V
Nothing has left this page since you opened the tool. Show network activity

    The browser enforces this: the site’s security policy only lets the page talk to the code libraries’ servers and an anonymous usage counter (tool name, file type, size range). A request carrying your file to anywhere else would be blocked before it left.

    Check it yourself: open your browser’s developer tools, go to the Network tab, and run the tool. Or turn off Wi-Fi once the tool has loaded; it keeps working.

    How it works

    Strip comments, editor-specific metadata (Inkscape, Sodipodi), XML headers, and excess whitespace from an SVG.

    Drop an SVG and the tool runs basic cleanup: removes HTML comments, the XML and DOCTYPE declarations, Inkscape and Sodipodi namespace declarations, RDF metadata blocks, and editor-specific attributes. Whitespace between elements is collapsed. Output is the smaller SVG. Typical savings on a hand-exported SVG: 20-60% smaller, depending on how much editor cruft was in the original. This is intentional minimal optimization: it doesn't simplify paths, merge similar shapes, quantize coordinates, or run SVGO's full battery of transformations. For aggressive optimization, run the output through SVGO locally. The cleaning is safe by default, no path data is touched, just metadata.

    How to use it

    1. Drop your SVG. Inkscape and other editor exports have the most cruft to remove.
    2. Run the cleanup. Comments, RDF metadata, editor namespaces, and whitespace are stripped; path data is never touched.
    3. Compare and download. Check the size saving and download the cleaned SVG.

    Frequently asked questions

    How much smaller will my SVG get?
    Depends on the source. Inkscape-exported SVGs often shrink 40-60%. Figma-exported SVGs are already clean; expect 5-15%. Hand-written SVGs may not shrink at all.
    Does this run SVGO?
    No. It does a focused subset: comments, editor metadata, XML headers, whitespace. For SVGO's full optimizer, use it locally on the command line.
    Will it break my SVG?
    It shouldn't. Path data and presentation attributes are untouched. Only metadata and editor-specific markup are removed.
    Is my SVG uploaded?
    No. The cleanup runs entirely in your browser.
    Saved