All free toolsImage

Minify SVG files, strip editor metadata, and clean path coordinates.

17free image tools

Local processing limits: 50 MB per file, 20 files and 100 MB per selection. Some tools have stricter limits. Large or complex files can still exceed device memory.

Your files stay private·Nothing is stored or retained
Free, no sign-up·No watermark

Input

⬆
Drop an SVG file
Accepted: .svg, image/svg+xml

Options

Before

After

Processing and privacy: SVG Optimizer

File processing runs in your browser. Your selected file is not uploaded by this tool. The website still receives ordinary page and asset requests. Keep your browser updated and review the output before sharing it.

File sizes and processing time depend on the tool and your device. Safety limits may apply; unlimited file sizes and instant completion are not guaranteed.

Complete Master GuidePublished by Cortexis Solution Hub Pvt Ltd Document Research Lab • 10 min read

How to Use an SVG Optimizer: Strip Editor Bloat, Round the Numbers, and Keep the Drawing Intact

You exported a simple checkmark icon and found a wall of namespaces, metadata and coordinates like 60.000000. An SVG optimizer removes everything the drawing does not need, so the file gets smaller and the code becomes something you can read. This guide shows how to optimize SVG files for free, what each option really removes, how far to round the numbers before curves start to wobble, and when to keep the parts an automatic cleaner would throw away.

A drafting compass holding a sharpened pencil over blue grid paper
Same icon, less code. The Before and After previews sit side by side so you can confirm nothing changed but the size.

1. Why Is My SVG File So Big?

SVG file too large for a shape that looks trivial? The drawing is rarely the cause. Design software writes the file for itself first, and the weight is in everything around the drawing:

  • Editor bookkeeping. If your Inkscape SVG has extra code, it is usually a sodipodi:namedview block, inkscape:label attributes on every layer and a string of namespace declarations. No website needs any of it.
  • Illustrator SVG export bloated? It typically carries a generator comment, data-name on groups, enable-background and xml:space="preserve". Figma and Sketch add their own versions.
  • Metadata. An RDF block, an XML declaration and a DOCTYPE.
  • Over-precise numbers. 48.123456 where 48.123 draws the same thing.
  • Inline styles and defaults. Values such as fill-opacity:1 that are already the default.

That is the short answer to why is my SVG file so big. The tool above loads with a small Inkscape icon that has most of these problems; press Optimise on it to watch them disappear.

2. How to Optimize SVG Online Free in Four Steps

Here is how to reduce SVG file size with the SVG optimizer online free at the top of this page. No account, no daily limit.

  1. Add your SVG. Drop a .svg file onto the “Drop an SVG file” panel, or paste the markup straight into the text box. Pasting is the quickest way to minify SVG online.
  2. Check the options. Eight cleaning options are ticked by default and suit most files. Decimal precision starts at 3. Tick Pretty print output if you want readable, indented code instead of one compact line.
  3. Press Optimise. You get the size before, the size after and the percentage saved, next to Before and After previews of the drawing.
  4. Compare, then copy or download. If the After image matches the Before image, use Copy to paste the code into your project, or Download to compress SVG online into a new file named yourfile.min.svg. Your original is not touched.

A quick look at the two previews beats finding a broken icon after it has gone live. If the size barely moves, the file was already lean; the savings come from editor data, metadata and long decimals, so a hand-written SVG has less to lose than a fresh export.

3. What the SVG Cleaner Removes, Option by Option

Here is what this SVG cleaner does with each option.

  • Remove unused IDs. Editors give every shape an ID such as path1. This option drops them, but keeps any ID that something else points to: a gradient or clip path referenced with url(#...), a <use> link, or a selector inside a <style> block. That is the safe way to remove unused IDs from SVG code.
  • Remove comments. Generator notes and other comments.
  • Remove <metadata>, <title>, <desc>. This is how to remove metadata from SVG files in one click. It also removes titles and descriptions, which is covered in the next section.
  • Remove editor data. Elements and attributes in the Inkscape, Sodipodi, Illustrator, Adobe, Sketch, Figma, Serif, Krita and RDF namespaces, plus enable-background, data-name and xml:space="preserve" outside text. Use it to remove Inkscape metadata from SVG exports and to optimize Figma SVG export files.
  • Remove default attribute values. Values that change nothing, such as fill-opacity="1", stroke-width="1", stroke-miterlimit="4" or display="inline".
  • Collapse empty and attribute-less groups. Removes empty groups and unwraps groups with no attributes.
  • Round numbers. Rounds path data, points, transforms, the viewBox and sizes to your chosen precision, tidies the spacing inside path data and drops transforms that do nothing.
  • Convert style="" to attributes. This is how to remove inline styles from SVG shapes: style="fill:#2e6bff" becomes fill="#2e6bff", which your own stylesheet can override. A style is converted only when every declaration is a presentation property such as fill or stroke; anything else stays as written.

A few things happen every time: the XML declaration, DOCTYPE and the redundant version attribute go, whitespace between tags is collapsed, and six-digit hex colours written as attributes are lower-cased or shortened (#FFFFFF becomes #fff). Colours inside a style value or a <style> block are left as written. And if your goal is how to clean up SVG code for hand editing rather than for size, tick Pretty print output. It turns the tool into an SVG pretty print formatter that indents each element by two spaces, so a minified file becomes readable again.

4. Decimal Precision and Accessible Names: The Two Trade-offs

Two settings can change the result, and they are why people search SVG looks different after optimizing.

Precision. To reduce SVG decimal precision, set the Decimal precision field anywhere from 0 to 8. The default of 3 is a safe choice for icons and logos drawn on a small grid. Large illustrations can often go down to 1 or 2. Too low, and curves develop flat spots and joins stop meeting. If the After preview shows any of that, raise the precision and press Optimise again.

Title and description are accessibility, not bloat. The metadata option is on by default and also removes <title> and <desc>. For an icon that works as a button, a chart, or a logo that is a link’s only label, those elements are its accessible name, which screen readers announce, so untick the option for those files. The WCAG guidance on non-text content explains when an image needs a text alternative.

5. Icons, Inline HTML, Logos and Cutting Machines

How to optimize SVG for web use depends on where the file ends up. Four situations cover most searches.

  • Icon sets. To optimize SVG icons for website use, keep every option on at precision 3, run each icon through, and confirm the previews. Untick the metadata option for any icon that needs a title.
  • Inline code. To minify SVG for inline HTML, leave pretty print off and use Copy. For a React component, note that the output is still SVG markup, not JSX: attributes such as stroke-width and class keep their SVG spelling, so rename them to strokeWidth and className when you paste the code into a component. Converting styles to attributes makes the icon easier to recolour from CSS, and the colour format utilities help when a brand colour arrives in a different notation.
  • Website logos. Clean them here, then embed them as a data URI with the Base64 encoder or percent-encode the markup with the URL encoder.
  • Cutting files. To optimize SVG for Cricut or laser cutter projects, remove the editor data and metadata but keep precision at 3 or higher. Cut lines follow the path exactly, so a rounding error can become a notch in vinyl or wood.

Working on a client logo under NDA is also covered: your files are never stored on our servers and nothing is retained after your session.

6. What This SVG Minifier Does Not Do

This SVG minifier is a focused cleaner. It does not redraw your artwork:

  • No path rewriting. It does not merge paths, convert shapes into paths, simplify curves, minify CSS inside <style> or delete hidden elements. If a file is still heavy after cleaning, the weight is usually in the path data itself, and redrawing or simplifying it in your design software is the fix.
  • One file at a time. There is no batch mode for a folder of icons, and no other tool on the site does it either, so a large icon set means one run per file.
  • No JSX output. It returns SVG markup, not a ready-made React component; attribute names need renaming by hand, as described above.
  • SVG out only. For a PNG or JPG version, use the vector converter, which also moves between SVG, EPS, AI and PDF; DXF and DWG drawings belong in the CAD converter. For site icons and app icons, the favicon generator builds the set for you.
  • No SVGZ. It does not produce gzip-compressed .svgz files, and the archive creator makes ZIP or TAR archives rather than SVGZ. Most web servers can compress SVG as they send it, so a clean plain SVG is usually all a website needs.
  • Not for photos. PNG, JPEG and WebP files are compressed differently; use the image compressor, PNG compressor or JPEG compressor. Tracing a raster image into an SVG is outside this tool, and no other tool on the site traces either. Resizing the drawing or changing its viewBox is also out of scope; the image resizer and image cropper handle raster images, while an SVG’s size is best changed in the editor that made it.

7. Why Cortexis Is the Best Free SVG Compressor

Plenty of pages call themselves an SVG compressor; few explain their toggles or show the result first.

Options in plain English

Every checkbox says what it removes, and this guide explains each one. No cryptic setting names to decode.

Before and After preview

Both versions of the drawing appear side by side with the size saved, so you can confirm nothing changed before you copy.

Precision you control

Choose 0 to 8 decimal places. Keep detail for cutting files, or round harder for large illustrations.

References kept safe

IDs used by gradients, clip paths, use links and style rules survive, so fills and masks keep working.

Your files stay private

Files are never stored on our servers, nothing is retained after your session, and nothing is used for training.

Free, no account

No sign-up, no watermark and no daily counter. Paste, optimise, copy, repeat.

It sits alongside the rest of our free file tools. If you want to know what each element in the output means, the W3C SVG 2 specification is the definitive reference.

8. Frequently Asked Questions (FAQ)

How do I reduce SVG file size for free?

Paste the SVG code or drop the file into the tool at the top of this page, leave the default options on and press Optimise. Compare the previews, then copy the result or download it as a .min.svg file.

Will optimizing change how my SVG looks?

It should not. The one setting that can change the shape is decimal precision: set it too low and curves or thin details can shift. Compare the Before and After previews, and raise the precision if anything moved.

What decimal precision should I use?

The default of 3 suits icons, logos and most web graphics. Large illustrations can often use 1 or 2 with no visible change. For files going to a cutting machine, keep 3 or higher, because the machine follows the path exactly.

How do I remove Inkscape or Illustrator data from an SVG?

Keep the Remove editor data option ticked. It strips Inkscape, Sodipodi, Illustrator, Adobe, Sketch, Figma and similar namespaced elements and attributes, plus data-name, enable-background and xml:space="preserve" outside text.

Does it remove the title and description from my SVG?

Yes, by default, because the metadata option covers title and desc too. Those elements give the graphic an accessible name that screen readers announce, so untick the option for icons, charts or logos that need a label.

Can I make minified SVG readable again?

Yes. Paste the minified code, tick Pretty print output and press Optimise. The output is indented two spaces per level.

Can it convert my SVG to PNG or optimize many files at once?

No. It outputs SVG only and works on one file per run. For PNG, JPG or other formats, use the vector converter; for a set of favicons from one SVG, use the favicon generator.

Is it safe to optimize a client logo here?

Your files are never stored on our servers, nothing is retained after your session, and nothing is used for training.

Want to see exactly what changed? Paste the original and optimised code into the diff checker. Converting raster images between formats? Use the image converter. Styling icons? Try the CSS generator. If you want to draw better vectors in the first place, our free graphic design course covers Illustrator, and the full-stack web development course shows how to use SVG well in real sites.