Skip to main content
NyankoTools

SVG Optimizer (SVGO)

Choose an SVG file or paste SVG code to remove unnecessary data and make it smaller with SVGO. To resize or compress raster images, try the Image Resizer. To embed an SVG in CSS or HTML, use the Image to Base64 Converter.

🔒 Runs in your browser · Your data is never sent to a server

You can also drag and drop an SVG file here

Pick an .svg file, or paste SVG code into the box below.

Optimization options

Notes

  • Optimization uses SVGO. It removes metadata, unused attributes and whitespace, and adjusts numeric precision, which can slightly change very fine shapes.
  • Compare the before and after in the preview before using the result.
  • Files are processed in the browser and are never sent to a server.

Glossary

SVG

An XML-based vector image format that stays sharp at any size and is widely used for logos and icons. SVGs exported from design tools often contain editor metadata and other data that is not needed for rendering.

SVGO

An open-source SVG optimizer. It removes comments and unused attributes and shortens path data to reduce file size without changing how the image looks.

viewBox

An attribute that defines the SVG coordinate system. If you drop width/height and keep only the viewBox, the image scales freely to fit its container.

FAQ

Will optimizing change how the SVG looks?

Normally not. SVGO strips editor metadata, unused attributes and whitespace. It also reduces numeric precision, which can affect very fine shapes, so always check the result.

Does it work on PNG or JPEG?

No. It is SVG-only. Use the image resizer for bitmap images such as PNG and JPEG.

How can I embed the optimized SVG in CSS?

Convert it to a Data URL with the image-to-Base64 tool, then use it in CSS url() or similar.

Share this page

↑↓ Select Enter Open Esc Close