What is an SVG optimizer?
An SVG optimizer removes everything in an SVG file that browsers don't need to draw it. SVGs exported from design tools often carry extra data such as editor settings, comments and very precise numbers, which can make them several times larger than necessary.
Paste markup or open a file, choose how many decimal places to keep and which extras to remove, and compare the original and optimized versions side by side. Download the smaller file, copy the code, or copy it as a CSS background data URI.
How to use the SVG optimizer
1.Open or paste an SVG
From Illustrator, Figma, Inkscape or anywhere else.
2.Choose options
Decimal places and what to remove.
3.Compare and save
Check the preview, then download, copy, or use it as a CSS background.
Example: an exported icon
A checkmark icon exported from a design app with metadata and six-decimal coordinates:
- Removed
- comment, metadata, editor attributes, empty group, unused ids
- Path data
- M 36.123456 62.987654 L 52.000000 … → M36.12 62.99L52 …
- Precision
- 2 decimal places
The icon looks identical but its file is a fraction of the original size.
Safe changes only
Design apps leave behind editor attributes, metadata, comments, empty groups and coordinates with six decimal places. The optimizer removes those, shortens path data and colours, drops attributes that only repeat a default value, and removes ids nothing refers to.
Default values are kept when a parent element sets something different, so inherited styles aren't broken. Title and description are kept unless you choose to remove them, because screen readers use them.
Frequently asked questions
How many decimal places should I keep?
2 suits most icons and illustrations; 1 is often fine for large shapes. Compare the previews if unsure.
Will it break animations or scripts?
Ids used by CSS, links or animations are kept. Check interactive SVGs after optimizing.
Why is my SVG barely smaller?
It was probably already optimized, or most of its size is an embedded photo, which this doesn't recompress.
Is my file uploaded?
No. It's optimized in your browser, and previews can't run scripts.
Related tools
SVG to PNG converter
Convert SVG to PNG, JPG or WebP at any size.
HTML Beautifier & Minifier
Indent messy HTML or minify it for production.
Image Compressor
Shrink JPG, PNG and WebP files by quality or to a target size in KB.
CSS Beautifier & Minifier
Format CSS readably or minify it safely.
JavaScript Beautifier & Minifier
Format JavaScript, or minify it with Terser.
SQL Formatter & Beautifier
Beautify or minify SQL for MySQL, PostgreSQL, SQL Server and more.
More Developer tools
JSON & data
CSV tools
Network & system
Web & API
Git & releases
Encoding & security
- Base64 encode & decode
- URL encode & decode
- JWT decoder
- Hash generator
- HTML entity encoder
- Text to binary
- Morse code translator
- Caesar cipher & ROT13
- Random string generator
- Secret key generator
- 2FA code generator (TOTP)
- Encrypt & decrypt text
- Encrypt & decrypt files
- SSH key generator
- Base32 encoder and decoder
- Unicode escape converter
- Nano ID generator
- JWT generator
Text & code
- Regex tester
- Text diff checker
- Cron expression explainer
- Lorem ipsum generator
- Markdown previewer
- Slug generator
- Strip HTML tags
- Unicode character inspector
- URL parser
- Markdown TOC generator
- cURL converter
- Whitespace visualizer
- Markdown link extractor
- Regex escape
- Regex match extractor
- Split text by regex
- HTML, CSS and JS playground
- Mock data generator
- Keyboard event tester
- ASCII table