# SVG Converter API

> SVG Converter is an SVG to PNG API that transforms vector SVG files into raster image formats. Convert SVG logos, icons, and illustrations to PNG, JPG, or WebP for use in applications that don't support vector graphics.

**Endpoint:** `POST https://api.apiverve.com/v1/svgconverter`  
**Category:** Images  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/svgconverter

## Overview

SVG (Scalable Vector Graphics) is the standard for web vector graphics, but many platforms require raster formats. This API converts your SVG files to high-quality PNG, JPG, or WebP images with customizable dimensions. Paid plans also see the output pixel width and height. SVGs with the standard SVG DOCTYPE and internal entities, as Adobe Illustrator exports them, are accepted. SVGs wider or taller than 16384px, or with external or parameter entity declarations, are rejected with a 400.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/svgconverter" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "image=@photo.svg" \
  -F "outputFormat=png" \
  -F "quality=90" \
  -F "maxWidth=1920" \
  -F "maxHeight=1080"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `image` | string | Yes | Upload an SVG file to convert |
| `outputFormat` | string | Yes | Target format. One of: png, jpg, jpeg, webp |
| `quality` | integer | No | Output quality (applies to jpg/webp). default 90. range 1-100 |
| `maxWidth` | integer | No | Maximum width in pixels (maintains aspect ratio). range 1-10000. Premium field |
| `maxHeight` | integer | No | Maximum height in pixels (maintains aspect ratio). range 1-10000. Premium field |

## Response fields

- `id` — string · Unique identifier for the conversion request
- `inputFormat` — string · Format of the input file (e.g., svg)
- `outputFormat` — string · Format of the converted output file
- `inputSize` — number · Size of the original SVG file in bytes · (premium)
- `outputSize` — number · Size of the converted image file in bytes · (premium)
- `mimeType` — string · MIME type of the output image (e.g., image/png)
- `expires` — number · Unix timestamp when temporary URL expires
- `downloadURL` — string · Temporary URL to download the converted image

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "inputFormat": "svg",
    "outputFormat": "png",
    "inputSize": 12456,
    "outputSize": 89012,
    "mimeType": "image/png",
    "expires": 1707350400000,
    "downloadURL": "https://storage.googleapis.com/apiverve/svgconverter/a1b2c3d4.png"
  },
  "code": 200
}
```

## Use cases

- **Social Media Previews** — To generate Open Graph preview cards, content management systems turn uploaded vector badges into JPG images via temporary download links.
- **Email Newsletter Graphics** — When sending weekly digests, email marketing services render vector brand marks into PNG files so older mail clients display them properly.
- **E-Commerce Thumbnail Generation** — Convert product design templates from raw vector files into WebP thumbnails before serving them to mobile shoppers in catalog feeds.
- **PDF Document Export** — Report generation engines fetch converted raster PNGs to embed corporate vector charts into downloadable monthly audit documents.

## SDKs

- **npm** — `npm install @apiverve/svgconverter` (https://www.npmjs.com/package/@apiverve/svgconverter)
- **NuGet** — `dotnet add package APIVerve.API.SVGConverter` (https://www.nuget.org/packages/APIVerve.API.SVGConverter)
- **Source** — https://github.com/apiverve/svgconverter-api

## More

- Full reference: https://docs.apiverve.com/ref/svgconverter
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
