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
- Type or paste into the "SVG code" box, or press "Use example" to try it with sample data.
- Set "Preview background" if the defaults do not fit.
- The result appears below and updates as you type.
- 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 .