SVG Compressor, Shrink SVG & See gzip / Brotli Transfer Size
Paste or drop an SVG and watch it compress. This tool optimizes the markup and then models the real shipping weight (raw, gzip and estimated Brotli) so you know the exact payload that crosses the wire, not just the on-disk number. 100% in your browser, never uploaded.
What is the svg compressor?
The SVG Compressor optimizes SVG markup and reports the real transfer size, modelling raw, gzip and estimated Brotli payloads so you know the exact bytes crossing the wire. Tune coordinate precision, watch before/after savings on a checkerboard preview, and copy. Free, fully client-side, with nothing uploaded.
The GigAI SVG Compressor is built around one number most tools ignore: the size that actually travels over the network. When an SVG is served on the modern web it almost never ships raw, your CDN or server compresses it with gzip or Brotli via Content-Encoding, and that compressed figure, not the on-disk byte count, is what lands on a visitor's connection and moves your Largest Contentful Paint. This tool first optimizes your SVG in the browser, stripping editor metadata, collapsing redundant groups and transforms, rounding coordinates to a precision you control and removing hidden layers, and then models the compressed payload: raw optimized bytes, an estimated gzip size, and an estimated Brotli size (Brotli typically edges out gzip on text markup by roughly 10–20%). A live transfer meter shows all three side by side, before and after, with the percentage saved, so you can see the win in the units that matter. A checkerboard preview renders the compressed result next to the code so you can confirm the artwork is pixel-identical before you ship it. Because SVG is such repetitive, highly compressible markup, the raw savings and the compressed savings are not the same number: a file that drops 40% on disk can drop far more once redundant path data is collapsed and the whole thing is gzipped, and this is the only GigAI tool that surfaces that distinction directly. To be honest about the model: the gzip and Brotli figures are estimates derived from byte count and character entropy, not a live compressor run in your tab, and the UI labels them as such. Treat them as a tight, comparative guide, and confirm the exact byte count with your server's real Content-Encoding for production budgets. Everything runs client-side, so unreleased logos, brand marks and internal icon sets never leave your machine. Close the tab and every trace is gone.
- Difficulty:
- Easy
- Typical time:
- ~10s
- Processing:
- 100% browser processing
Last updated
How to use the svg compressor
- 1
Add your SVG
Paste markup into the editor, drop a .svg file anywhere on the workspace, or click Import. A sample loads in one click if you just want to see the transfer meter move.
- 2
Tune the compression
Set coordinate precision and choose whether to keep the viewBox, strip width/height, remove IDs, drop title/desc or run multipass. The raw, gzip and Brotli estimates re-compute live as you change a knob.
- 3
Read the transfer meter
Glance at the before/after badges for raw, gzip and Brotli, confirm the percentage saved, and check the checkerboard preview to make sure the artwork is unchanged.
- 4
Copy or download
Copy the compressed SVG to your clipboard, download it as a .svg, or share a link that reopens the tool with your source pre-loaded.
What SVG Compressor includes
Real transfer-size meter
See raw optimized bytes, an estimated gzip size and an estimated Brotli size side by side: the compressed payload your server actually serves, not just the number on disk.
Optimize, then compress-model
The markup is optimized first (editor cruft, hidden layers and over-precise coordinates removed) so the compressed estimate reflects a file that's already been cleaned, the way a build pipeline would.
Tunable coordinate precision
Slide precision from lossless to aggressive and watch the gzip and Brotli estimates fall in real time. Fewer decimals means more repetition, which compresses harder. The preview shows when you've gone too far.
Before / after savings
Every figure is paired with its original so you can read the exact percentage saved on raw, gzip and Brotli: the win in the units your performance budget is measured in.
Live checkerboard preview
The compressed SVG renders on a transparency checkerboard beside the code, so you can confirm the artwork is pixel-identical before it ships, the safety net a size number alone can't give you.
100% client-side
Optimization and size modeling happen entirely on your device. Unreleased logos, brand marks and internal icons are never uploaded, stored or logged. A fallback optimizer keeps it working offline too.
Why use our svg compressor
Budget in the units that ship
Performance budgets are measured in transferred bytes, not on-disk bytes. Seeing the estimated gzip and Brotli payload lets you size an SVG against a real budget instead of guessing from the raw number.
Squeeze more than raw minifying shows
Because SVG is so repetitive, collapsing redundant path data and coordinates makes the file compress far better than the raw saving suggests. This tool surfaces that second, larger win most minifiers hide.
Confirm nothing broke
The live preview shows the compressed result next to the source, so the rare case where an aggressive precision clips a gradient or clip-path is caught before it reaches production.
No install, no upload, no config
Get compression-aware, SVGO-quality output without wiring up a build plugin or sending a confidential asset to a third-party server, paste, tune, copy.
Built for the way you work
From quick one-off fixes to daily workflows, see how people put this tool to use.
- Performance engineer
Fit an icon under a byte budget
Check the estimated gzip/Brotli payload of a hero SVG against your transfer budget and tune precision until it fits, without waiting on a full build to measure the real Content-Encoding size.
- Frontend developer
Shrink an inline logo
Compress the SVG logo you inline on every page and see how much the gzipped payload (the bytes that ship on every request) actually drops, nudging LCP in the right direction.
- Design systems engineer
Compare two export settings
Paste two variants of the same icon and compare their gzip/Brotli estimates to pick the export that compresses smallest before it enters the sprite or the React library.
- Email / Marketer
Squeeze a decorative SVG
Compress a decorative SVG hard enough to embed or attach without bloating the payload, using the transfer meter to confirm it's genuinely small once compressed.
Supported formats
Accepts SVG, and produces SVG, all processed locally in your browser.
- SVG
- SVG
Frequently asked questions
Recommended tools
SVG Optimizer
Minify and clean SVG files in your browser with SVGO, strip editor metadata, round coordinates, drop hidden layers and see the exact bytes and percentage saved. Nothing is uploaded.
SVG Minifier
Aggressively minify SVG online: collapse whitespace, strip comments, metadata and editor namespaces, and squeeze markup to a single line with a live before/after size and % saved. 100% in your browser.
SVG to Data URI
Convert SVG to a data: URI in your browser, URL-encoded or base64, and copy it as a CSS background, an inline <img src>, or the raw URI, with a live size comparison. Nothing is uploaded.
SVG Viewer
Open, paste or drop an SVG to view it on a checkerboard, light or dark canvas with zoom, live dimensions, a source-code pane and a full element/color report: 100% in your browser, nothing uploaded.
Image Compressor
Shrink JPG, PNG and WebP images without a visible quality drop. Set the quality yourself, or compress to an exact target size like 100 KB. Free, entirely in your browser.
SVG Code Formatter
Format and indent SVG source in your browser, turn a minified one-liner into clean, diff-friendly markup with consistent indentation and one element per line. Nothing is uploaded, and no data is removed.
Common problems, solved
Hit a snag? Here are quick fixes for the issues people run into most.
The gzip / Brotli number doesn't exactly match my server's response.
Those figures are estimates modeled from byte count and character entropy, not a live compressor: they're a tight comparative guide, not a promise. For a production budget, confirm the exact size from your server's real Content-Encoding response header. Expect the estimate to land within a small margin.
My SVG stopped scaling after compressing.
You almost certainly removed the viewBox. Turn 'Keep viewBox' back on. The viewBox is what lets an SVG scale to its container. For fluid sizing, keep the viewBox and enable 'Remove width/height' instead.
Raw dropped a lot but gzip barely moved (or vice-versa).
That's expected: compressed size tracks repetition, not raw bytes. Removing unique metadata cuts raw a lot but compresses away anyway. Collapsing repeated path data cuts the compressed size more than the raw figure suggests. Read both meters together.
A sprite icon or CSS reference went blank.
IDs were probably removed while something still points at them (a <use xlink:href>, a gradient, a clip-path or a CSS selector). Disable 'Remove IDs'. The engine can't see references that live outside the file.
Get the most out of it
Optimize aggressively for repetition: dropping precision a decimal or two often shrinks the gzip/Brotli estimate more than it shrinks the raw bytes, because repeated coordinates compress harder.
Budget against the Brotli figure if your CDN serves Brotli, it's usually the smallest of the three and the closest to what modern browsers actually download.
Keep the viewBox on and enable 'Remove width/height' when you want the SVG to scale fluidly to its container.
Leave 'Remove IDs' off for anything used in a sprite, referenced by <use>, or targeted by CSS/JS. The engine can't see external references.
Compress before converting to a data-URI: base64 inflates bytes and data-URIs are often served without compression, so start from the smallest possible markup.
What's new
Recent updates and improvements to the svg compressor.
Initial release, client-side SVG optimization with a raw / gzip / Brotli transfer meter, tunable precision, keep-viewBox / remove-dimensions / remove-IDs / remove-title toggles, multipass, live checkerboard preview, before/after savings, copy, download, undo/redo and shareable links.
Added the estimated Brotli figure alongside gzip, clarified in-UI that both are entropy-based estimates, and tuned the model against a corpus of real icon and logo exports.
Added a dependency-free fallback optimizer so the tool keeps working when the main engine can't load, plus keyboard shortcuts and a curated set of sample SVGs.
Keep exploring
Problems we solve
From the blog
Explore categories
Compare formats
By file type
Common tasks
Your privacy is built in
Your SVG is optimized and size-modeled entirely in your browser. It is never uploaded to any server. Nothing is stored, logged or transmitted, so you can safely compress unreleased logos, brand marks and internal icon sets. The gzip and Brotli figures are computed locally as estimates, and if the optimizer's chunk can't load a built-in fallback runs locally too. Close the tab and every trace is gone.
- Runs in your browser
- No uploads
- Nothing stored
Ready to try the svg compressor?
Free, private and instant. SVG Compressor runs right in your browser.