SVG Viewer
Runs locallyInspect sanitized SVG graphics with zoom, background toggle, dimensions and PNG export.
What is SVG Viewer?
Safely inspect SVG files with DOMPurify sanitization, zoom controls, transparent checkerboard / dark / light background toggles, viewBox diagnostics, and instant PNG export.
How to use SVG Viewer
- Step 1
Paste SVG code or drop an .svg file.
- Step 2
Toggle background and zoom to inspect edges.
- Step 3
Optimize with SVGO or download as PNG/SVG.
Features
- DOMPurify sanitized SVG rendering
- Checkerboard, dark, and light canvas backgrounds
- Zoom controls and viewBox inspection
- Export to PNG or React JSX
Example
Input
<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/></svg>
Output
Sanitized SVG preview + PNG export
Inspects geometry safely without executing embedded scripts.
Frequently asked questions
Is SVG Viewer safe for untrusted SVGs?
Yes, SVGs are sanitized with DOMPurify before rendering.
Can I export the preview as PNG?
Yes, click Export PNG in the preview toolbar.
Can I optimize the SVG here?
Yes, switch mode to Optimize (SVGO).
Are SVGs uploaded?
No, everything runs locally.
Related tools
SVG Optimizer
Optimize SVG with SVGO, preview safely and export SVG, React, Vue, Data URI or Android Vector.
SVG to JSX / React Converter
Convert SVG markup into clean React TSX/JSX or Vue components with camelCase attributes.
Image Compressor & Converter
Compress, resize and convert PNG, JPEG and WebP images locally with batch ZIP export.