How to use it
- Drop a video (MP4, MOV, WebM, MKV, AVI and most other formats). The original size, length and picture size are shown.
- Choose a quality level, or switch to “Target size” and type the size you need in MB — 25 MB for e-mail or chat, 8 MB for some messaging apps.
- Pick a resolution if the video is larger than it needs to be, and decide whether to keep the audio.
- Press “Compress video”. The first run downloads the 32 MB engine; after that the progress bar shows the encode, which you can cancel at any time.
- Check the preview and the new size, then download the MP4. Nothing is saved anywhere else.
Example
A 1920 × 1080 phone clip of 1 minute at 48 MB: “Medium” with the resolution kept typically gives 12–18 MB; the same at 720p about 6–9 MB. With a 10 MB target and the audio kept, the tool spreads 10 MB × 8 ÷ 60 s = 1,333 kbps over the minute, keeps 3% for the container and 128 kbps for the audio, and encodes the picture at 1,165 kbps; the result lands at roughly 9–11 MB.
How the size is controlled
quality mode: libx264 -crf {23 | 28 | 33} -preset veryfast
target mode: video kbps = (target bytes × 8 ÷ 1000 ÷ seconds) × 0.97 − audio kbps
-b:v kbps -maxrate kbps -bufsize 2×kbps (single pass, floor 50 kbps)
resolution: short side capped at 1080 / 720 / 480 / 360, aspect ratio kept, even sizes
audio: AAC 128 kbps, or removed (-an)CRF (constant rate factor) keeps the visual quality constant and lets the size follow the content, so static footage compresses far more than sports. The target mode cannot be exact in one pass: the encoder is held to a bitrate cap but may stay below it on easy scenes or overshoot slightly on hard ones. Lossless compression is not offered — this tool always re-encodes, and already heavily compressed sources (low-bitrate WhatsApp or screen recordings) may come out larger than the original; the result says so when that happens.
The engine is FFmpeg 6 (@ffmpeg/core 0.12.6, single-threaded build) fetched from the unpkg CDN on first use and cached by your browser; your file never leaves the device. WebAssembly can address at most 2 GB, so inputs above a few hundred MB can fail with an out-of-memory message. Speed is roughly real time on a laptop at 720p and slower on phones; the browser tab must stay open while it runs. H.264 output plays everywhere; the preview in some open-source browsers may not work even though the file is fine.
Sources: FFmpeg H.264 encoding guide (CRF, presets), ffmpeg.wasm.
Questions
- Why is the compressed file not exactly the target size?
- The bitrate is set once for a single pass; the encoder spends less on simple scenes and can slightly exceed the cap on complex ones. Results are usually within 15% of the target. If you need to stay under a hard limit, set the target about 10% lower.
- Does compressing reduce the quality?
- Yes — every setting here re-encodes the video, which discards detail. At "High" the difference is hard to see; at "Small" edges soften and fast motion blocks. Keep your original if you may need it later.
- Can I compress a video larger than 1 GB?
- Usually not in the browser: the input, the working buffers and the output all have to fit in the 2 GB that WebAssembly can address. Trim the video first or use a desktop tool for very large files.
- Why MP4 and H.264 only?
- It is the one combination every phone, browser and editor plays, and the encoder is fast enough to run in a browser tab. HEVC and AV1 would be smaller but several times slower to encode here and less widely supported.