Monitoring
Solutions
Resources
Free Tools
Pricing
Free Tools / Code formatters / SVG Viewer

SVG Viewer

Paste SVG code or open a file to see it rendered — safely, without running any script inside it. Check its dimensions, spot problems, shrink it by removing editor junk, and save it as an optimized SVG or a PNG.

Preview
Preview of the SVG
Optimize

The SVG is rendered in your browser as an image, which never runs scripts, and nothing is uploaded.

Looking at an SVG safely

SVG is XML that describes shapes, so an icon or logo is a small text file you can read and edit. It is also a document format that can carry scripts, event handlers and links to other files. How it is displayed decides what it can do: an SVG shown with <img> or as a CSS background is a plain picture — no script runs and nothing external loads — while an SVG opened directly or pasted inline into a page behaves like a web page.

This viewer always renders through an image, so it is safe for SVG files from anywhere, and it lists the things that would matter if you used the file in another way: scripts, event handlers, external references and a missing viewBox.

Why SVGs from design tools are so big

Inkscape, Illustrator, Sketch and Figma save their own information into the file: editor namespaces, layer names, grid settings, document metadata and numbers with six decimal places. None of it changes the picture. Removing it often halves the file, and rounding coordinates to two decimals is invisible at any normal size.

viewBox

Defines the coordinate system. With it, the SVG scales to any width without blurring; without it, it stays at a fixed size.

width and height

Optional when there is a viewBox. Remove them to let CSS decide the size, keep them to give the image a default size.

title and desc

Read by screen readers when the SVG is inline. Keep a title on meaningful icons; remove it from decorative ones.

PNG export

For places that do not accept SVG — app stores, social cards, some e-mail clients. Export at 2× or more for sharp results on high-density screens.

Frequently asked questions

Is it safe to open an SVG from an unknown source here?

Yes. The SVG is displayed as an image, and browsers never run scripts or load external resources inside an SVG shown that way. The viewer also warns you if the file contains scripts or event handlers.

How do I convert SVG to PNG?

Paste or open the SVG, choose the export size — 2× for retina screens or a fixed width — and click Download PNG. With the transparent background selected, the PNG keeps transparency.

Why does my SVG not scale?

It probably has width and height but no viewBox. Add viewBox="0 0 W H" with its original width and height, and then size it with CSS.

Will optimizing change how the SVG looks?

Not with the defaults. Comments, metadata and editor data are not drawn, and rounding to two decimals is far below a pixel. Rounding to 0 decimals can visibly shift small icons, so check the preview.

Related free tools

A calculator answers once. Monitoring answers every minute.

Upzilla checks your sites, servers and APIs around the clock and alerts you the moment something breaks. 10 monitors free, no card required.

Start monitoring free →