SVG Viewer: View and Check SVG Files Online

Developer Tools

Paste SVG code or open an .svg file and see it rendered next to the code, with its size, viewBox, a cleanup and PNG export.

Download PNG
OptionsBackground
Zoom
SVG code (paste or drop a file)234 B
Preview24 × 24 px
Nothing to show yet
Rendered24 × 24 px · viewBox 0 0 24 24 · 3 elements · 234 B

The preview is drawn as an image, so scripts and event handlers inside an SVG never run on this page, and remote images and fonts are not fetched.

Processed in your browser. A copy of each run is saved to your past runs so you can reopen it. Privacy

About

What the SVG Viewer does

The SVG Viewer renders SVG code or an .svg file next to its source, so you can see what an icon or illustration looks like and check its width, height and viewBox. It cleans up the comments, metadata and editor attributes that tools like Inkscape leave behind, and downloads a PNG at 1×, 2× or 4×. The preview is drawn as an image, so scripts inside an SVG never run. It is for developers, designers and anyone sent an SVG they need to check.

Steps

How to use it

  1. 1Paste SVG code into the left panel, drop an .svg file on it, or press Open .svg.
  2. 2Check the preview on a checkerboard, white or dark background, and zoom to fit or to 50–400%.
  3. 3Read the size, viewBox and element count in the status line; warnings appear for scripts or remote images.
  4. 4Press Clean up code to strip editor bloat, or download a PNG at 1×, 2× or 4×.

Example

A real run

Input

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" viewBox="0 0 24 24" inkscape:version="1.3">
  <metadata><rdf:RDF/></metadata>
  <circle cx="12" cy="12" r="10" fill="#4F46E5"/>
  <path d="M8 12l3 3 5-6" stroke="#fff" stroke-width="2" fill="none"/>
</svg>

Output

Rendered: 24 × 24 px · viewBox 0 0 24 24 · 5 elements · 399 B
After cleanup: 3 elements · 204 B

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="#4F46E5"/><path d="M8 12l3 3 5-6" stroke="#fff" stroke-width="2" fill="none"/></svg>

A 24 × 24 icon exported from Inkscape. Clean up removed the XML declaration, the comment, the metadata block and the inkscape namespace and attribute, roughly halving the file without touching the circle or the path.

Options

Every setting, and when to use it

Background: checker, white or dark
The checkerboard shows which parts are transparent. White and dark show how an icon will look on light and dark interfaces, which catches black icons that vanish on a dark header.
Zoom: fit, 50%, 100%, 200%, 400%
Fit scales the drawing to the preview area; small icons are enlarged so details are visible. The percentages draw it at a multiple of its own size, useful for checking pixel alignment at 1× and 2×.
Clean up code
Removes the XML declaration, comments, <metadata>, and the Inkscape, Sodipodi, Sketch and similar editor namespaces and attributes, and joins lines between tags. It shows the size before and after. It is a safe, basic cleanup, not a full optimizer: path data and shapes are not rewritten.
Download PNG at 1×, 2× or 4×
Draws the SVG onto a canvas at its own size times the factor and saves a PNG with transparency. 2× and 4× suit high-density screens, app icons and slides. The conversion happens on your device.

Good to know

Common problems and limits

Files up to 10 MB. The preview is an image, so references to images or fonts on other websites are not loaded (browsers block them in SVG images), and those parts are missing from both the preview and the PNG. A warning counts such references.

Scripts and event handlers in an SVG do not run here. They would run if the same file were opened directly in a browser tab or pasted inline into a web page, which is why a warning appears when the code contains any.

Text drawn with fonts that are not installed on your device falls back to a default font in the preview and the PNG. Convert text to paths in the design tool if exact lettering matters.

CSS and SMIL animations play in the preview; the PNG captures a single frame. An SVG with no width, height or viewBox renders at the browser default of 300 × 150 pixels.

Audience

Who uses it

  • Front-end developersCheck an icon from a design hand-off before committing it, strip editor attributes, and inline small ones as Base64 data with the Base64 encoder.
  • DesignersSee how an exported SVG looks on white and dark backgrounds and confirm the viewBox crops the artwork correctly.
  • Ecommerce sellers and marketersOpen a logo SVG from a vendor without design software and export a PNG for a marketplace listing, then size it with the Image Resizer.
  • Crafters using cutting machinesPreview an SVG cut file before importing it into Cricut Design Space or similar software.

FAQ

Frequently asked

What program opens SVG files?

Every modern browser opens SVG files: Chrome, Edge, Firefox and Safari display them directly. To edit them, use a vector editor such as Inkscape (free), Adobe Illustrator, Affinity Designer or Figma. To just look at one and check its size, paste or drop it on this page.

How do I convert an SVG to PNG?

Open the SVG here and press Download PNG at 1×, 2× or 4×. The drawing is rendered on a canvas in your browser at its own size times the factor and saved as a transparent PNG; nothing is uploaded. Pick 2× or 4× for sharp results on high-density screens.

Can Cricut open SVG files?

Yes. Cricut Design Space imports SVG files through its image upload, and SVG is the usual format for cut files because shapes stay sharp at any size. Previewing the file here first shows whether the shapes and viewBox are what you expect before you upload it.

Is it safe to open an SVG file?

SVG is XML that can contain JavaScript, so an untrusted SVG opened directly in a browser tab or inlined in a web page can run code. Viewing it as an image, as this page does, is safe because browsers never run scripts inside SVG images. A warning here tells you if the file contains scripts.

How do I view an SVG file on a Mac?

Select the file in Finder and press the Space bar to preview it with Quick Look, or open it in Safari. To check its code, size and viewBox side by side, drop it on this page instead.

Why does my SVG show up blank?

The most common causes are a missing xmlns="http://www.w3.org/2000/svg" on the root element, shapes with fill or stroke set to none, a viewBox that crops the drawing out of view, or artwork made of images loaded from other websites. The status line and warnings here point to most of these.

What does the viewBox in an SVG mean?

The viewBox gives the drawing's own coordinate system as min-x, min-y, width and height, for example 0 0 24 24. The width and height attributes set how large it appears. Keeping a viewBox and changing only width and height scales the drawing without distortion.

Automation: an MCP tool svg_info(svg) → {width, height, viewBox, bytes} and an n8n node are planned (the diff output is text).

Built and maintained by Radhika SinghLast updated Questions: hello@operativez.ai