PNGraft
Back to Scripts
Ai

SVG Cleanup Export

IllustratorExport·10 KB·20,100 downloads

Export clean, optimized SVG with removed metadata and minified output.

Preview GIF / Screenshot coming soon

About This Script

Exports your Illustrator artwork as clean, web-optimized SVG files. The script removes unnecessary metadata (Illustrator namespaces, editor data, comments), rounds decimal coordinates to configurable precision (0-4 decimal places), converts absolute paths to relative where smaller, removes empty groups and hidden elements, and optionally inlines CSS styles as attributes. The output SVG is significantly smaller than Illustrator's default SVG export. Includes options for viewBox vs width/height, embedded vs linked images, and font handling. Essential for web developers and icon designers.

How to Install

Method 1 — Run directly

  1. Download the .jsx file
  2. Open Illustrator
  3. Go to File > Scripts > Other Script...
  4. Select the downloaded .jsx file
  5. The script runs immediately

Method 2 — Install permanently

  1. Copy the .jsx file to the Scripts folder:
  2. C:\Program Files\Adobe\Adobe Illustrator [version]\Presets\en_US\Scripts\
  3. Restart Illustrator
  4. Find the script under File > Scripts > SVG Cleanup Export

Frequently Asked Questions

How do I run this script?
In Illustrator: File > Scripts > Other Script, then select the .jsx file. In Photoshop: File > Scripts > Browse, then select the .jsx file. Alternatively, copy the file to your Presets/Scripts folder and restart the application.
Is this script safe to use?
Yes. All scripts are open source under the MIT License. You can inspect the code before running it. Scripts do not send data externally or modify system files.
Will this script work with my version?
Check the compatible versions listed above. Most scripts support CS6 through CC 2026. If your version is within the range, it will work.
Can I modify this script?
Absolutely. The MIT License allows you to modify, extend, and redistribute the script freely. The .jsx files are plain JavaScript that you can edit in any text editor.

Script Info

Category
Export
Application
Adobe Illustrator
File Type
.jsx (ExtendScript)
File Size
10 KB
License
MIT
Author
PNGraft
Compatibility
CC 2015 — CC 2026
Downloads
20,100

Compatible Versions

CS6CC 2017CC 2018CC 2019CC 2020CC 2021CC 2022CC 2023CC 2024CC 2025CC 2026

Similar Scripts

Free SVG Cleanup Export Script for Illustrator

Download the free SVG Cleanup Export script (.jsx) for Adobe Illustrator. This export automation script is compatible with CC 2015 — CC 2026 and released under the MIT License for personal and commercial use.

No signup required, no watermark, no attribution needed. Install in seconds by copying the .jsx file to your Scripts folder or running directly via File > Scripts. Join 20,100+ designers who have already downloaded this script.