Compress a video without uploading it
A video file can easily be too large for an email attachment, a chat app or an upload form. This video compressor makes the file size smaller by encoding the video again at a lower bitrate and, if you want, a lower resolution. It runs in your browser tab with the video encoder that is built into your browser, so the file never leaves your device and there is no upload to wait for.
- Email and chat: shrink a clip to fit an attachment or message limit you know, using a target size in MB.
- Upload forms: bring a video under a portal's limit for applications, homework or support tickets.
- Storage: keep a smaller copy of long screen recordings, lectures or family videos.
Smaller, Smallest or Custom
The presets choose a bitrate for you from the video itself. The tool first measures the average bitrate of your file: its size divided by its length, minus the sound. Then:
| Preset | Resolution | Video bitrate | Sound |
|---|---|---|---|
| Smaller | Unchanged | Half of the original, at most 0.1 bits per pixel and frame | 128 kbps |
| Smallest | Short side at most 720 px, frame rate at most 30 fps | 30 percent of the original, at most 0.07 bits per pixel and frame | 96 kbps |
| Custom | Original, 1080p, 720p, 540p, 480p or 360p | From a target file size, or a bitrate you type | 128, 96 or 64 kbps, or off |
The bits per pixel cap keeps the presets sensible for videos that were recorded at an unusually high bitrate: a 1080p video at 30 frames per second is never given more than about 6.2 Mbps by Smaller. The resolution is the short side, so 720p means 1280 × 720 for a landscape video and 720 × 1280 for a vertical one. Videos that are already smaller than the chosen size keep their resolution, because enlarging only adds file size.
Sound that already uses a codec the output can hold and is not much above the chosen bitrate is copied unchanged, which saves time and avoids a second loss. Otherwise it is re-encoded at the chosen bitrate.
Compressing to a target size in MB
File size is simply bitrate times length. To hit a target, the tool takes your size in megabytes, turns it into bits, keeps 4 percent back as a margin for the container and for encoder overshoot, divides by the length of the video and subtracts the sound bitrate. What is left is the video bitrate. For example, 25 MB for a two minute clip with 128 kbps sound gives 25,000,000 × 8 × 0.96 ÷ 120 − 128,000 = 1,472,000 bits per second, so about 1.5 Mbps for the picture.
Sizes on this page use decimal units, as NIST defines them: 1 MB is 1,000,000 bytes and 1 KB is 1,000 bytes. The binary unit with almost the same name, 1 MiB, is 1,048,576 bytes, about 4.9 percent more. So if a limit is given in MiB, a file that fits the same number in MB fits it too.
If the target is so small that less than 150 kbps would be left for the picture, the tool says so instead of producing a blurry mess. Pick a lower resolution, turn the sound off, or cut the video shorter with Trim Video first. Encoders treat the bitrate as a goal, not a hard limit, so the final file can land a little above or below the target. The result shows the real size; if it came out too big, run it again with a target a few percent lower.
Formats and what happens to your file
The tool reads MP4, MOV, WebM and MKV files with mediabunny, an open-source media library. Whether a file can be decoded depends on the codecs inside it and on your browser and device, as the mediabunny documentation explains. If your browser cannot decode a file, the tool tells you which codec is the problem.
The new file is an MP4 with H.264 video and AAC sound when your browser can encode them. If it cannot encode H.264, the tool writes a WebM file with VP9 video and Opus sound instead. Either way, the picture is re-encoded, which always costs some fine detail. Metadata tags of the original file, such as the title, date or comments, are not copied to the new file. If the compressed file turns out bigger than the original, which can happen with videos that were already well compressed, the tool keeps your original and tells you.
Browser support, phones and memory
Compression uses the WebCodecs API of your browser. MDN lists the VideoEncoder for Chrome and Edge 94 or newer, Firefox 130 or newer on computers and Safari 16.4 or newer, which includes iPhone and iPad. Firefox for Android does not have it, so the tool shows a message there instead of failing halfway. Which codecs and sizes the encoder accepts depends on your device, so the tool asks the browser before it starts.
On iPhone and iPad, keep two limits in mind. Re-encoding sound needs the AudioEncoder, which MDN lists only from Safari 26; on older versions, AAC sound is copied unchanged and any other sound is left out, with a note. And the finished video is held in memory until you download it, so for long videos on a phone, Smallest is the safest choice: it makes the smallest file to hold. On any device, a video of several gigabytes can run out of memory; the tool warns you before it starts.
Compressing takes time, because every frame is decoded and encoded again. How long depends on your device, the resolution and the length. The progress bar shows the share done and an estimate of the time left, and you can cancel at any time.
How to compress a video
- 1Drop a video on the box, or tap it to pick one from your files or photo library.
- 2Choose Smaller or Smallest, or Custom to set the resolution, the sound and a target size in MB or a bitrate. Check the estimated size.
- 3Press Compress video and keep the tab open until the bar is full. Watch the result, compare the sizes and press Download video.
Want to cut the length too? Trim Video removes the start and end, and Mute Video removes the sound. For social media shapes such as 9:16 or 1:1, use the video resizer.
Open-source software
Reading and writing the video files is done by mediabunny, licensed under the Mozilla Public License 2.0 (MPL-2.0). The encoding itself is done by your browser.
Sources
- MDN: VideoEncoder: browser compatibility (Chrome and Edge 94, Firefox 130 on desktop, not Firefox for Android, Safari 16.4 including iOS)
- MDN: AudioEncoder: browser compatibility (Safari 26)
- MDN: VideoEncoder.isConfigSupported(): how the tool asks whether a codec and size can be encoded
- mediabunny: Supported formats and codecs: MP4, MOV, WebM and MKV reading; codec availability depends on the browser
- NIST: Prefixes for binary multiples: 1 MB = 1,000,000 bytes, 1 MiB = 1,048,576 bytes
- mediabunny license (MPL-2.0)
Frequently asked questions
Is my video uploaded to a server?
No. Your browser reads the video, re-encodes it with its own built-in encoder and writes the new file on your device. Nothing is sent anywhere, so a private clip stays private and there is no upload to wait for.
How much smaller will my video get?
It depends on how the video was recorded. A video recorded at a high bitrate can shrink a lot, while a video that was already compressed for the web may barely change. The tool shows an estimate before you start and the real size and percent saved afterwards. If the new file is not smaller, you keep your original.
Does compressing lower the quality?
Yes, a little. The video is decoded and encoded again at a lower bitrate, and sometimes at a lower resolution, so fine detail and fast motion lose some sharpness. Smaller keeps the resolution and only lowers the bitrate. Smallest also lowers the resolution, which trades more detail for a much smaller file.
Can I compress a video to a specific size, like 25 MB?
Yes. Choose Custom, then Target size, and type the size in MB. The tool works out the video bitrate from the length of the video and the sound bitrate, and keeps a small safety margin. Encoders do not hit a bitrate perfectly, so check the real size shown afterwards. If it came out above the limit, try a target a few percent lower.
Which browsers can compress video?
Browsers that have the WebCodecs VideoEncoder. According to MDN, that is Chrome and Edge 94 or newer, Firefox 130 or newer on computers, and Safari 16.4 or newer on Mac, iPhone and iPad. Firefox for Android does not have it. The tool checks your browser when the page opens and tells you if something is missing.
Why does my iPhone keep or remove the sound?
Re-encoding sound needs the WebCodecs AudioEncoder, which MDN lists for Safari 26 and newer. On older iPhones and iPads, AAC sound from the camera is copied into the new file unchanged. Sound in other codecs, such as Opus from a WebM file or MP3, is re-encoded as AAC, and without the encoder it is left out. The tool tells you when that happens.
Is there a file size limit?
There is no limit set by us, but the finished video is held in your device memory until you download it. Very long or very large videos can run out of memory, especially on phones. The tool warns you about large files. If a job fails, try Smallest or a lower resolution, or cut the video into parts first.