VSDX to WebP API
Send a VSDX to POST /v2/convert/vsdx/to/webp and get one lossless WebP per drawing page, numbered by page. The sample's flowchart page is 91,568 bytes against 167,697 for the same page as PNG.
- Endpoint
- POST /v2/
convert/ vsdx/ to/ webp - Accepts
- vsdx
- Sample timing
- 0.534 s 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/vsdx/to/webp \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@bike-repair-workflow.vsdx \
-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/vsdx/to/webp",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("bike-repair-workflow.vsdx", "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 = "bike-repair-workflow.vsdx";
form.append("File", new Blob([await readFile(file)]), file);
const url = "https://api.pdfconversionapi.com/v2/convert/vsdx/to/webp";
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.534,
"Files": [
{
"FileName": "bike-repair-workflow-1.webp",
"FileExt": "webp",
"FileSize": 91568,
"FileData": "UklGRqhlAQBXRUJQVlA4TJxl…"
},
{
"FileName": "bike-repair-workflow-2.webp",
"FileExt": "webp",
"FileSize": 42862,
"FileData": "UklGRmanAABXRUJQVlA4TFmn…"
}
]
}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
- bike-repair-workflow.vsdx (7.8 KB)
- Output
- bike-repair-workflow-1.webp (89 KB)bike-repair-workflow-2.webp (42 KB)
- Source
- A two-page Visio drawing for a fictional bike shop, a repair intake flowchart and a workshop floor layout, which we wrote by hand from the VSDX package format (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 |
|---|---|
ImageResolutioninteger, default 150 | DPI to draw at; at 100 the sample's pages are 1100 × 850 pixels and 56,804 and 26,500 bytes. WebP has no DPI field, so nothing is recorded.Values: 36–600 |
ImageWidthinteger | Draw each page this many pixels wide; 640 gives files of 30,464 and 14,390 bytes for the sample.Values: 1–20000 |
ImageHeightinteger | Draw each page this many pixels high, or fit inside a box with ImageWidth.Values: 1–20000 |
PageRangestring | Only these pages, such as 1 for the flowchart alone.Values: e.g. 1, 1-2, 2-last |
TransparentColorstring | Make one exact color transparent; white removes the page and white fills.Values: A color name, #RRGGBB or R,G,B |
ColorSpaceenum, default default | gray gives 47,700 and 25,304 bytes for the sample, monochrome 10,034 and 5,866. cmyk returns 400.Values: default, rgb, gray, grayscale, monochrome |
FileNamestring | Stem of the files, followed by the page number. |
StoreFileboolean, default false | Send back links to the stored WebP files, valid 3 hours. |
Not supported yet
Setting one of these to anything but its default returns 400.
| Option | What to do instead |
|---|---|
PageSize | Refused with 400 "PageSize is not supported yet for VSDX files"; the drawing's page size is used. |
Also refused when set: PageOrientation.
What carries over, and what doesn't
Kept
- Every page as its own image, drawn at the requested size from the vector page
- Exact pixels: the WebP is lossless (VP8L), with no compression noise around text
- Colors, line weights, dashes, arrowheads and embedded pictures from the drawing
- Transparency on request: the default WebP is RGB, and
TransparentColor=whiteadds an alpha channel with the page background cleared (97,774 bytes for page 1)
Lost or not yet supported
- There is no lossy setting. ConvertAPI documents no options for this pair, so an
ImageQualityvalue is ignored without an error and the file stays lossless. - Text is pixels, and hyperlinks and shape data don't carry over.
- Pages of different sizes are all drawn at the largest width and height in the file.
- No DPI is stored, whatever
ImageResolutionyou send.
Limits
- One VSDX per request and up to 2,000 pages drawn.
- A page bigger than 16,000 pixels on a side or 100 million pixels returns 413.
- A file that isn't a readable VSDX returns 422.
- 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
Diagrams on light web pages
Embed Visio pages in documentation or an intranet page as WebP. They are lossless, so text stays sharp, and in the sample they are 55% and 41% of the PNG sizes.
Responsive images of each page
Request the same drawing at ImageWidth=640 and ImageWidth=1280 and serve them with srcset, so phones download the small one.
Questions
Why doesn't `ImageQuality` change the file size?
The WebP is always lossless. Because ConvertAPI documents no options for VSDX to WebP, the API doesn't refuse ImageQuality here; it ignores it. Lower ImageResolution or ImageWidth to make the files smaller.
Is WebP smaller than PNG for diagrams?
For the sample, yes: 91,568 bytes against 167,697 for page 1 and 42,862 against 103,339 for page 2, with identical pixels.
Can I get all pages as one animated WebP?
No. Each page is a separate still WebP file named with its page number.
Convert your first VSDX file in a minute.