Skip to content
pdfconversionapi

ODS to WebP API

POST an .ods spreadsheet to /v2/convert/ods/to/webp and each printed page comes back as a lossless WebP. Sent with no options, the sample gives two 1650 × 1275 images of 101,982 and 34,868 bytes.

Endpoint
POST /v2/convert/ods/to/webp
Accepts
ods
Sample timing
0.625 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/ods/to/webp \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@garden-plots-2026.ods \
  -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
fi
200 OK0.625 s median2 files, 134 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.625,
  "Files": [
    {
      "FileName": "garden-plots-2026-1.webp",
      "FileExt": "webp",
      "FileSize": 101982,
      "FileData": "UklGRlaOAQBXRUJQVlA4TEmO…"
    },
    {
      "FileName": "garden-plots-2026-2.webp",
      "FileExt": "webp",
      "FileSize": 34868,
      "FileData": "UklGRiyIAABXRUJQVlA4TCCI…"
    }
  ]
}

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.

First page of garden-plots-2026-1.webp, rendered by the API
Input
garden-plots-2026.ods (30 KB)
Output
garden-plots-2026-1.webp (100 KB)garden-plots-2026-2.webp (34 KB)
Source
Written for this site: a fictional community garden's plot register and harvest chart in three sheets, one of them hidden, saved as an OpenDocument spreadsheet (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.

ParameterWhat it does
ImageResolutioninteger, default 150Pixels per inch of paper. Not stored in the WebP, which has no field for it.Values: 36–600
ImageWidthintegerWidth of each image; the page is drawn at this size.Values: 1–20000
ImageHeightintegerHeight of each image.Values: 1–20000
WorksheetNamestringOnly this sheet.
WorksheetIndexintegerOnly the sheet at this position.Values: 1 to the sheet count
ActiveWorksheetOnlyboolean, default falseOnly the sheet active at save time.
PageRangestringOnly these pages. Page 2 of the sample is the chart.Values: e.g. 2
PageSizeenum, default defaultPaper size, replacing the file's.Values: letter, legal, tabloid, ledger, statement, executive, lettersmall, a3, a4, a4small, a5, b4, b5
PageOrientationenum, default defaultOrientation, replacing the file's.Values: default, portrait, landscape
FitToPageboolean, default falseEach sheet one page across.
ScaleintegerPrint zoom in percent.Values: 10–300
TransparentColorstringPixels of exactly this color become transparent.Values: a color name, #RRGGBB or R,G,B
BackgroundColorstring, default whiteColor under the page.Values: a color name, #RRGGBB or R,G,B
PasswordstringOpens a protected ODS.
FileNamestringStem for the image names.
StoreFileboolean, default falseReturn links valid for 3 hours.

Not supported yet

Setting one of these to anything but its default returns 400.

Refused when set: AutoFitColumns, ThousandsSeparator, DecimalSeparator, DateFormat.

What carries over, and what doesn't

Kept

  • Both printed sheets in tab order: the register on page 1, the chart on page 2
  • The file's Letter landscape setup, header and "Page 1 of 2" footer
  • Every pixel of the drawn pages: the images are lossless (VP8L)
  • Fills, number formats and the chart's colors

Lost or not yet supported

  • The hidden Fees sheet.
  • DPI information, which WebP can't hold.
  • Lossy compression is not available: ImageQuality is ignored on this route.

Limits

  • One spreadsheet per request.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
  • No more than 2,000 page images per request.
  • 16,000 pixels per side and 100,000,000 pixels per page image, or 413.
  • 120 seconds per conversion, then 504.

Where teams use it

Spreadsheet pages on a web page

Publish the current register and chart on a site as images that load quickly and stay sharp: lossless WebP keeps every pixel of the small print.

Lighter previews than PNG

For the sample's first page, WebP is 101,982 bytes against 270,834 for PNG, with identical pixels.

One image per sheet in a gallery

Combine WorksheetIndex with ImageWidth to render each sheet of a workbook as its own thumbnail.

Questions

Is the WebP lossless?

Yes, always. Each page is written as lossless WebP, so lettering and chart edges match the drawn page exactly. To make files smaller, reduce ImageWidth or ImageResolution; ImageQuality has no effect.

How does the size compare with PNG and JPEG?

For the sample's register page at 150 DPI: 101,982 bytes as WebP, 270,834 as PNG and 170,303 as a JPEG at quality 85. The mostly white chart page is 34,868 bytes as WebP.

Can I get the chart page alone?

Yes. PageRange=2 gives the second printed page, which in the sample is the Harvest sheet with its chart, or name the sheet with WorksheetName=Harvest.

Convert your first ODS file in a minute.