Skip to content

Compress Video to a Target Size

Compress MP4, MOV, AVI, MKV & WebM locally in your browser. No upload, account, or watermark.

One-click sharing presets: Compress for Discord / Compress for Gmail

Settings

Video output settings

1 MB = 1,000,000 bytes. 1 MiB = 1,048,576 bytes.

Advanced settings

Auto resolution fits the size budget. Auto audio keeps source audio when present. Fast is recommended; medium is slower but more efficient. Two-pass encoding takes longer than quality-based compression. The first video and audio tracks are used; subtitles and additional tracks are not copied. AAC audio is measured before video encoding. Surround audio is downmixed to stereo.

Compression

Select a video to get started


Buy Me a Coffee

TL;DR

Choose a maximum video size in MB or MiB. Localsquash uses local two-pass H.264 encoding, measured audio, and actual-byte checks to aim for 95-100% of your limit. Exact size is not guaranteed: smaller files are identified and oversized files are not reported as success. Fitting MP4 results download automatically. No upload, account, or watermark.

What Is Target-Size Video Compression?

When an upload form has a file-size limit, choosing a quality setting alone is unpredictable. This tool uses the clip's duration, an audio budget, and two-pass H.264 encoding to aim near your requested size. FFmpeg runs in your browser through WebAssembly, without sending your footage to a server. The tool checks the actual exported bytes and complete selected clip duration before showing a result.

What Do Size, Bitrate, and Resolution Mean?

Maximum File Size
Your target is a ceiling, not a promise of exact bytes. One MB is 1,000,000 bytes; one MiB is 1,048,576 bytes. Some destinations label binary sizes as MB, so compare the exact byte limit when possible.
Video and Audio Budget
AAC audio is encoded and measured first. The remaining space, after a reserve for the MP4 container, determines the video bitrate. A longer clip needs a lower bitrate to fit the same size.
Resolution and Speed
Auto resolution estimates suitable dimensions for the budget and never upscales. Fast is the recommended preset; medium takes longer but can use the available bits more efficiently. Both use two video passes.

How to Compress a Video to a Specific MB Size

  1. Drop or select your video

    Choose a supported local file. The engine reads its metadata even when the browser cannot preview the original format. Your video stays on your device; nothing is uploaded.

  2. Set your maximum size

    Enter the destination's size limit and choose MB or MiB. Leave a little extra headroom if you do not know the destination's exact byte limit.

  3. Choose the clip and settings

    Optionally trim the video with the timeline handles. Auto resolution estimates suitable dimensions without upscaling. Audio is retained unless you explicitly remove it.

  4. Encode and download

    Wait for both passes and the size check. MP4 results that fit your limit download automatically. Review the verified size in the compression panel; use Download again if your browser blocks the download. Oversized results are clearly identified, not automatically downloaded.

Target Size vs. Quality-Based Compression

Busy scenes need more bits than static slides to look equally clear. Two-pass encoding allocates the available bits across the clip, but cannot guarantee both a tiny file and unchanged quality. A file-size target is useful when the destination has a hard upload limit.

If you care more about visual quality than a hard size cap, use the quality-based video compressor with CRF, crop, and resolution controls instead.

A Size Limit Is Not an Exact-Size Guarantee

The goal is 95-100% of the requested maximum. MP4 overhead and encoder behavior vary, particularly for very short or simple clips. Up to three encoding attempts adjust the budget. A below-range file is reported honestly; padding is never added to make it look exact.

The complete selected clip must survive the duration check. The tool does not truncate the output to force a smaller file. If it still exceeds the limit, increase the size, trim the source yourself, or reduce the audio budget. Oversized results require a manual download and are clearly marked as not meeting the limit.

Target-Size Video FAQ — Common Questions Answered

Private Processing, Practical Browser Limits

Media files are not uploaded. The engine is downloaded on first use, and processing runs locally in the open tab. Reloading offline is not guaranteed. Files must be smaller than 2,000 MB, and available RAM can impose a much lower limit.

Keep the tab open while encoding; mobile browsers may suspend background jobs. Two-pass encoding takes longer than quality-based compression. For large, long, or HDR videos, a desktop encoder is a better fit. HDR tone mapping is not supported by this tool.

Convert Supported Video Formats to H.264 MP4

The output is H.264 MP4 with optional AAC audio. The first video and audio tracks are used; subtitles, chapters, and additional tracks are not copied. Actual input support depends on the codecs available in the bundled FFmpeg build, not just the filename.

MP4 & MOV

Supported SDR footage can be re-encoded to fit your chosen size budget. Selecting a larger target does not restore detail already lost to compression.

WebM

Supported WebM recordings can be converted to H.264 MP4 for sharing. The selected clip duration and actual output size are checked after encoding.

MKV & Other Containers

A source may be convertible even when its browser preview is unavailable. Visual trimming needs a working preview, but full-video conversion can still work.

How to Get Better Quality Within a Size Limit

Check the destination's units

Use the destination's exact byte limit when you can. Leave headroom if its MB label is ambiguous; rounding a displayed size does not change the actual bytes.

Trim before encoding

Removing unwanted seconds gives the remaining footage a larger share of the same file-size budget. Use the timeline handles and reset button to choose the clip yourself.

Match resolution to the budget

A very small budget spread across a large frame can look worse than a lower-resolution version. Start with Auto, then choose a smaller resolution if the result is not clear enough.

Choose a realistic audio budget

Audio uses space that is unavailable to video. Lower its bitrate or explicitly remove it if appropriate. Surround audio is downmixed to stereo AAC.