Compress Video to Target Size
Choose a video and a target size. This page estimates a bitrate, re-encodes the clip in this tab, and downloads an MP4. The result may be slightly under or over the target.
Add a video file
Choose a target size
How to use Compress to Size
- Add a videoChoose one video of at most 512 MB and at most 30 minutes. Typical formats include MP4, MOV, and WebM. Other types work only if this browser can decode them.
- Set the targetPick 8 MB, 10 MB, 15 MB, 25 MB, 50 MB, or a custom size between 0.25 MB and 512 MB. You can drop the soundtrack to leave more of the budget for the picture.
- Download an MP4The page re-encodes in this tab and offers an MP4 download. If the first pass is still over the target, it retries at a lower bitrate, up to three attempts.
Limits and how it works
- One file at a time, at most 512 MB, and between 0.25 seconds and 30 minutes long.
- The target must be between 0.25 MB and 512 MB. Very small targets on long clips may be impossible.
- Output is MP4. AVC is preferred; otherwise VP9 in MP4. The size is estimated and may not match exactly.
- This browser must support WebCodecs. Input formats depend on what it can decode.
- Very large files can run out of memory, especially on phones.
How the target size is estimated
The video bitrate is estimated from a byte budget: video_bps ≈ (target_bytes × 8 × (1 − 0.04) × 0.92 / duration) − audio_bps. Audio, when kept, is 96 kbps AAC. The 4% term is an allowance for MP4 container overhead, and the 0.92 factor leaves a safety margin. If the first file is still over the target, the bitrate is scaled by (target / result) × 0.95 and the clip is encoded again, up to three attempts. Resolution may also be reduced when the budget is too small for the original frame size. This is an estimate, not a guarantee, because browser encoders do not hit a bitrate exactly.
Encoding uses unmodified mediabunny 1.66.4 (Mozilla Public License 2.0), already used by Compress Video, together with this browser’s WebCodecs encoder. AVC (H.264) is preferred; if the browser cannot encode AVC, the file is written with VP9 in an MP4. When a native AAC encoder is missing, the bundled FFmpeg native AAC encoder (LGPL-2.1-or-later, no GPL parts) is used. The notice and corresponding source are at /notices/mediabunny-1.66.4.txt. Library source files are not modified. For quality presets instead of a target size, use Compress Video.
Frequently asked questions
Is the file uploaded?
No. Probing, bitrate planning, and encoding all run in this tab.
Will the download be exactly 25 MB if I choose 25 MB?
Not always. The tool aims to stay at or under the target, but encoder output varies. If the file is still over after retries, the smallest result is still offered, and the page says so.
What if the video is already smaller than the target?
It is left as is and is not re-encoded. Re-encoding a smaller file would not be useful and could reduce quality.
How is this different from Compress Video?
Compress Video offers low, medium, and high quality presets. This page aims at a chosen file size such as 8 MB or 25 MB.
Related tools
All toolsVideo Compressor
Shrink MP4, MOV and WebM videos to a smaller MP4 without uploading.
Trim Video
Cut the start and end off a video, fast or frame-accurate.
MOV to MP4 Converter
Convert iPhone and QuickTime MOV videos to MP4, usually without re-encoding.
Video to GIF Converter
Turn a short clip from MP4, MOV or WebM into an animated GIF.