PSD2SVG Documentation

PSD2SVG is a PSD to SVG converter based on psd-tools.

This tool converts Adobe Photoshop (PSD) files to Scalable Vector Graphics (SVG) format, preserving layers, effects, and vector shapes where possible.

PyPI Version

Features

  • Convert PSD files to clean, editable SVG

  • Preserve layers and artboards with smart group optimization

  • Convert text layers to native SVG text elements (experimental)

    • Arc warp support with SVG textPath

    • Smart font matching with Unicode codepoint-based selection

  • Support for most Photoshop blending modes (with approximations for unsupported modes)

  • Adjustment layers support (experimental)

  • Optional font subsetting and embedding for web optimization (typically 90-95% size reduction)

  • Built-in resource limits for security (file size, timeout, layer depth, dimensions)

  • Command-line tool and Python API

Quick Start

Installation

Install via pip:

pip install psd2svg

Requirements: Python 3.10 or higher. Dependencies (psd-tools, pillow, numpy, resvg-py) are installed automatically.

Optional features:

# Browser-based rasterization (better SVG 2.0 support)
pip install psd2svg[browser]
playwright install chromium

Basic Usage

Command line:

psd2svg input.psd output.svg

Python API:

from psd2svg import convert

convert('input.psd', 'output.svg')

With SVGDocument class:

from psd_tools import PSDImage
from psd2svg import SVGDocument

psdimage = PSDImage.open("input.psd")
document = SVGDocument.from_psd(psdimage)
document.save("output.svg", embed_images=True)

Next Steps

Documentation Contents

Indices and tables