Convert SVG to PNG
Convert SVG vector graphics to PNG raster format with customizable resolution, quality, and transparency options
API Documentation
Request Endpoint
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| svgFile | file (Upload required) | Yes | - |
| width | number | No | Output width in pixels (optional) |
| height | number | No | Output height in pixels (optional) |
| density | number | No | Rendering density for SVG (DPI) |
| compressionLevel | range | No | PNG compression level (0=fastest/largest, 9=slowest/smallest) |
| adaptiveFiltering | checkbox | No | Enable adaptive filtering for better compression |
| preserveTransparency | checkbox | No | Keep SVG transparency in output PNG |
| backgroundColor | color | No | Background color (if transparency is disabled) |
File type parameters need to be uploaded first via POST /upload/svg-to-png to get filePath, then pass filePath to the corresponding file field.
Response Format
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}
AI MCP Documentation
Add this tool to your MCP server configuration:
{
"mcpServers": {
"elysiatools-svg-to-png": {
"name": "svg-to-png",
"description": "Convert SVG vector graphics to PNG raster format with customizable resolution, quality, and transparency options",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=svg-to-png",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.
Supports URL file links or Base64 encoding for file parameters.
If you encounter any issues, please contact us at [email protected]