🖼️ Image Compressor

Compress Images Instantly

Fast, free, and privacy-focused image compression. All processing happens in your browser.

📤
Click to upload or drag and drop
Supports JPG, PNG, WebP, GIF

Compressing your image...

Original

Original
Size: -
Dimensions: -

Compressed

Compressed
Size: -
Dimensions: -
Saved: -

API Documentation

Integrate image compression into your applications with our simple REST API.

POST /api/compress

Compress an image with customizable settings. Note: For best results, use client-side compression via the web interface.

curl -X POST \
  -F "image=@photo.jpg" \
  -F "quality=70" \
  -F "format=webp" \
  -F "resize=false" \
  YOUR_WORKER_URL/api/compress \
  -o compressed.webp
const formData = new FormData();
formData.append('image', fileInput.files[0]);
formData.append('quality', '70');
formData.append('format', 'webp');
formData.append('resize', 'false');

const response = await fetch('/api/compress', {
  method: 'POST',
  body: formData
});

const blob = await response.blob();
// Create download or display compressed image
Parameters:
  image     - File (required) - Image file to compress
  quality   - Number (1-100)  - Compression quality (default: 80)
  format    - String          - Output format: auto, jpeg, png, webp
  resize    - Boolean         - Enable image resizing (default: false)
  maxWidth  - Number          - Maximum width if resize enabled
  maxHeight - Number          - Maximum height if resize enabled
GET /api

Get API documentation in JSON format.

curl YOUR_WORKER_URL/api