Convert Image Format
Image → Convert Image Format
The Convert Image Format API converts an image from one format to another. You send the image as Base64 (docContent), docName, currentImageFormat (BMP, GIF, JPG, PNG, TIFF), newImageFormat, and optionally async. The API returns the image in the target format. Use the tester below to try it; more details are in the sections that follow.
Try the Convert Image Format API
:::note Quick reference
Endpoint: POST /api/v2/ConvertImageFormat · Required: api-key, docContent, docName, currentImageFormat, newImageFormat
:::
:::info Try it live Use the form below to send your API key, image (Base64), current format, and target format. The response is the image in the new format. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Convert Image Format?
This endpoint converts an image from one format to another. You provide the image (Base64), docName, currentImageFormat (BMP, GIF, JPG, PNG, TIFF), and newImageFormat. The API returns the image in the target format while preserving quality where possible.
Key features
- Formats – BMP, GIF, JPG, PNG, TIFF (source and target).
- Single request – Send docContent, docName, currentImageFormat, newImageFormat; no extra steps.
- Async – Use async for large images.
:::tip Best for Use when you need a different format for web (e.g. PNG), print (TIFF), or compatibility. Combine with Compress Image or Resize Image in a pipeline. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | Image file content (Base64). Supported: BMP, GIF, JPG, PNG, TIFF. |
| docName | string | Yes | Output image file name (e.g. output.png). |
| currentImageFormat | string | Yes | Source format: BMP, GIF, JPG, PNG, TIFF. |
| newImageFormat | string | Yes | Target format: BMP, GIF, JPG, PNG, TIFF. |
| async | boolean | No | Enable asynchronous processing. |
When to use Convert Image Format
- Web – Convert to PNG or JPG for web use.
- Compatibility – Convert to a format required by another system or tool.
- Workflows – Use after Create Image from PDF to get a specific format.
:::info Need the full API? For request/response schemas and code samples, see Convert Image Format in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- An image file (BMP, GIF, JPG, PNG, TIFF) in Base64 format
Response Format
The API returns an image file in the specified target format.