Why Do This in Your Browser?
Most online video compressors push your files to a server, run FFmpeg on the back end, and send the compressed result back. That works, but it means every clip — including private recordings, client work, and embargoed material — leaves your device. For platform-specific compression where the only goal is hitting a file-size cap, there's no good reason for the upload step.
This tool runs FFmpeg.wasm — the WebAssembly build of FFmpeg — entirely in your browser. The compression engine downloads once (~32MB), caches locally, and runs every job thereafter on your CPU. Files stay on the device. The platform presets calculate target bitrate from your video's duration and your chosen cap, then re-encode using H.264 (the codec every messaging app, social network, and email client decodes natively).
How It Works
Pick a preset that matches where the video is going. Presets use commonly cited limits, which platforms change; check the current limit if you are close to it. As of October 12, 2026: WhatsApp's help centre gives a default video limit of 64 MB at 480p on slower connections and 100 MB at 720p on faster ones (larger files go as documents, up to 2 GB); Discord allows 20 MB on free accounts (raised from 10 MB on August 13, 2026), 50 MB with Nitro Basic and 500 MB with Nitro; Gmail sends messages up to 25 MB, a limit that counts the encoded message: attachments travel as Base64, which adds a third (4 bytes for every 3), so the Gmail preset targets 18 MB (18 × 4/3 = 24 MB). Upload sites such as TikTok, YouTube and Instagram accept files far larger than these, so they have no preset: use Custom size if you want a smaller upload. The tool reads your video's duration and works backward: target_bitrate = (target_size_in_bits × 0.97 / duration_in_seconds) − audio_bitrate. A single encoding pass can still land a few percent over, so the finished file is checked against the cap and re-encoded at a proportionally lower bitrate if needed: in our test a 5 MB target first came out at 5.30 MB and the delivered file was 4.99 MB.
Output is H.264 + AAC in an MP4 container — the universally-compatible combination. For very small targets, the bitrate gets too low for full resolution; shrink the video first with the Video Resizer. Audio is kept (re-encoded to 128 kbps AAC) unless you mute it. The tool never encodes above your file’s own bitrate, so if a video is already under the target and re-encoding would not make it smaller, it tells you to keep the original instead of handing back a bigger file.
Tip: If your source is in MOV, MKV, or AVI, run it through the Video Converter first — H.264 in MP4 compresses faster and more predictably than less common codecs. Compress only the part you actually need by trimming the video first.
Common Use Cases
Worked example: a 20 MB, 20-second 1080p clip at two targets
How the tool picks a bitrate: target size × 0.97 ÷ duration, minus 128 kbps for audio, but never more than 70% of the input's own video bitrate. It encodes once with x264 (veryfast, -maxrate 1.5× and -bufsize 2× the target) and, if the file is still too big, re-encodes up to twice at a proportionally lower bitrate. On October 12, 2026 we ran that exact logic with desktop FFmpeg 6.1.1 on a 20 s, 1920×1080, 30 fps test clip with moving detail and fine temporal grain (19.9 MB, 7.96 Mbps, AAC audio). Sizes are decimal megabytes (1 MB = 1,000,000 bytes), as the tool now uses:
| Target | Bitrate from the target | Bitrate used | Encodes | Output | PSNR vs input |
|---|---|---|---|---|---|
| 16 MB (custom) | 6.08 Mbps | 5.48 Mbps (capped at 70% of the input) | 1 | 14.37 MB | 38.9 dB |
| 8 MB (custom) | 2.98 Mbps | 2.98 Mbps | 1 | 7.99 MB (7,986,955 bytes) | 36.8 dB |
- The 70% cap can land well under the target. This input was only 19.9 MB, so the 16 MB target allowed 6.08 Mbps but the cap held it to 5.48 Mbps, and the file came out at 14.37 MB. That avoids pointless re-encodes of files that are already small, at the price of a little quality you could have kept.
- Both runs fitted first time and the quality held up (37–39 dB PSNR on grainy footage, the hardest kind to compress), and the 8 MB result landed 13 KB under its limit: the 3% margin is what keeps single-pass encodes inside the target. The same 16 MB for a 3-minute clip leaves about 0.6 Mbps for video, where 1080p falls apart; resize to 720p first.
- "MB" here means 1,000,000 bytes. Targets are decimal megabytes, so a 20 MB target never produces more than 20,000,000 bytes. That fits whether a service counts megabytes in decimal or in binary (1,048,576 bytes), which is why the tool switched from binary megabytes on October 12, 2026.
- Check limits before you trust a preset. Platform caps change: Discord cut its free limit from 25 MB to 10 MB in 2024 and raised it to 20 MB on August 13, 2026. Each preset lists the figure and date it was checked against; use Custom size if a platform has changed it since.
Sources
Checked on .
- FFmpeg H.264 encoding guide (bitrate targeting, -maxrate/-bufsize)
- FFmpeg documentation: libx264 options
- Dexerto (Aug 13, 2026): Discord raises free upload limit to 20MB
- NIST: Prefixes for binary multiples (MB vs MiB)
- WhatsApp Help Center: How to send media (default video limits, 2 GB documents)
- Neowin (Aug 2026): Discord free 20 MB, Nitro Basic 50 MB, Nitro 500 MB
- Gmail Help: Attachment size limit (25 MB per message)
- RFC 2045 §6.8: Base64 encodes 3 bytes as 4 characters
- Suped: Gmail's 25 MB limit includes encoded content