Skip to content
DevKit Labs

SVG Viewer & Optimizer

Preview SVG markup, see its size, and copy a minified version — safely, 100% in your browser.

SVG markup
Preview
Preview appears here.

About SVG Viewer & Optimizer

Paste SVG markup or open a .svg file to preview it on a transparency checkerboard, with its dimensions and byte size shown. A minified version (comments and extra whitespace removed) is generated so you can copy a smaller SVG and see how much you save.

The preview renders the SVG as an image, which means any scripts embedded in the SVG cannot run — so it's safe to view SVGs from anywhere. Everything happens locally in your browser; nothing is uploaded.

Preview & shrink

Input
<svg …><!-- icon --><circle …/></svg>
Output
120 × 120 · 214 B → 168 B minified (−21%)

The preview is rendered as an image, so embedded scripts never execute.

Frequently asked questions

Is it safe to preview an untrusted SVG?

Yes. The SVG is rendered as an <img>, which does not execute scripts embedded in the file, so viewing it can't run malicious code against this page.

What does minifying remove?

Comments and unnecessary whitespace between tags. For heavier optimization (removing metadata, rounding paths) use a dedicated SVGO-style optimizer.

Can I open a file?

Yes. Open a .svg file or paste the markup — both preview the same way.

Is my SVG uploaded anywhere?

No. Previewing and minifying happen entirely in your browser.

Related tools

References