Skip to content

Compress video to a target size in MB or MiB

Choose a maximum file size for an upload or attachment. Localsquash uses local two-pass encoding and checks the resulting MP4’s actual bytes and selected clip duration.

One-click sharing presets: Discord / Gmail / WhatsApp / Outlook and Yahoo Mail / Telegram / Slack / iMessage / X (Twitter)

Target-size video compressor

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

A target-size video compressor aims to fit a video within a chosen file-size budget. Enter a maximum in MB or MiB; Localsquash uses local two-pass H.264 encoding, retains AAC audio unless removed, and checks actual output bytes and selected clip duration. Exact output size is not guaranteed.

How to compress video to a size limit

  1. Select a video and enter your maximum size.
  2. Choose MB or MiB. Optionally trim the clip; start with Auto resolution. Audio stays unless you remove it.
  3. Compress and check the result. Files that fit download automatically; oversized results are marked and require manual download.

Smaller budgets reduce quality. Trim unwanted footage or lower resolution to give the remaining content more bits. Inputs must be below 2,000 MB; browser memory may impose a lower limit.

Compress video to 10, 20 or 25 MB

Enter 10, 20, or 25 and choose MB to set a maximum size budget. These are custom targets, not universal limits for any platform. Check your destination’s current allowance and the actual result.

  • Trim first: a shorter clip leaves more bits per second for the footage you keep.
  • Start with Auto resolution: inspect fine detail and text before sharing.
  • Leave attachment headroom: choose a lower target when other files share the same budget.

What is the difference between MB and MiB?

  • 1 MB = 1,000,000 bytes
  • 1 MiB = 1,048,576 bytes
  • 10 MB = 10,000,000 bytes

Use the unit specified by your destination.

Technical specifications

Localsquash video processing specifications
EngineFFmpeg compiled to WebAssembly (ffmpeg.wasm core 0.12.10, single-threaded), running in your browser tab
InputsMP4, MOV, WebM, MKV, AVI (decodable by the bundled FFmpeg build)
Video outputH.264 (libx264, yuv420p) in MP4 with faststart
Audio outputAAC; can be removed in target-size mode
Quality controlCRF 0–51 with x264 presets from ultrafast to veryslow
Size controlTwo-pass target size in MB (1,000,000 bytes) or MiB (1,048,576 bytes); inputs below 2,000 MB
Not supportedHDR tone mapping, subtitle tracks, batch queues
MemoryLimited by the browser and device; phones fail sooner on large files
NetworkAbout 32 MB of engine files downloaded from cdn.jsdelivr.net when you select a file; your media is never sent

How to verify nothing is uploaded

  1. Open your browser’s developer tools and select the Network tab.
  2. Select a file and wait until the engine status shows Ready.
  3. Optionally switch the device offline, then start compression. It still completes because encoding runs locally.
  4. Review the requests: page assets, analytics, and ffmpeg-core files appear, but no request contains your media.

Target-size FAQ

Can I compress a video to 10 MB, 20 MB, or 25 MB?

Yes. Enter 10, 20, or 25 and select MB to set that maximum size budget. Localsquash encodes to H.264 MP4 and checks the actual output bytes. Fitting the budget depends on clip duration and settings; exact size and acceptable quality are not guaranteed. Leave room if the destination counts other attachments toward the same limit.

Will the file be exactly my requested size?

No. The tool targets a size budget and verifies actual bytes and selected duration. Smaller or oversized results are labeled. It does not add padding or automatically shorten your selected clip to force a match.

Why use this instead of CRF?

CRF targets quality, so size varies with the footage. Two-pass encoding distributes a bitrate budget across the clip to approach a size limit.

Which formats and tracks are supported?

Common inputs include MP4, MOV, WebM, MKV, and AVI, depending on the source codecs. Output uses the first video and audio tracks. Subtitles, chapters, and extra tracks are not copied.

What if the video cannot fit?

Trim unwanted footage, reduce resolution, lower the audio budget, or increase the maximum size. Longer clips need more compression to fit the same budget. The tool reports infeasible budgets and oversized results. Keep original downloads the unchanged source when it already fits.

What are the browser limits?

Input must be below 2,000 MB; available RAM may impose a lower limit. Two-pass software encoding can be slow. HDR tone mapping is unsupported. Media stays local; offline refresh is not guaranteed.

Prefer a quality target? Use the CRF video compressor. For automatic settings, try Discord video compressor or Gmail video compressor.