ICO to SVG API
POST an icon to /v2/convert/ico/to/svg and get an SVG built from filled paths. The API traces the icon's best entry by color, leaves fully transparent areas out, and accepts ConvertAPI's tracing options to trade detail for size.
- Endpoint
- POST /v2/
convert/ ico/ to/ svg - Accepts
- ico
- Sample timing
- 12 ms median of 5 runsHow we measure
- Request size
- Up to 10 MB on the Free plan or 100 MB on paid plans, all files together
Request and response
Every sample below ran against the API before this page was published. Set PDFCONVERSIONAPI_KEY to your key and run it as is.
curl -sS -X POST \
https://api.pdfconversionapi.com/v2/convert/ico/to/svg \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@paper-plane-app-icon.ico \
-o response.json
# FileData is base64. Save the first file in converted/,
# or print the JSON error.
if jq -e '.Files' response.json > /dev/null; then
mkdir -p converted
name=$(jq -r '.Files[0].FileName' response.json)
jq -r '.Files[0].FileData' response.json \
| base64 --decode > "converted/$name"
else
cat response.json
fiimport base64
import os
import requests
key = os.environ["PDFCONVERSIONAPI_KEY"]
response = requests.post(
"https://api.pdfconversionapi.com/v2/convert/ico/to/svg",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("paper-plane-app-icon.ico", "rb"))],
timeout=180,
)
result = response.json()
if not response.ok:
raise SystemExit(f"{result['Code']}: {result['Message']}")
os.makedirs("converted", exist_ok=True)
for file in result["Files"]:
path = os.path.join("converted", file["FileName"])
with open(path, "wb") as out:
out.write(base64.b64decode(file["FileData"]))
print(path, file["FileSize"], "bytes")
import { mkdir, readFile, writeFile } from "node:fs/promises";
import { join } from "node:path";
const form = new FormData();
const file = "paper-plane-app-icon.ico";
form.append("File", new Blob([await readFile(file)]), file);
const url = "https://api.pdfconversionapi.com/v2/convert/ico/to/svg";
const key = process.env.PDFCONVERSIONAPI_KEY;
const response = await fetch(url, {
method: "POST",
headers: { Authorization: `Bearer ${key}` },
body: form,
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.Code}: ${result.Message}`);
}
await mkdir("converted", { recursive: true });
for (const file of result.Files) {
const path = join("converted", file.FileName);
await writeFile(path, Buffer.from(file.FileData, "base64"));
console.log(path, file.FileSize, "bytes");
}
{
"ConversionCost": 1,
"ConversionTime": 0.012,
"Files": [
{
"FileName": "paper-plane-app-icon.svg",
"FileExt": "svg",
"FileSize": 17124,
"FileData": "PD94bWwgdmVyc2lvbj0iMS4w…"
}
]
}Response from our test run on 2026-11-03. ConversionTime shows the median of 5 runs. FileData is shortened here; the real response carries the whole file as base64.
The sample, converted
The same file the code sends. Download the input and the output and compare them yourself.

- Input
- paper-plane-app-icon.ico (34 KB)
- Output
- paper-plane-app-icon.svg (17 KB)
- Source
- A four-size app icon we drew and assembled ourselves: 16, 32 and 48 px entries stored as 32-bit bitmaps with a 1-bit mask, and a 256 px entry stored as PNG. The paper plane design is fictional. (CC0-1.0). How it was made
- Made by
- 2026-11-04, API build
9eeeb0640aba
Parameters
Send these as form fields next to the file. Names are case-insensitive. If you set one of the documented options below that we don't support yet, the request fails with a 400 that names it instead of returning a file made without it.
| Parameter | What it does |
|---|---|
Presetenum, default none | Starting set of tracing values. On the sample: bw gives 1 path (1,948 bytes), poster 51 paths (27,973), photo 25 paths (17,216). Options you send next to it override the preset.Values: none, bw, poster, photo |
ColorModeenum, default color | bw traces a black-and-white silhouette, the same output as Preset=bw for this icon.Values: color, bw |
Layeringenum, default stacked | stacked lays shapes over each other; cutout cuts holes so shapes don't overlap (26 paths, 14,442 bytes).Values: stacked, cutout |
FilterSpeckleinteger, default 4 | Patches smaller than this many pixels across are dropped. 0 keeps every speck: 1,558 paths and 120,792 bytes. 20 leaves 23 paths.Values: 0–128 |
ColorPrecisioninteger, default 6 | Bits per channel used to group colors. 1 merges the icon into one path; 8 separates more shades (51 paths).Values: 1–8 |
GradientStepinteger, default 16 | Color difference between layers of a gradient. We use 16 when it's left out; ConvertAPI documents 10, which gives 30 paths here instead of 29.Values: 0–128 |
CurveModeenum, default spline | spline fits curves (17,124 bytes); polygon uses straight segments (4,225 bytes); pixel follows pixel edges as steps (20,829 bytes).Values: spline, polygon, pixel |
CornerThresholdinteger, default 60 | Angle in degrees below which a bend is kept as a corner. ConvertAPI documents 55; for this icon 55 and 60 give the same file.Values: 0–180 |
SegmentLengthnumber, default 4 | Length used when splitting outlines into curve segments. Values outside 3.5 to 10 return 400.Values: 3.5–10 |
SpliceThresholdinteger, default 45 | Angle at which a curve is split in two. ConvertAPI documents 35, which made the sample 17,892 bytes instead of 17,124.Values: 0–180 |
ImageWidthinteger | Resizes the bitmap before tracing: ImageWidth=128 gives a 128 × 128 SVG with 24 paths. Tracing stops at 12,000,000 pixels, so 4000 px on a square icon returns 413.Values: 1–20000 |
ImageHeightinteger | Height before tracing; with a width it forms a box (200 × 100 fits the square icon to 100 × 100).Values: 1–20000 |
ScaleImageboolean, default true | false with a size traces only that top-left piece of the icon. |
FileNamestring | Name of the .svg; the icon's name otherwise. |
StoreFileboolean, default false | Return a URL valid for 3 hours instead of the SVG text in base64. |
What carries over, and what doesn't
Kept
- Shapes and flat colors: the badge, plane, fold and sun came out as 29 paths in 23 fill colors
- The clear background: transparent corners are left out of the drawing, so the SVG can sit on any page color
- The canvas size, as width and height of 256
Lost or not yet supported
- Gradients. The badge's teal-to-blue fade became one flat color, (31, 143, 169).
- Soft shadows. 11,933 of the 12,009 semi-transparent pixels came out fully opaque, so the drop shadow is a solid dark shape.
- Exact edges: traced curves approximate pixel boundaries.
- The icon's 16, 32 and 48 px artwork; only one entry is traced.
Limits
- One icon per request.
- Tracing is limited to 12,000,000 pixels after resizing; larger requests return 413.
- Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- 120 seconds per conversion, then 504.
Where teams use it
Redrawing an old icon as vector art
When a legacy .ico is the only copy of an app icon or logo, a traced SVG is a starting point to clean up in a vector editor rather than redrawing it from nothing.
Large displays from a small icon
Blowing a 256 px bitmap up to poster or splash-screen size blurs it. The traced paths scale without pixels, at the cost of simplified shading.
Questions
Why did the gradient turn into one flat color?
The tracer groups neighboring pixels whose colors are close, and a smooth gradient changes only slightly from one pixel to the next. Lowering GradientStep or raising ColorPrecision adds shades elsewhere, but in our tests (GradientStep=4, ColorPrecision=8, Preset=poster) the badge stayed one flat color.
How do I get more detail?
Lower FilterSpeckle and raise ColorPrecision. On the sample, ColorPrecision=8 gives 51 paths and FilterSpeckle=0 gives 1,558 paths at 120,792 bytes, which keeps every small fleck.
Are the defaults the same as ConvertAPI's?
Not all of them. Left out, GradientStep is 16, CornerThreshold 60 and SpliceThreshold 45, while ConvertAPI documents 10, 55 and 35. Send those values explicitly if you want ConvertAPI's settings.
What does the tracer do with transparency?
When a noticeable share of the icon is fully transparent, as in the sample's corners, those pixels are left out of the SVG. Pixels with partial alpha are traced by their color alone and come out opaque.
Convert your first ICO file in a minute.