VSD to WebP API
Send a VSD to POST /v2/convert/vsd/to/webp and get one lossless WebP per drawing page. The sample's A4 page, drawn at the default 150 DPI (1240 × 1753), takes 1,526 bytes, because a nearly empty page compresses to almost nothing.
- Endpoint
- POST /v2/
convert/ vsd/ to/ webp - Accepts
- vsd
- Sample timing
- 0.494 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/vsd/to/webp \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@single-shape.vsd \
-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/vsd/to/webp",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("single-shape.vsd", "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 = "single-shape.vsd";
form.append("File", new Blob([await readFile(file)]), file);
const url = "https://api.pdfconversionapi.com/v2/convert/vsd/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.494,
"Files": [
{
"FileName": "single-shape-1.webp",
"FileExt": "webp",
"FileSize": 1526,
"FileData": "UklGRu4FAABXRUJQVlA4TOEF…"
}
]
}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
- single-shape.vsd (11 KB)
- Output
- single-shape-1.webp (1.5 KB)
- Source
- A one-page Visio 2003-2010 drawing with a single labeled rectangle, taken from an open-source office suite's public test files (MPL-2.0); we did not make it (MPL-2.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 the page at. Not recorded in the file, since WebP has no field for it.Values: 36–600 |
ImageWidthinteger | Pixel width of each page image.Values: 1–20000 |
ImageHeightinteger | Pixel height of each page image, or a box together with ImageWidth.Values: 1–20000 |
PageRangestring | Which pages to draw.Values: e.g. 1, 2-3, 2-last |
TransparentColorstring | One exact color made transparent, such as white for the page background.Values: A color name, #RRGGBB or R,G,B |
ColorSpaceenum, default default | gray or monochrome pixels, still in an RGB WebP. The sample holds only grays already, so gray returns its same 1,526 bytes; monochrome gives 1,084. cmyk returns 400.Values: default, rgb, gray, grayscale, monochrome |
FileNamestring | Stem of the page files: single-shape-1.webp for the sample. |
StoreFileboolean, default false | Links to stored copies, valid 3 hours, instead of the WebP data. |
Not supported yet
Setting one of these to anything but its default returns 400.
| Option | What to do instead |
|---|---|
PageOrientation | Returns 400 "PageOrientation is not supported yet for VSD files"; the drawing's orientation is used. |
PageSize | Also refused for VSD files. |
What carries over, and what doesn't
Kept
- Lossless pixels (VP8L), so text edges and thin outlines stay exact
- The page at the drawing's size: A4 at 150 DPI is 1240 × 1753
- No alpha channel unless
TransparentColorasks for one:whiteclears the page in a 1,710-byte WebP - Shapes and their labels as the PDF route draws them
Lost or not yet supported
- No lossy compression or quality setting. ConvertAPI documents no options for this pair, so options such as
ImageQualityare ignored rather than refused; page setup options likePageOrientationstill return 400. - No DPI value is stored in the WebP.
- Text is pixels, drawn in the server's fonts (Liberation Sans for the sample's label).
Limits
- Binary VSD drawings, tested with the Visio 2003–2010 format.
- Up to 2,000 pages drawn per request; a page over 16,000 pixels on a side or 100 million pixels returns 413.
- A damaged VSD returns 422 "it could not be opened as VSD".
- Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- A conversion may take up to 120 seconds, then 504.
Where teams use it
Web previews of an old diagram library
Show every legacy .vsd page in a browser at a fraction of the PNG size. Simple diagrams compress to a few kilobytes.
Images for a static documentation site
Convert old Visio drawings once and commit the WebP files with the docs, so the site no longer depends on anyone having Visio.
Questions
Why is the WebP only 1,526 bytes?
The sample page is white apart from one rectangle and a word, and lossless WebP stores long runs of the same color very compactly. Busy diagrams give larger files: the two-page VSDX sample on the VSDX to WebP page is 91,568 and 42,862 bytes.
Can I make the page background transparent?
Yes, TransparentColor=white turns every pure white pixel transparent, including white shape fills.
Do browsers show these files?
Yes, current browsers display lossless WebP. For older software that can't, use vsd/to/png.
Convert your first VSD file in a minute.