How it works

Compression that happens on your device

A plain-English walkthrough of how Compress Video File turns a big video into a small one — entirely inside your browser, without ever uploading your file.


The flow, in three steps

  1. 1

    You drop a video in

    When you pick or drag a file, your browser reads it straight from disk into memory. We read its metadata — dimensions, duration, size — with a quick hidden

  2. 2

    You choose a target size

    Pick a preset (WhatsApp 16 MB, Email 25 MB, Discord, Discord Nitro 500 MB…) or set a custom size and resolution. We convert that into a precise video bitrate the encoder should aim for.

  3. 3

    It compresses, locally

    A WebAssembly build of ffmpeg re-encodes the video to H.264/AAC at that bitrate, showing a real progress bar. When it's done, you preview and download. The original and the result both stay in your browser's memory.


The engine: ffmpeg, compiled to WebAssembly

ffmpeg is the industry-standard video tool that powers most of the encoders you've ever used. Normally it runs on a server. We use ffmpeg.wasm — the same ffmpeg compiled to WebAssembly so it runs inside your browser tab. That's the unlock: a real, full-strength video encoder with no server.

The first time you compress something, the browser downloads the compressor's code (a one-time ~25 MB WebAssembly binary) from a CDN and caches it. To be clear about what crosses the network: the code comes down; your video never goes up. After that first load it's cached, so repeat compressions — and even offline use — work without touching the network at all.

Where your browser supports it, we load the multithreaded build of the encoder (using all your CPU cores for speed). That needs a browser feature called SharedArrayBuffer, which is why this site sends special cross-origin-isolation headers. If those aren't available, we automatically fall back to the single-threaded build — slower, but it still works everywhere.


The math behind hitting a target size

A video file's size is basically its bitrate (bits per second) multiplied by its duration. So to hit a target size, we work backwards from how many seconds long your clip is:

total_kbps = (target_MB × 8192) ÷ duration_sec

video_kbps = max(total_kbps − 128, floor)

We reserve 128 kbps for AAC audio and give the rest to the video stream, clamped to a sensible minimum so the result never turns to mush. If your target is implausibly small for a long clip, the app warns you before encoding instead of producing an unwatchable file. Then ffmpeg encodes with H.264 (libx264), a matching -maxrate/-bufsize, optional downscaling, and -movflags +faststart so the file streams instantly.


Why “never uploads” is true, not marketing

Most online video compressors upload your file to a server, compress it there, and hand back a download. Your personal video then sits on a machine you don't control. Compress Video File is built the opposite way: the encoder runs in your browser, so there is no upload step at all. The only network request is for the encoder's own code — and you can verify that in your browser's Network tab: you'll see the wasm download, and you'll never see your video go out.

See it for yourself

Drop in a clip and watch the progress bar move — no upload, no waiting on a server queue.

Compress a video →