---
title: "SVG to Image"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/lib/svg/svgtoimage
markdown: https://docs.nodetool.ai/nodes/lib/svg/svgtoimage.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/svg/svgtoimage.md
---

# SVG to Image

**Type:** `lib.svg.SVGToImage`

**Namespace:** `lib.svg`

## Description

Create an SVG document and convert it to a raster image in one step.
    svg, document, raster, convert

    Use cases:
    - Create and rasterize SVG documents in a single operation
    - Generate image files from SVG elements
    - Convert vector graphics to bitmap format with custom dimensions

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| elements | `list[svg_element]` | List of SVG elements | `[]` |
| width | `int` | Document width | `800` |
| height | `int` | Document height | `600` |
| viewBox | `str` | SVG viewBox attribute | `0 0 800 600` |
| scale | `int` | Scale factor for rasterization | `1` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `image` |  |

## Related Nodes

Browse other nodes in the [lib.svg](./) namespace.
