Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

SVG Optimizer

Paste or open an SVG and compress it with SVGO in this tab. Editor metadata is removed, and scripts are stripped. The preview uses an image, so the file is not inserted into the live page. Nothing is uploaded.

Runs in your browserSVGO (MIT)Runs in your browserPreview uses an image
1

Input

2

Result

How to use SVG Optimizer

  1. Paste or open SVGType, paste, or open a .svg file. The limit is 1 MB. The markup is optimized as text and is not inserted into this page.
  2. Choose the output shapeKeep Multipass on for a smaller file, or turn on Pretty output if you want indented markup that is easier to read.
  3. Copy or downloadCopy the optimized SVG or download optimized.svg. The before and after previews are images, not live markup.

Limits and how it works

  • The input is limited to 1 MB of UTF-8 text, including files you open.
  • Optimization may remove editor metadata and can affect some filters, unused definitions, or hidden elements.
  • Scripts are removed from the optimized file. Previews are images, so scripts and most external resources do not run on this page even before that step.
  • This is an optimizer, not a visual editor or linter. Invalid SVG may be rejected or changed by SVGO’s parser.

How this SVG optimizer works

This page uses SVGO 4.1.0 (MIT) from the official package, unmodified, and calls its browser build. SVGO is already a dependency of the site toolchain; this tool adds it as a direct dependency so the optimizer does not rely on a transitive install. It is not the same as SVG to PNG, SVG to JPG, or SVG to PDF, which rasterize or print the graphic, and there is no separate SVG formatter or SVG minifier page on this site.

The optimizer never assigns the input to innerHTML, never uses DOMParser, and never inlines the SVG into this document. You see the before and after previews only through img elements whose source is a blob URL with the image/svg+xml type. In that form, scripts in the SVG do not run. The result box is text only.

SVGO’s default preset is applied, plus the removeScripts plugin. That strips editor namespaces and metadata, minifies path data, and removes script elements from the downloaded file. The same default plugins can simplify or drop some filters, unused defs, and hidden elements. Turn on Pretty output to emit indented markup, which is often larger than the compact form.

Frequently asked questions

Is my SVG uploaded?

No. Everything runs in your browser tab with JavaScript. Nothing you type, paste, or open is sent to a server, logged, or stored by ALink Tools.

Does this run my SVG as live markup?

No. The file is parsed by SVGO as data. Previews use an img element and a blob URL, so scripts in the SVG do not run as part of this page.

Is this the same as SVG to PNG?

No. SVG to PNG rasterizes the graphic. This page rewrites the SVG markup to a smaller SVG with SVGO.

Will optimization change how the SVG looks?

Often the picture looks the same at a smaller size, but SVGO can simplify path data and may affect some filters, unused definitions, or editor-only markup. Compare the before and after previews before you download.

Related tools

All tools