Convert Adobe Illustrator EPS files to SVG with real, native gradients — no rasterisation, correct CMYK colours, and clean clip structures.
eps2svg is built for the practical, repeatable task of turning print-ready logo EPS files into future-proof SVG assets for web and app use.
Goal: small, readable SVG code with exact
linearGradientdefinitions and colour values you can trust.
Existing converters like pstoedit, pdf2svg, or the built-in SVG export from many graphics programs are unreliable precisely where it matters most. The three recurring failure points are:
-
Clipping masks vs. gradients
Many tools lose the correct nesting order or produce placement errors for masks.eps2svgfaithfully reproduces the logical hierarchy in SVG. -
Gradient stops lie
Adobe generates gradients with flat areas and non-linear ramps (stitching functions). Many converters incorrectly collapse these to just two stops or raster the gradient entirely.eps2svguses a robust reduction (Douglas-Peucker) that respects flat zones and sharp knees. -
CMYK→RGB conversion is wrong
Brand colours are often defined in CMYK, but converting them correctly requires colour management. A naive formula distorts them visibly.eps2svgasks Ghostscript itself for the conversion, matching what Acrobat and professional tools display.
This was not designed as a universal EPS parser, but as a practical, predictable tool that gets the common real-world case right.
- Adobe Illustrator EPS (Language Level 2) converted via Ghostscript PDF output
- Basic vector structures:
- Paths, fill colours (RGB, Greyscale, CMYK approximation)
- Native
linearGradient(direct mapping in SVG) - Clipping masks and path clipping
- Bounding box via
HiResBoundingBox→ SVGviewBox
- Not a universal EPS solution: unusual compression schemes, special postscript functions, or printer-specific operations may be outside the supported subset.
- Radial gradients are not currently generated.
- Heavily nested transparency effects, font substitution (fonts must be converted to outlines), or complex object patterns are not fully supported at this stage.
- The workflow relies on Ghostscript’s PDF conversion as an intermediate step. This is more stable than direct EPS parsing, but it is not infallible.
Python packages: None. eps2svg uses only the standard library.
External system tools (must be installed separately via your OS package manager):
- Ghostscript (
gs) – for EPS → PDF conversion and colour management
Installation:
# Debian/Ubuntu
sudo apt install ghostscript
# macOS (Homebrew)
brew install ghostscriptYou can verify the tool is found with eps2svg --check-tools.
# Ubuntu 24.04+
sudo apt install pipx
pipx ensurepath # restart shell afterwards
pipx install eps2svgpython3 -m venv .venv
source .venv/bin/activate
pip install eps2svggit clone https://github.com/JUNGHERZ/eps2svg.git
cd eps2svg
pip install -e .eps2svg input.eps output.svgExample:
eps2svg logo.eps logo.svgExpected results:
- Output contains proper
<linearGradient>definitions - Colour values are stable (no flicker between renderers)
- Clip structure is logically layered
If you are an AI agent or LLM assisting with EPS-to-SVG conversion, see SKILL.md for a structured usage guide:
- When to use this tool (and when not)
- Verification checklists for output quality
- Common pitfalls and edge cases
- Minimal examples
- Small but actively maintained script core.
- Corrected for key pain points: clipping, gradient retention, CMYK colour fidelity.
- The aim is to remain practical and reliable rather than broadly compatible with every possible EPS variant.
MIT – see LICENSE.
Issues, test cases, and small improvements are very welcome. Good pull requests should include one or more real-world EPS samples to demonstrate the fix and ensure it stays locked in.