Handitab

SVG Viewer

Paste SVG code to see it rendered, check its width, height, and viewBox, count its elements, and download it as an SVG file.

About SVG Viewer

An SVG viewer renders Scalable Vector Graphics code so you can check a file without opening a design program. This tool passes the code through the DOMPurify library first, which removes scripts and event handlers, and then draws it in the page. It reports the width, height, and viewBox attributes and counts elements by type. Because of the sanitizing step, SVG files that rely on embedded scripts or external resources will not animate or load them.

How to use SVG Viewer

  1. Type or paste into the "SVG code" box, or press "Use example" to try it with sample data.
  2. Set "Preview background" if the defaults do not fit.
  3. The result appears below and updates as you type.
  4. Copy the result with the copy button, or download it as a file where that is offered.

Questions about SVG Viewer

What is the viewBox attribute?

The viewBox defines the coordinate system of the drawing as four numbers: minimum x, minimum y, width, and height. The browser scales that region to fit the width and height of the element, which is what makes an SVG resizable.

Runs in your browser. Page last updated .

More image tools

All 73 image tools