Compress PNG
Reduce PNG file size by converting to palette mode with optimization. Drag and drop multiple images.
Click or drag PNG files here to upload
Up to 20 images · Max 10MB eachCompress PNG
This tool compresses PNG images by converting them to palette mode and applying optimization. The compression runs entirely in your browser — no file upload to a server.
PNG format uses RGBA color for each pixel. The 'A' stands for opacity, allowing transparent backgrounds. When compressing, we convert to palette mode which reduces the number of colors while maintaining visual quality.
How to use
- Drag and drop PNG files onto the upload area, or click to select files.
- Each file is compressed automatically and the compression rate is displayed.
- Download individual compressed files or use Download All to get a ZIP archive.
PNG vs JPEG comparison
Compression: PNG is lossless, JPEG is lossy. PNG preserves all original data; JPEG discards some for smaller files.
Transparency: PNG supports transparency (alpha channel), JPEG does not.
Best for: PNG is best for graphics, icons, and images with transparency. JPEG is best for photographs.
Compress with Python
You can compress PNG images programmatically using Python with the Pillow library:
from PIL import Image
original = Image.open('input.png')
original.convert('P')
original.save('compressed.png', optimize=True, quality=80)
MCP integration
MCP (Model Context Protocol) lets AI agents and apps discover and run Coding.Tools utilities for repeatable conversions, formatting, hashing, and generation workflows.
MCP tool name: compress-png
MCP endpoint: https://coding.tools/mcp
Call tools/list first. Each tool entry includes inputSchema, outputSchema, and examples so an AI agent or client can build valid arguments without guessing.
For tools/call, read result.content[0].text for the display value and result.structuredContent for machine parsing. Tool-level failures return isError: true; protocol failures return a JSON-RPC error.
Example tools/call request:
curl -s https://coding.tools/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"compress-png","arguments":{}}}'
This image tool is browser-only in MCP. tools/call returns isError: true plus a resource_link to the web UI instead of processing local image bytes on the server.
Most text and data tools accept an input string plus optional options. Browser-only image tools are listed for discovery and return a web UI link when they need browser image APIs.