SVG Optimizer & PNG Converter
A tool that optimizes SVG files by removing unneeded metadata, comments, and redundant markup, and shows how much smaller the file gets. You can also convert the optimized SVG to a PNG at the width and height you choose. Everything runs in your browser.
Lower values reduce size further but may slightly distort fine shapes.
How to use
- Paste SVG code, or load an .svg file with "Open file" or by drag and drop.
- The SVG is optimized automatically, and the original size, optimized size, reduction, and a visual preview are shown.
- Adjust numeric precision, removal of width/height attributes, and indentation under "Optimization options", then save with "Download SVG".
- If you need a PNG, set the width and height (or 1x, 2x, 4x) under "Convert to PNG" and click "Download PNG".
About this tool
SVGs exported from design tools often contain information that isn't needed for display — editor metadata, comments, unused definitions, and overly precise decimals. Removing them can shrink files significantly without changing how they look, making web pages load faster.
Optimization uses the open-source svgo (MIT license). It shortens path data and color notation and removes unneeded attributes and groups, repeating the process several times to make the SVG as small as possible. Lowering "Numeric precision" reduces size further but can shift fine shapes, so adjust it while checking the preview.
PNG conversion uses your browser's Canvas, so you can export icons and logos as PNGs at any resolution. From loading to optimizing and exporting, your data is never sent to a server.
Frequently asked questions
Can optimization change how the SVG looks?
Usually not. However, setting "Numeric precision" too low can slightly shift fine shapes. Compare against the original in the preview.
What happens if I remove the width and height attributes?
The SVG scales to fit its parent element, making it easier to size with CSS. The viewBox is kept, so the aspect ratio is preserved.
Text or images are missing after converting to PNG.
If the SVG references external fonts or image files, browser restrictions prevent them from being drawn in the PNG. Convert text to outlines and embed images in the SVG before converting.
Are SVGs uploaded to a server?
No. Optimization and PNG conversion both happen in your browser.