SVG Viewer
Preview sanitized SVG markup and inspect basic SVG details.
SVG Viewer
Preview SVG markup in the browser after sanitizing it with DOMPurify. Inspect viewBox, dimensions, and element counts before using copied SVG code.
Good for
- Checking copied icons and small vector snippets
- Reviewing sanitized SVG markup
- Inspecting viewBox and dimensions before embedding
How to use SVG Viewer
The SVG viewer sanitizes SVG markup with DOMPurify, renders a preview, and shows basic details such as viewBox and dimensions.
Developers often use this page when they need svg viewer, svg previewer, svg preview online, and view svg online.
Privacy and data handling
This viewer sanitizes SVG markup in the browser before showing a preview.
- Normal use does not require uploading SVG markup to a server.
- DOMPurify may remove unsafe SVG content before previewing.
- Be careful with SVG from untrusted sources.
Examples
Preview a simple SVG
Input
<svg viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" /></svg>Output
Sanitized SVG preview with viewBox 0 0 100 100SVG markup is sanitized before previewing.
Steps
- 1Paste SVG markup.
- 2Review the sanitized preview.
- 3Copy sanitized SVG if it looks correct.
Common use cases
- Inspect copied SVG icons.
- Check viewBox and dimensions.
- Preview simple vector snippets before embedding.
Practical tips
- Sanitization may remove unsafe or unsupported markup.
- Review SVGs from untrusted sources carefully.
- Use fixed dimensions only when the embedding context needs them.
FAQ
Why sanitize SVG?
SVG can contain active or unsafe markup, so sanitizing helps reduce risk before previewing or copying.
Is this an SVG editor?
No. It is a viewer and inspector for markup, not a full vector editor.