SVG safety boundary

Safe SVG inspection: why a preview should be bounded and sanitised

An SVG can contain much more than visible vector shapes. Scripts, event handlers, external resources, complex filters, and deep markup can make a casual preview unsafe, slow, or misleading.

Use SVG Viewer →

On this page
Browser-local image workspace with crop, color and measured-result controls
Image preparation is useful when the chosen pixels, crop, format and measured output remain visible.

A vector file is also a document

SVG is XML-based markup, so it can express references, style rules, animation, and active behaviour in addition to paths and shapes. A safe preview needs to reduce that surface before it renders a user-selected file.

Aftermath sanitises active or external content and applies source-size and structural-complexity bounds before preview. That is a safer inspection path, not a promise that every original SVG feature will survive unchanged.

Preview fidelity and safety can pull in different directions

A faithful rendering may rely on scripts, external images, fonts, CSS, filters, or browser-specific behaviour. A conservative preview may remove those features. The difference should be visible to the person deciding whether the file is safe to use.

For production artwork, keep the original source and review it in an appropriate trusted design workflow before replacing it with a cleaned copy.

A conservative SVG workflow
StepWhy it existsWhat it does not promise
Inspect a bounded sourcePrevents an unexpectedly large or complex preview workloadUniversal support for every SVG feature
Remove active/external contentAvoids loading or running untrusted content in the previewIdentical visual output
Export a raster copyCreates a simple local PNG representationEditable vector semantics or source equivalence

Optimisation is not a blanket quality claim

Removing comments, metadata blocks, external references, and unnecessary whitespace can make a separate SVG copy easier to inspect. It does not guarantee the smallest possible file or preserve advanced behaviour that a conservative tool intentionally avoids.

Open the output before shipping it. A valid XML file can still be the wrong visual asset for the target environment.

Use the right tool for the right risk

A browser-local sanitised preview is useful for opening an unfamiliar SVG cautiously. It is not a substitute for code review, malware analysis, licensing review, or a full-featured design application when those are required.

Use a local tool

Related Aftermath tools