SVG Optimizer

Reduce SVG markup, compare the preview and export SVG or PNG at a chosen width.

Paste SVG code or choose a file. Optimize it, compare the preview, then download SVG or export PNG.

Optimize SVG or export PNGChoose files or drop them here

SVG · 5 MB each · ten files maximum

Conversion options

Compare both sanitized previews before using the result.

This tool needs JavaScript and a modern browser with local image processing.

How to use

What is an SVG optimizer?

SVG stores a drawing as text describing shapes, paths and other elements. An optimizer removes unnecessary markup to make the file smaller. This tool also exports a PNG at your chosen width, while keeping transparent areas transparent.

Optimize SVG and export PNG

Paste SVG code or choose a file. Optimize it, compare the preview, then download SVG or export PNG.

Example and expected result

Open a 640 × 400 SVG and export PNG at width 1280. Expected: a 1280 × 800 PNG when the original aspect ratio is retained. Optimization reports actual bytes saved; the saving depends on the source and may be zero.

SVG export reference

FormatBest forTransparency
SVGEditable vector markup; check sanitized previewPreserved for supported artwork
PNG16–4096 pixels wide; height at most 4096Preserved for supported artwork

Formats and limits

SVG code or .svg files, up to 5 MB each and ten files per batch. PNG width can be 16–4096 pixels; height must also be at most 4096 pixels. Scripts, event handlers, foreign HTML and external references are removed before preview or export. Text uses available viewer fonts; this tool does not convert text to paths. Embedded raster images may stay large and do not gain detail when enlarged. Sanitizing an SVG can change its appearance: always check the preview. At most 20,000 elements and 100 levels of nesting are accepted. Stylesheets, filters and animation are also removed; supported inline presentation styles are retained.

Each batch is limited to 100 MB of input files and 200 MB of local results and previews. Choose fewer files if you reach this limit.

FAQ

What does optimization remove?

Unnecessary metadata, comments, formatting whitespace and selected redundant attributes. Shape geometry and internal references are retained conservatively; compare the result before using it.

Will optimization break my SVG?

It can change artwork that relies on removed scripts, external resources or unavailable fonts. Compare the sanitized original and optimized previews. Keep your original and do not use a result that looks wrong.

Why is my SVG still large?

Detailed paths and embedded raster images may dominate its size. Removing whitespace cannot make those elements much smaller, and optimization may save nothing.

Is my SVG uploaded?

No. Parsing, optimization and PNG export run locally. The preview does not load external resources referenced inside the SVG.

How sharp is SVG-to-PNG output, and why might export fail?

Vector shapes render at the selected width. Embedded bitmaps can blur when enlarged. Broken SVG, unavailable fonts or output dimensions above the limits can cause a problem; check the preview and choose a smaller width.