SVG Optimizer
Reduce SVG markup while keeping a reviewable result. Control numeric precision and inspect the exported vector against the original artwork before publishing.
Browser-based · No account required · Copy and export
Your workspace
Developer toolsSVGs can contain scripts or external references. Preview is sandboxed as an image and SVG source is parsed as text; review downloaded SVG before using it in a trusted context.
How to use SVG Optimizer
- Paste SVG markup or choose a local .svg file.
- Select numeric precision, pretty printing and multipass processing.
- Optimize, compare UTF-8 byte counts and inspect the image. Download the result and check any external references.
When to use this tool
Reduce SVG source bytes while preserving the viewBox and IDs needed by an existing page. Compare the rendered artwork and any CSS or script references before replacing the source asset.
Smaller coordinates can change geometry
Numeric precision affects how many decimal digits are retained during applicable optimization steps. Fewer digits can save bytes but alter small shapes. The default preset is configured to preserve the viewBox and IDs so scaling and known references are less likely to break. Pretty output adds whitespace for review.
Worked example
Precision: 3
A coordinate such as 12.345678 may become 12.346.
Check the rendered shape at the sizes where it will be used.Limits and output checks
Optimization is not sanitization and does not establish that arbitrary SVG is safe to inline. SVGO loads as a browser module. Effects, fonts, styles and external references can behave differently in an image preview; compare the actual deployed use as well.
Reference: SVGO optimization options.
Frequently asked questions
Is viewBox preserved?
Yes. The default preset's viewBox removal is disabled.
Are IDs shortened automatically?
No. ID cleanup is disabled to preserve externally referenced names.
Why did the file get larger?
Pretty printing or particular transformations can increase size. The byte comparison reports the actual outcome rather than promising savings.
Compare visual output as well as bytes
Load an SVG and choose the supported optimization settings. Compare the preview and actual output before replacing an editable original.
Scope of this workflow
Optimization is not sanitization. Some transformations or pretty printing can increase size, while external effects and fonts can behave differently in an image preview.
SVG Data URI Converter - Encode & Decode · All developer tools · Privacy policy · Contact PixelOkay