$ PNG to WebP, WebP Conversion API
Convert PNG Images to WebP via API
Convert PNG images to WebP with one REST call. Send the file or a public URL, set the quality, and get a lighter WebP back with transparency intact. Built for image pipelines, CDNs and storefronts.
Free: 10 conversions a month, no card. Pro: $9/month. Compare plans
# Convert PNG image to WebP
curl -X POST \
https://api.convertfilefast.com/v2/convert/png-to-webp \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@logo.png" \
-F "quality=85" \
--output logo.webp
# HTTP 200 OK — Content-Type: image/webpimport requests
response = requests.post(
"https://api.convertfilefast.com/v2/convert/png-to-webp",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"file": open("logo.png", "rb")},
data={"quality": "85"}
)
with open("logo.webp", "wb") as f:
f.write(response.content)const formData = new FormData();
formData.append("file", fs.createReadStream("logo.png"));
formData.append("quality", "85");
const response = await fetch(
"https://api.convertfilefast.com/v2/convert/png-to-webp",
{
method: "POST",
headers: { "Authorization": "Bearer YOUR_API_KEY" },
body: formData,
}
);
fs.writeFileSync("logo.webp", Buffer.from(await response.arrayBuffer()));// n8n HTTP Request Node
{
"method": "POST",
"url": "https://api.convertfilefast.com/v2/convert/png-to-webp",
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{ "name": "file", "parameterType": "formBinaryData", "inputDataFieldName": "data" }
]
},
"options": { "response": { "responseFormat": "file" } }
}// Advantages
Why use our API?
Complete and reliable solution for integration in any tech stack.
Transparency Kept
Alpha channels carry over, so logos, icons and cut-out product shots keep their see-through background.
Lighter Files
WebP is built for the web and usually comes out smaller than the PNG it replaces: faster pages and lower bandwidth.
You Set the Quality
Pass quality from 1 to 100 to trade file size for detail. The default is 90.
Upload or URL
Send the PNG as multipart/form-data or point the url field at a public image. No SDK, no file handling.
Fits Image Pipelines
Convert whole asset libraries before they reach your CDN, or convert on upload, with a single HTTP call. Works in n8n with the HTTP Request node.
Built for AI Agents
The same conversion is one MCP tool call, so an agent can turn a PNG into WebP with no HTTP client.
// How it works
4 steps to run this conversion
- 01
Create an API key
Sign up at convertfilefast.com/signup and copy your cff_ API key from the dashboard. The free plan includes 10 conversions per month.
- 02
POST the PNG to the endpoint
Send a multipart/form-data POST to https://api.convertfilefast.com/v2/convert/png-to-webp with header X-API-Key: cff_your_key (Authorization: Bearer also works), the image as a file field or a public url field, and optionally quality.
- 03
Receive the WebP image
The response body is the WebP image, streamed back with a Content-Disposition filename. Save it or pass it straight to the next step of your pipeline.
- 04
Or invoke it from an AI agent
Add the MCP server to Claude, Cursor or any MCP-compatible client using https://mcp.convertfilefast.com/mcp, then call convert_file({ target_format: 'webp', source_url: '...' }) as a single tool call, with no HTTP client and no file handling.
// For AI agents
Or call this from Claude, Cursor, or any MCP client
Convert File Fast ships a native Model Context Protocol server. Give this conversion to an AI agent as a single tool call — no HTTP client, no binary handling, per-user API keys.
npx -y convertfilefast-mcpconvert_file({ target_format: "webp", source_url: "https://example.com/file.png" })// Compared with
Convert File Fast vs alternatives
| Product | Native MCP | Free tier | Price |
|---|---|---|---|
| Convert File Fast | Yes | 10/month | $0.004/conv from $4 |
| Smallpdf | No | 2/day (unregistered) | $9/mo Pro |
| iLovePDF | No | Rate-limited | $7/mo Premium |
| Adobe Acrobat Online | No | Limited trials | $19.99/mo Acrobat Standard |
| CloudConvert | No | 10/day | From $9/mo (1,000 credits) |
Competitor pricing checked on 2026-07-16.
// FAQ
Frequently Asked Questions
How do I convert PNG to WebP with an API?
Send a POST request to https://api.convertfilefast.com/v2/convert/png-to-webp with your image as a multipart/form-data upload in the file field. The response body is the WebP image. See the cURL and Python examples above for ready-to-run code.
Does the conversion keep PNG transparency?
Yes. When the PNG has an alpha channel, the WebP keeps it.
Can I control the output quality?
Yes. Add the quality form field with a value from 1 to 100. If you leave it out, the API uses 90.
Can I send an image URL instead of uploading the file?
Yes. Pass a public link in the url form field instead of file.
How do I convert WebP back to PNG?
Use the reverse endpoint, https://api.convertfilefast.com/v2/convert/webp-to-png. It takes the same file or url field and returns a PNG.
Can I call it from n8n or an AI agent?
Yes. It is a standard REST endpoint, so any HTTP client works, including the n8n HTTP Request node (see the n8n tab above). AI agents can call it through the MCP server with convert_file and target_format webp.
// Related Tools
// Try free or subscribe
Start Converting PNG to WebP
Get your API key and convert PNG images to WebP in seconds. Free plan includes 10 conversions per month.
Compare plans- Free$0/mo10 conversions per monthStart Free
- Pro$9/mo5,000 conversions per monthSubscribe Pro
- Scale$59/mo50,000 conversions per monthSubscribe Scale