VSD to PNG API
Send a VSD to POST /v2/convert/vsd/to/png and each drawing page comes back as its own PNG on a white background. The sample asks for ImageResolution=96, which draws its A4 page at 793 × 1122 pixels and writes 96 DPI into the file.
- Endpoint
- POST /v2/
convert/ vsd/ to/ png - Accepts
- vsd
- Sample timing
- 0.479 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/png \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@single-shape.vsd \
--form-string ImageResolution=96 \
-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/png",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("single-shape.vsd", "rb"))],
data={
"ImageResolution": "96",
},
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);
form.append("ImageResolution", "96");
const url = "https://api.pdfconversionapi.com/v2/convert/vsd/to/png";
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.479,
"Files": [
{
"FileName": "single-shape-1.png",
"FileExt": "png",
"FileSize": 17836,
"FileData": "iVBORw0KGgoAAAANSUhEUgAA…"
}
]
}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.png (17 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 | Pixels per inch of page, also stored in the PNG. A4 is 1240 × 1753 at the default 150 and 793 × 1122 at 96 (the sample). ConvertAPI's default is 200.Values: 36–600 |
ImageWidthinteger | Draws each page at this pixel width, height in proportion. 600 gives a 600 × 849, 9,912-byte PNG for the sample.Values: 1–20000 |
ImageHeightinteger | Draws each page at this pixel height, or fits it in a box with ImageWidth.Values: 1–20000 |
PageRangestring | Pages to draw from multi-page drawings; each file keeps its page number in the name.Values: e.g. 1, 2-3, 2-last |
TransparentColorstring | Pixels of exactly this color turn transparent, and only then does the PNG get an alpha channel; white clears the page (22,526 bytes at 96 DPI). With ColorSpace=gray as well, the result is a gray PNG with alpha, 12,721 bytes.Values: A color name, #RRGGBB or R,G,B |
ColorSpaceenum, default default | gray or monochrome images (7,888 and 7,646 bytes for the sample at 96 DPI). rgb returns the same 17,836-byte RGB file as the default. cmyk returns 400.Values: default, rgb, gray, grayscale, monochrome |
FileNamestring | Stem of the page files; the sample's is single-shape-1.png. |
StoreFileboolean, default false | Links to the stored PNGs, for 3 hours, instead of inline data. |
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 VSD files"; the page keeps its size from the drawing. |
Also refused when set: PageOrientation.
What carries over, and what doesn't
Kept
- Each page at the drawing's page size: an A4 page becomes 793 × 1122 pixels at 96 DPI
- The DPI you ask for, recorded in the PNG
- Vector shapes and text drawn sharp at the chosen size, not scaled from a smaller image
- Opaque pages stored as plain RGB;
TransparentColoradds an alpha channel only when you send it
Lost or not yet supported
- Text is no longer text; for searchable output use
vsd/to/pdf. - The sample's label is drawn in Liberation Sans; fonts the server lacks are replaced by similar ones.
- The page is drawn on white.
BackgroundColor=blackreturns the same file as leaving it out, because the page's own white background covers every pixel, the outer rows and columns included. - The importer is an open-source reader of a format with no public specification; we haven't compared its pictures with Visio's.
Limits
- Binary VSD files, 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.
ImageResolutionoutside 36–600 returns 400 "ImageResolution must be between 36 and 600".- A file that can't be read as VSD 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
Thumbnails for a file share full of old diagrams
Build a preview image for every .vsd in a document library so people can find the right one by sight. ImageWidth=300 draws the thumbnail directly at that size.
Images of legacy drawings for a wiki
Move diagrams from an old intranet into a wiki as images, page by page, without anyone needing Visio 2003 to open them.
Questions
What resolution should I use?
150 DPI, the default, gives 1240 × 1753 for A4, which reads well on screen. Use 96 for small previews (793 × 1122, 17,836 bytes for the sample) and 200, ConvertAPI's default DPI, for 1653 × 2338.
Do I get one PNG for the whole drawing?
One per page, numbered from 1. The sample has a single page, so you get single-shape-1.png.
How do I get a transparent PNG?
Send TransparentColor=white. Every pure white pixel, the page and any white shape fills, becomes transparent, while the sample's black outline and label stay opaque.
Convert your first VSD file in a minute.