Skip to main content

SVG to PowerPoint Shape Converter

A Python library that converts SVG (Scalable Vector Graphics) files into native, editable PowerPoint shapes. Unlike simple image embedding, this tool parses SVG elements and recreates them as true PowerPoint objects—rectangles become rectangles, lines become lines, and text becomes editable text boxes.

Installation

pip install svg2pptx

Or install from source:

git clone https://github.com/benouinirachid/svg2pptx.git
cd svg2pptx
pip install -e ".[dev]"

Quick Start

from svg2pptx import svg_to_pptx

# Convert SVG file to PowerPoint
svg_to_pptx("icon.svg", "output.pptx")

CLI Usage

You can also use the command-line interface to convert files:

svg2pptx input.svg output.pptx [options]

Options

Option Description
--no-text Skip converting text elements
--no-shapes Skip converting shape elements
--scale <float> Scale factor for the SVG content (default: 1.0)
--flatten Flatten groups into individual shapes (default)
--no-flatten Preserve group structure from SVG

Examples

# Basic conversion
svg2pptx diagram.svg presentation.pptx

# Scale up by 2x and skip text
svg2pptx chart.svg slide.pptx --scale 2.0 --no-text

Features

  • Editable shapes — Resize, recolor, and modify individual elements directly in PowerPoint
  • Native formatting — Apply PowerPoint styles, themes, and animations to converted shapes
  • Smaller file sizes — Vector shapes are lighter than embedded raster images
  • Preservation of structure — Maintain layers, groups, and object hierarchy from your original design

Supported SVG Elements

Element Support
<rect> ✅ Full
<circle> ✅ Full
<ellipse> ✅ Full
<line> ✅ Full
<polygon> ✅ Full
<polyline> ✅ Full
<path> ✅ Approximated curves
<g> (groups) ✅ Full
<text> ✅ Basic

Configuration

from svg2pptx import svg_to_pptx, Config

config = Config(
    scale=2.0,                  # Scale factor for SVG content
    curve_tolerance=0.5,        # Curve approximation quality (lower = more accurate)
    preserve_groups=True,       # Maintain SVG group structure
)

svg_to_pptx("diagram.svg", "output.pptx", config=config)

Advanced Usage

from svg2pptx import SVGConverter
from pptx import Presentation

# Add SVG shapes to an existing presentation
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])  # Blank layout

converter = SVGConverter()
converter.add_to_slide("icon.svg", slide)

prs.save("combined.pptx")

Limitations

  • Bezier curves are approximated with line segments (configurable tolerance)
  • Gradients are not supported (will use first color)
  • Filters and effects (blur, drop shadow) are not supported
  • CSS external stylesheets are not supported

License

MIT License

Metadata

Release files for svg2pptx 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svg2pptx 1.0.3
File Size Uploaded Provenance Actions
svg2pptx-1.0.3.tar.gz 196.7 kB With provenance Details for svg2pptx-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for svg2pptx 1.0.3
File Interpreter ABI Platform Actions
svg2pptx-1.0.3-py3-none-any.whl Python 3 none any Details for svg2pptx-1.0.3-py3-none-any.whl

Total release size: 228.7 kB

Release files / svg2pptx-1.0.3.tar.gz

Download URL svg2pptx-1.0.3.tar.gz
Size 196.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2921c4a83d8c21b4967824ab7f8d4babd5fdc81b497dea658bf0710704ab19f7
BLAKE2b-256 checksum
How to use checksums
4a00f55ef9c47cdd4b4b79d41c2a866737fdb0f2f1ccc809431903a2414cb3ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

Release files / svg2pptx-1.0.3-py3-none-any.whl

Download URL svg2pptx-1.0.3-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
825812458df078cf0d252f77c9966a682663f002cbe2e0464af64e47d446f971
BLAKE2b-256 checksum
How to use checksums
eec7120fce32692d773f83cf2d668b2c87fafa0ca373c1338374617318766f37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

Security for svg2pptx 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for svg2pptx-1.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page