IMAGE STUDIO / COMPARISON
Clean or rasterize a self-contained SVG
Preserve local gradients while removing active and external SVG content.
On this page
Before you start
An SVG can depend on more than its visible shapes. Fonts, linked images, stylesheets and active elements affect portability. The Studio Lab SVG tools sanitize the source before rendering, so prepare a self-contained asset and review what changes before choosing a cleaned vector file or fixed-size raster export.
Follow the steps
Keep essential shapes and local definitions inside the source SVG.
Use SVG Cleaner to inspect removals and cleaned markup.
Review local gradients, masks and text in the safe preview.
Choose a cleaned SVG or rasterize at deliberate pixel dimensions with SVG to Image.
On mobile, open the settings icon for options. The main action stays near the bottom. Keep the original image for revisions.
Prepare a self-contained file
Keep required vector shapes and local definitions inside the SVG. External fonts, stylesheets and linked images can be removed. The current sanitizer also removes non-fragment image references, including data URLs. Outline essential text in the source editor if exact lettering matters, and review the safe preview before downloading.
Understand conservative cleanup
The cleaner removes scripts, comments, metadata, event handlers and external resources. Local fragment references such as url(#gradient) and quoted equivalents are retained. Accessible titles are preserved. Documents containing entity declarations are rejected. This is conservative sanitization, not geometric minification or a promise to repair every SVG.
Inspect what changed
The safe source preview is sanitized before decoding. Open the cleanup report to compare source and cleaned markup and see removal counts. A missing external asset is expected: make the original self-contained and retry. Inspect fills, masks and gradients before downloading the cleaned SVG.
Export pixels when needed
SVG to Image lets you choose raster dimensions, fit behavior and an export format. Use PNG for transparency; JPG requires an opaque background. The raster output is bounded by the workspace pixel budget. Preserve the original SVG if you may need another size later.
WORKED EXAMPLE
A practical example
- Start with
- An icon that uses a local gradient and text.
- Try these settings
- Inspect cleanup, then rasterize at the required size if the recipient needs PNG.
- What to expect
- Local definitions can remain; exact font appearance depends on supported source artwork and browser fonts.
This example explains the workflow. It is not a recorded test or a guarantee about your file.
Check the downloaded result
- Inspect markup removals as well as the visible result.
- Open the downloaded file in the destination viewer and retain the source SVG.
Questions and troubleshooting
Will embedded image data URLs be preserved?
Do not assume so. The current sanitizer removes non-fragment linked resources; prepare required artwork in a compatible source workflow.
Why use the original SVG for another size?
It preserves the vector source. Enlarging a small raster export cannot recreate that vector information.
Ready to try it?