About Compressly

A fast, private, browser-native file compressor. No backend. No cloud. Every byte stays on your device.

Why browser-native?

Traditional file compression services upload your files to servers. That means your private photos, confidential PDFs, and personal videos travel across the internet before you get a compressed version.

Compressly does all the work locally using APIs built into modern browsers — the same Canvas API that powers browser games, the WebCodecs API used by video editors, and OffscreenCanvas for GPU-accelerated rendering. The result is compression that is fast, private, and completely free.

Hardware acceleration

On supported browsers (Chrome 94+, Safari 16.4+, Edge 94+), video compression uses the WebCodecs API which routes encoding to the device's GPU or dedicated video hardware. On older browsers, MediaRecorder is used as a fallback.

Image compression uses OffscreenCanvas where available, which moves pixel operations off the main thread and can leverage GPU compositing.

How each format is handled

🖼️ Images (JPEG, PNG, WebP, AVIF)

Images are decoded into a bitmap via createImageBitmap(), drawn onto a canvas at the target dimensions, then re-encoded in the chosen output format. For target-size mode, a binary search across quality values (0–100) finds the optimal setting within ~12 iterations.

📄 PDFs

PDF files are loaded with PDF.js, each page rendered at 1.5x scale to a canvas, then saved as a compressed JPEG. A minimal hand-crafted PDF container wraps all pages back into a valid PDF file with embedded image XObjects.

🎬 Video (MP4, WebM)

With WebCodecs, video frames are decoded, re-encoded with H.264/VP9 at the target bitrate, and hardware acceleration is requested from the browser. Without WebCodecs, the video plays into a canvas stream which is captured by MediaRecorder at the target bitrate.

Tech stack

SvelteKit
Framework & routing
TypeScript
Type safety
Canvas API
Image rendering & compression
OffscreenCanvas
Off-main-thread rendering
WebCodecs
Hardware-accelerated video
MediaRecorder
Video fallback encoding
PDF.js
PDF parsing & page rendering
Vite
Build tool & dev server
Cloudflare Pages
Hosting & CDN

Alpha status

This is Draft 1 Alpha. The core compression pipeline works, but there are known limitations:

  • Video output via WebCodecs is raw H.264 without a proper MP4 container muxer (planned: mp4box.js integration)
  • Very large PDFs (100+ pages) may be slow without Web Worker offloading
  • AVIF encoding support depends on browser (Chrome 94+ only)
  • Batch download is sequential — a ZIP bundler is planned for v1