SVG proof 01

Free Online SVG Compressor

Browser-local workstation

Proofing table ready

Drop one SVG onto the proofing table

SVG files up to 4 MiB stay in this browser tab

You can also paste complete SVG markup anywhere in this panel

Optimization preset
Original SVG
Add an SVG to reserve this fixed preview
Optimized SVG
Add an SVG to reserve this fixed preview

Definition

What an SVG compressor actually does

An SVG compressor is a browser tool that rewrites valid vector markup into a cleaner, usually smaller form. It can remove comments and editor metadata, normalize attributes, and simplify selected values while preserving the visible artwork. GlyPho also shows the exact byte difference before you download the optimized SVG.

SVG is text-based XML rather than a fixed grid of pixels. A design application, generator, or hand-authored component can therefore include useful shapes alongside comments, editor namespaces, verbose numbers, repeated formatting, and other code that a browser does not need to draw the image. Compression targets that markup overhead. It does not turn the artwork into a JPEG, lower its pixel resolution, or replace editable paths with a screenshot.

The best SVG minifier is predictable about what it changes. GlyPho validates one SVG root, rejects unsafe external references, runs a defined SVGO plugin set in a Web Worker, then gives you an original and optimized preview. You can inspect actual UTF-8 bytes, copy the output, or download a new file. Because results vary with every source, the page reports your measured result instead of promising an average percentage.

Two measured presets

Safe or Balanced: choose the editing boundary

Both presets remove known clutter and keep the same input validation. The difference is how far the optimizer goes when rewriting numerical and path data. Start with Safe when authoring fidelity matters most; compare Balanced when delivery weight matters more.

ConsiderationSafe presetBalanced preset
Best starting pointDesign-system sources, accessible icons, animated assets, and files that may return to an editor.Reviewed website assets, production exports, and files where a more compact payload is useful.
Cleanup appliedRemoves comments, document declarations, metadata, editor namespace data, scripts, and event attributes; cleans and sorts attributes.Includes Safe cleanup, then compacts numerical values, colors, path data, and transforms with a defined precision.
Preservation contractKeeps viewBox, IDs, classes, accessibility links, internal references, masks, gradients, CSS, and SMIL animation.Keeps the same protected structures while rewriting eligible geometry more compactly.
Review stepCompare previews and code when the file depends on editor conventions or runtime hooks.Compare previews carefully at intended sizes, especially for detailed paths and precise transforms.

Visible contract

What the optimizer removes and what it keeps

Compression should not be a mystery. These boundaries describe the current presets, so designers and developers can decide whether the optimized file still fits the next step in their workflow.

Removed or normalized

  • XML declarations, doctypes, comments, metadata elements, and editor-specific namespace data that do not draw the artwork.
  • Scripts and inline event-handler attributes. Their removal is reported with a visible warning rather than hidden.
  • Redundant attribute formatting; attributes may also be placed in a stable sorted order for cleaner code review.
  • With Balanced, unnecessary numerical precision plus eligible color, path, and transform verbosity.

Protected for real workflows

  • The viewBox and scalable vector structure, so the file remains responsive instead of becoming a fixed-size raster image.
  • IDs, classes, data hooks, and internal fragment references used by CSS, components, masks, gradients, and clipping paths.
  • Accessible title and description relationships such as aria-labelledby, including the IDs those relationships need.
  • Embedded CSS and SMIL animation structures that stay within the accepted local-reference safety boundary.

From source to shipment

Figma, AI, and web SVG workflows

An SVG optimizer belongs between a reviewed source and a real destination. Use the preview and byte readout as a quality gate, then keep the editable original whenever future design changes are likely.

01

Figma and Illustrator exports

Export the selected vector artwork with a useful viewBox, then open it here before handoff. Safe can clear comments, metadata, editor namespace residue, and attribute noise without deleting protected IDs or accessibility structure. Download the optimized delivery copy, but archive the editable design source separately so future art direction does not depend on minified production markup.

02

AI-generated SVG inputs

A generator may produce valid SVG with long decimal values, verbose paths, repeated transforms, comments, or unnecessary metadata. That makes the generated file an input source, not evidence that compression itself is AI. Validate and preview the artwork first, try Safe, then compare Balanced if the geometry remains visually faithful. Inspect brand shapes and small details before publishing.

03

Web and component delivery

Optimize SVG after design approval and before adding it to a public assets folder, icon package, email template, or inline component. Keep IDs stable when CSS, gradients, masks, or JavaScript refers to them. Measure the downloaded bytes in the same form you will ship; HTTP compression, bundling, and caching are separate web-performance layers that still matter.

Fixture proof

Real before-and-after byte counts

These examples come from repository fixtures processed by the same optimizer used in the tool. They demonstrate how source structure and preset choice affect a result; they are not an average rate or a promise for unrelated SVG files.

figma-illustrator.svgSafe preset

Editor export with Safe cleanup

Original SVG374 B
Optimized SVG199 B

175 B saved (46.8%). The defined Safe plugins remove editor residue and normalize attributes while retaining the fixture's vector structure.

ai-generated.svgBalanced preset

Generated geometry with Balanced cleanup

Original SVG306 B
Optimized SVG156 B

150 B saved (49.0%). Balanced adds numerical, color, path, and transform cleanup to the same protected optimization boundary.

Measurements use UTF-8 byte length. The Figma/Illustrator fixture includes comments, editor namespace data, and formatting overhead. The AI-generated fixture contains verbose geometry. A nearly optimized file can show little or no saving, and the interface will say so instead of manufacturing a positive number.

Local by design

Your SVG stays in the browser

This free online SVG compressor does not need an account or upload endpoint. File reading, validation, optimization, comparison, preview, copy, and download are coordinated in the current browser session.

No file upload

The selected file or pasted markup is read locally. The optimizer does not send the SVG to GlyPho for processing.

Worker isolation

Optimization runs in a browser Web Worker, keeping heavier parsing away from the main interface thread.

External resources rejected

SVGs that attempt to reference external stylesheets, images, URLs, or unsupported embedded content are rejected before optimization.

You control the output

Nothing is published automatically. Compare the previews, then choose whether to copy or download the optimized code.

Questions at the proofing table

SVG compressor FAQ

Practical answers about supported inputs, visual quality, safety, editing, measurement, and browser-local processing.

Is this SVG compressor free and online?

Yes. You can compress one SVG at a time in a modern browser for free, with no sign-up. The current file limit is 4 MiB. Processing is local to the tab, so the tool does not need to upload your artwork before showing the result.

Does optimizing an SVG reduce visual quality?

The presets rewrite markup rather than rasterizing the image. Safe focuses on non-visual residue. Balanced also compacts eligible numerical and geometry data with defined precision. Always compare both fixed-height previews and inspect important artwork at its intended size before replacing a production file.

What happens to IDs, classes, CSS, and accessibility text?

Both presets preserve IDs, classes, data hooks, internal fragment references, embedded CSS, viewBox, title and description elements, and aria-labelledby relationships. That contract supports real component, gradient, mask, animation, and accessible-icon workflows. External references remain outside the accepted boundary.

Why did my optimized file become only slightly smaller?

The source may already be concise, or most bytes may represent geometry and embedded raster data that the selected preset intentionally keeps. GlyPho reports the real original and optimized UTF-8 sizes. It does not claim savings when output is unchanged or larger.

Can I paste SVG code instead of choosing a file?

Yes. Paste complete markup into the tool panel, select a preset, and optimize it. The output receives a sensible download name, while copy lets you move cleaned markup directly into a component or source file after review.

Is SVGO using AI to compress my file?

No. AI tools may be the source of an SVG, but this compressor uses explicit SVGO plugin lists and deterministic validation rules. The page describes AI-generated artwork only as one possible input workflow; it does not represent SVGO as an AI compression system.

Should I keep the original SVG?

Yes when the file may return to a design editor, needs future path changes, or carries authoring information outside the delivery contract. Treat the optimized SVG as a reviewed production copy and retain the editable source in your normal design or version-control workflow.