ImagesRuns in your browser

SVG Optimizer in the Browser

Paste SVG or choose a file, get compact output, and download the optimized SVG.

  • SVG code or file
  • No server upload
  • Active content blocked
Online tool

Try the tool

Add your data, choose the settings, and get the result.

SVG

Active SVG content is blocked: script, inline handlers, javascript:, and foreignObject.

Result

The optimized SVG will appear here.

Processing in your browser

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Paste SVG code or choose an .svg file.

  2. 2

    Run optimization and compare the code size.

  3. 3

    Download the optimized SVG.

02

What the tool can do

  • Remove the XML declaration, DOCTYPE, comments, and metadata.
  • Whitespace compaction between tags.
  • Block script and foreignObject elements, inline event handlers, and javascript: URLs.
03

Common use cases

  • Cleaning an SVG icon before publishing.
  • Removing graphics-editor metadata.
  • Checking SVG for blocked elements and event handlers.
04

How it works inside

The code is processed as text and is not inserted into the page as markup.

SVG containing scripts or other blocked active content is rejected.

05

Questions and answers

What does SVG optimisation do?

The tool cleans pasted SVG code using its supported rules and shows the result for copying. Compare the image's appearance after the change before replacing the file on your site.

Will the result always be smaller than the source?

Size depends on how the source was prepared. Basic cleanup does not replace every feature of a dedicated SVG optimiser. Processing runs in the browser; the tool does not upload code to your site or replace files automatically.