Free browser-based video compressor using FFmpeg WebAssembly H.264 encoding. Accepts MP4, MOV, MKV, AVI, WebM, WMV, FLV. Outputs H.264 MP4. CRF range 0–51 (recommended 23–26). Typical reduction: 70–95%. Includes trim, crop, resolution scaling. Files never leave your device. No account or watermark. Works offline.
What Is Browser-Based H.264 Video Compression?
Browser-based video compression uses FFmpeg compiled to WebAssembly to re-encode video with the H.264 (AVC) codec directly in your browser — without sending a single frame to a server. H.264 is the most widely deployed video codec in the world and is used across streaming platforms, video editors, and major social apps. Localsquash gives you full control: drop in an MP4, MOV, MKV, AVI, WebM, WMV, or FLV file and adjust the CRF value (0 to 51), encoder speed preset, output resolution, audio bitrate, and even trim or crop the clip before encoding. The result is an H.264 MP4 that plays on every device, downloaded directly from memory — no cloud, no queue, no size cap beyond your device's RAM.
What Do CRF, Bitrate, and Encoder Presets Mean?
CRF — Quality Target
CRF (Constant Rate Factor) sets the perceptual quality target for every frame. H.264 accepts values 0-51; lower numbers mean higher quality and larger files. CRF 18-22 is near-lossless for archival. CRF 23-26 hits the sweet spot for streaming and sharing. CRF 28-35 produces small files suitable for preview clips where extreme compression is acceptable.
Encoder Speed Preset
The speed preset (ultrafast → veryslow) trades encoding time for compression efficiency. At the same CRF, a slow or veryslow preset produces a noticeably smaller file than veryfastbecause the encoder spends more time analyzing motion and choosing optimal block sizes. The default is “fast” for quicker encoding; choose “medium” or “slow” for better compression efficiency.
Resolution & Framerate
Halving the linear resolution (e.g., 4K → 1080p) cuts the pixel count to one-quarter, which typically reduces bitrate by 60-75% at equal quality. Framerate is preserved by default; dropping from 60 fps to 30 fps saves roughly 30-40% additional data for motion-heavy content. Cropping removes unwanted edges and reduces the total pixels the encoder must process.
How to Compress a Video Online in Four Steps
1
Drop or select your file
Drag any video — MP4, MOV, MKV, AVI, WebM, WMV — onto the upload area, or click to browse. The file stays on your device; nothing is uploaded.
2
Edit the video (optional)
Use the timeline scrubber to cut unwanted seconds from either end. Use the crop overlay to remove black bars or reframe for portrait/square social media formats.
3
Dial in codec settings
Set CRF (23-26 recommended), pick an encoder speed preset, optionally scale the resolution, and adjust audio bitrate.
4
Encode and download
Click “Compress Video”. FFmpeg.wasm encodes the file locally. When the progress bar completes, the compressed MP4 downloads automatically.
Why Does Localsquash Output H.264 MP4?
When you compress or convert video, Localsquash encodes to H.264 (libx264) inside an MP4 container because H.264 is the most universally supported video codec — it plays natively on every phone, smart TV, browser, desktop OS, game console, and streaming platform without any codec installation. At CRF 23-26 it typically produces files 50-80% smaller than the uncompressed source while keeping visual quality indistinguishable from the original in most viewing conditions.
The CRF slider covers the full H.264 range of 0-51. CRF 0 is mathematically lossless (very large files, useful for archival masters). CRF 18-22 is visually lossless for most content. CRF 23-26 is the practical sweet spot for everyday sharing. CRF 28-35 trades visible quality for aggressively small files, suitable for preview clips or platforms with strict size caps. CRF 51 is the lowest possible quality and only makes sense for testing purposes. If you switch to trim-only mode, Localsquash preserves the original container and streams when possible instead of creating a new MP4.
Video Compression FAQ — Common Questions Answered
Yes, completely safe. Unlike traditional online compressors, Localsquash processes your videos entirely in your browser using WebAssembly. Your files never leave your device, are never uploaded to any server, and remain completely private. No one else can access your videos.
Typically, you can reduce video file size by 50-95% depending on your settings. Using a CRF value of 23-28 provides excellent quality while significantly reducing file size. Lowering the resolution (e.g., from 4K to 1080p) can reduce file size by 70% or more.
We support almost all video formats including MP4, MOV (QuickTime), WebM, AVI, MKV, WMV, FLV, and more. Powered by FFmpeg, Localsquash can handle virtually any video format you throw at it. When you compress or convert, the standard output is H.264 MP4 for maximum compatibility. If you use trim-only mode, Localsquash preserves the original container and streams when possible.
CRF (Constant Rate Factor) controls video quality. Lower values (18-23) produce higher quality and larger files, while higher values (28-35) produce smaller files with lower quality. We recommend CRF 23-26 for most use cases, offering a good balance between file size and visual quality.
Yes! You can compress 4K videos and optionally downscale them to 1080p or other resolutions for even greater file size reduction. Keep in mind that processing 4K videos requires more time and memory.
The only limit is your device's available memory. Since processing happens in your browser, very large files (over 2-4GB) may be slow or fail on devices with limited RAM. For best results, we recommend files under 2GB.
Some quality loss is inevitable with compression, but with proper settings (CRF 23-26), the difference is barely noticeable to the human eye. You can preview the expected file size before compressing to find the right balance for your needs.
To compress video for Discord, start with CRF 28-32, lower the resolution to 720p or below if needed, and trim the clip to the important section. Those three changes usually do the most to fit a chat-upload limit.
For email attachments, start with CRF 26-30, consider reducing resolution to 720p, and trim any unnecessary parts. That usually works well for common email attachment caps around 20-25 MB. For longer videos, sending a link is often the better option.
Yes! Localsquash includes trim and crop features. You can cut your video to a specific time range and crop to various aspect ratios (16:9, 9:16 for TikTok/Reels, 1:1 for Instagram, etc.) before compressing.
Localsquash is an option for single-file H.264 compression without installing a desktop app. It offers CRF quality control, speed presets, trimming, and resizing. Both tools process files locally. HandBrake offers batch encoding and additional codecs; browser encoding is limited by device memory and can be slower.
Simply upload your WebM, MKV, or MOV file to Localsquash. The tool automatically converts any input format to MP4 with H.264 encoding during compression. This is equivalent to running 'ffmpeg -i input.webm output.mp4' but with a visual interface and no command-line knowledge required. Supported input formats include WebM (VP8/VP9), MKV (Matroska), MOV (QuickTime), AVI, WMV, FLV, and more.
For H.264, CRF 23 is the encoder's default and an excellent starting point. CRF 18 is considered visually lossless by most viewers. Going above CRF 28 starts to introduce blocking artefacts in fast-motion scenes. For footage destined for chat apps with tight upload caps, CRF 28-32 with a lower resolution typically produces the best result within the size constraint.
The preset does not change the target quality set by CRF; it changes how efficiently the encoder reaches that quality level. A slower preset (slow, veryslow) uses more advanced motion estimation and reference frame analysis, producing a smaller file at the same CRF value. For browser-based encoding, "medium" or "fast" is recommended because slower presets can take 10-30 minutes for longer clips.
Resolution has a quadratic effect on bitrate. Downscaling from 3840x2160 (4K) to 1920x1080 (1080p) reduces the pixel count by 75%, meaning the encoder needs roughly one-quarter of the bitrate to achieve the same CRF score. In practice this equals a 60-75% reduction in output file size for the video stream, before accounting for audio.
For most video content, audio represents 5-15% of total file size. Dropping audio from 192 kbps to 128 kbps saves about 0.48 MB per minute of video, which is worthwhile when working near a file size limit. For voice-heavy content (interviews, tutorials), 96 kbps AAC is transparent. For music-driven content where fidelity matters, keep audio at 192 kbps or higher.
Yes. Localsquash accepts 4K UHD and HDR source files. Because encoding happens in software (not hardware), a 4K re-encode at medium preset can take 20-60 minutes depending on clip length and your CPU speed. HDR-to-SDR tone mapping is not configured in this tool, so HDR colors may not be reproduced correctly. For HDR workflows, keep the original and use an encoder with explicit HDR or tone-mapping controls.
When you compress or convert video, Localsquash outputs an MP4 container with H.264 video (libx264) and AAC audio. That combination has extremely broad device compatibility across phones, browsers, desktops, smart TVs, and game consoles. If you use trim-only mode, Localsquash keeps the original container and streams when possible instead of re-encoding to MP4.
Free HandBrake Alternative — Compress Video in Your Browser
HandBrake is the gold standard for desktop video compression, but it requires downloading and installing software. Localsquash offers the same core FFmpeg H.264 encoding engine that powers HandBrake, running directly in your browser via WebAssembly. If you need to compress video with HandBrake-level quality but don't want to install anything, Localsquash is the fastest way to get started. Upload your file, set CRF and speed preset just like HandBrake, and download the compressed MP4 — all without leaving your browser tab.
Like HandBrake, Localsquash processes files entirely on your device with zero server involvement, making it ideal for sensitive footage. HandBrake remains the better choice for batch encoding, H.265/AV1 codecs, and advanced subtitle handling. For single-file compression where privacy and convenience matter, Localsquash delivers HandBrake-grade H.264 output with no install, no account, and no learning curve.
Convert WebM, MKV & MOV to MP4 — FFmpeg in Your Browser
Need to convert WebM to MP4, convert MKV to MP4, or convert MOV to MP4? Localsquash handles all three with the same FFmpeg engine used by professionals on the command line. Instead of typing ffmpeg -i input.webm output.mp4, simply drag your file onto the upload area. The conversion produces H.264 MP4 with AAC audio — the most universally compatible format across all devices and platforms.
WebM → MP4
WebM files (VP8/VP9 video) from screen recorders and browsers convert seamlessly to H.264 MP4. Ideal for sharing recordings that won't play on iOS or older devices. Equivalent to ffmpeg convert webm to mp4.
MKV → MP4
MKV (Matroska) containers are common for downloaded video but lack broad device support. Converting MKV to MP4 re-muxes or re-encodes the video into a universally playable container. Same as ffmpeg convert mkv to mp4.
MOV → MP4
Apple's QuickTime MOV files from iPhones and Final Cut Pro often use HEVC or ProRes codecs. Converting MOV to MP4 with H.264 ensures playback everywhere. Replaces ffmpeg convert mov to mp4.
How to Get the Smallest Video File Size
Two-pass thinking in a one-pass tool
True two-pass encoding (where the encoder scans the full video once before encoding) is not available in the browser, but you can approximate it: compress once at CRF 26, check the output size, then re-compress the original at CRF 24 or CRF 28 depending on whether you need a smaller or larger file.
Trim before you encode, not after
Every second of video you trim off before encoding is a second the encoder never processes. For a 10-minute clip where you only need the middle 3 minutes, trimming first reduces encoding time by ~70% and guarantees the unused footage never goes through the codec at all.
Match resolution to delivery platform
Instagram Reels caps at 1080×1920. Discord uploads usually require 720p or lower at CRF 28-32. WhatsApp re-encodes anything you send anyway, so encoding at 720p CRF 28 before upload avoids double compression artefacts. YouTube accepts 4K, so there is no reason to downscale before uploading there.
Screen recordings compress far more than camera footage
Screen recordings consist of large uniform areas and predictable motion, which H.264 compresses extremely well. A 200 MB screen recording often compresses to under 20 MB at CRF 28 with no visible quality loss. Camera footage of outdoor scenes with lots of natural texture and motion is harder to compress — expect 40-60% reduction rather than 90%.
Compress video locally: choose settings for your file
A local video compressor processes the video on your device. Localsquash runs FFmpeg in your browser and exports compressed video as H.264 MP4 with AAC audio. The compression engine must finish loading before you can encode.
Everyday sharing
Start with CRF 23–26 and the fast preset. Keep the original dimensions first, then compare the downloaded result.
Email or chat attachments
Trim unnecessary footage, resize to 720p, and try CRF 28–32. Check the actual output size against your destination’s limit; CRF does not guarantee a target size.
Screen recordings and text
Try CRF 18–23 and retain enough resolution to read small text. Inspect a short sample before encoding the whole recording.
Long or high-resolution videos
Start with a short trimmed sample. Browser memory and software encoding can limit large jobs; a desktop encoder may be more suitable.
An already compressed video may not become smaller. Higher CRF and lower resolution trade detail for size. Both HandBrake and Localsquash process locally; Localsquash’s main convenience is using a browser without installing a desktop app.
How to compress video and audio together
For a video with sound, use the video tool: CRF and resolution control the picture, while Audio bitrate controls the AAC sound track in the exported MP4. Start with CRF 26 and 128 kbps audio, then inspect the result. For speech, try 96 kbps; for music, compare 160 or 192 kbps before reducing it.
Reducing audio from 192 to 128 kbps saves approximately 4.8 MB over ten minutes, before container overhead. If you need a much smaller video, trimming or reducing resolution may help more. These settings apply when re-encoding, not when copying streams in trim-only mode.
For a separate MP3, WAV, or FLAC recording, use the audio file compressor. Its controls change file size and format, rather than the dynamic range of the sound.