Media
Convert SVG vector graphics to JPG raster format with customizable resolution, quality, and background options
Call this tool from your code in three languages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/svg-to-jpg' \
-H 'Content-Type: application/json' \
-d '{"filename":"svgFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/en/api/tools/svg-to-jpg' \
-F 'svgFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'width=0' \
-F 'height=0' \
-F 'density=72' \
-F 'quality=85' \
-F 'progressive=false' \
-F 'mozjpeg=false' \
-F 'backgroundColor=#FFFFFF'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/svg-to-jpg| Name | Type | Required | Description |
|---|---|---|---|
| svgFile | fileupload 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) |
| quality | range | No | JPEG quality (1-100, higher = better quality) |
| progressive | checkbox | No | Create progressive JPEG for faster web loading |
| mozjpeg | checkbox | No | Use MozJPEG encoder for better compression |
| backgroundColor | color | No | Background color (JPG requires a background) |
File result
{
"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)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-svg-to-jpg": {
"name": "svg-to-jpg",
"description": "Convert SVG vector graphics to JPG raster format with customizable resolution, quality, and background options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=svg-to-jpg",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "svg-to-jpg",
"arguments": {
"svgFile": "https://example.com/file.ext",
"width": 0,
"height": 0,
"density": 72,
"quality": 85,
"progressive": false,
"mozjpeg": false,
"backgroundColor": "#FFFFFF"
}
}
}Questions or issues? Contact [email protected]