Compress a video to a target size

Pick a size — 20 MB for Discord, 25 MB for email, or your own — and get an MP4 that fits under it. The bitrate and resolution are worked out for you, and the video never leaves your device.

Video

or drop it anywhere on this page
MP4, MOV, WebM or MKV

Target size

Open a video to see how it will be compressed.

Your video never leaves your device. It is decoded and re-encoded by your browser’s own video encoder, and the page sends nothing over the network with it — once a first video has been opened, it works offline too.

How the target size sets the bitrate

A compressed video’s size is almost entirely its bitrate — how many bits it spends per second — multiplied by its length. So for a given size and duration, the bitrate is fixed:

video bitrate = (target size × 0.96 − container) × 8 ÷ duration − audio bitrate

  • × 0.96 is a 4% safety margin: encoders don’t hit the requested bitrate exactly.
  • Container is the MP4 header and index, about 16 bytes per video frame and 12 per audio packet — around 41 KB for a 30-second, 30 fps clip.
  • × 8 turns bytes into bits.
  • Audio is paid for first, because it is encoded at a fixed rate.

Example: 20 MB for a 30-second clip with 96 kbps audio leaves about 5,011 kbps for the picture.

After encoding, the tool measures the real file. If it is over the target, it encodes once more, with the bitrate cut by the amount the encoder overshot on this very video, and a slightly bigger safety margin (6%). You only get a file that is over the target if both passes overshoot, and the result then tells you so.

Why quality drops as the video gets longer

The size is fixed, so every extra second shares the same bits. Twice the length means half the bitrate. A 15-second clip at 20 MB gets about 10,129 kbps of video; the same 20 MB spread over 5 minutes leaves only 405 kbps, 25 times less. Here is what the tool chooses for a 1080p, 30 fps video with 96 kbps audio:

Length10 MB20 MB25 MB
15 s5,009 kbps · 1080p
OK
10,129 kbps · 1080p
Good
12,689 kbps · 1080p
Good
30 s2,451 kbps · 720p
OK
5,011 kbps · 1080p
OK
6,291 kbps · 1080p
Good
1 min1,172 kbps · 540p
OK
2,452 kbps · 720p
OK
3,092 kbps · 720p
Good
2 min533 kbps · 360p
Low
1,173 kbps · 540p
OK
1,493 kbps · 540p
OK
5 min149 kbps · 240p
Very low
405 kbps · 240p
Very low
533 kbps · 360p
Low

Video bitrate and resolution picked by Auto, computed with the same code as the tool above. The rating combines bits per pixel (below) with how far the resolution had to drop: a 1080p video brought down to 360p is rated Low at best, and to 240p Very low. Real quality also depends on the footage: a static talking head compresses far better than confetti, rain or fast game footage.

When the quality is Low or Very low, you have four ways out: remove the audio (it frees its bitrate for the picture), cap the frame rate at 30 fps if the video is 60 fps, trim the video before compressing it — the lossless trimmer cuts it in an instant without touching the quality — or pick a bigger size.

When to lower the resolution

A low bitrate spread over many pixels gives each pixel too few bits, and the picture turns into blocks. Fewer pixels at the same bitrate look cleaner, even after the player scales them up. The tool measures this in bits per pixel:

bits per pixel = video bitrate ÷ (width × height × frames per second)

As a rule of thumb for H.264, about 0.1 looks clean, below 0.07 compression starts to show, and below 0.04 the picture falls apart. Auto keeps the original resolution when it gets at least 0.07 bits per pixel; otherwise it steps down through 1080p, 720p, 540p, 480p, 360p and 240p until one does. For vertical video the same sizes apply to the short side (720p is 720×1280). At 30 fps, that threshold means:

ResolutionVideo bitrate needed (30 fps)
1080p (1920×1080)4,355 kbps or more
720p (1280×720)1,935 kbps or more
540p (960×540)1,089 kbps or more
480p (854×480)861 kbps or more
360p (640×360)484 kbps or more

You can still force a resolution. That makes sense for screen recordings with small text, which need sharp pixels more than smooth motion — combine it with a 24 or 30 fps cap.

File size limits on popular platforms

Sources last checked 29 November 2026. Limits change; if a platform rejects a file the tool says fits, please tell us.

WhereLimitSource
Discord, free account20 MB per file. It was 10 MB until Discord raised it on 13 August 2026.Discord File Attachments FAQ, Dexerto
Discord Nitro Basic / Nitro50 MB / up to 1 GBDiscord File Attachments FAQ
Gmail (personal account)25 MB of attachments; larger files are turned into a Google Drive linkGmail Help
Outlook.com25 MB per email, including the text and all attached filesMicrosoft Support
WhatsApp video100 MB and 720p by default on a faster connection, 64 MB and 480p on a slower one; files sent as documents up to 2 GBWhatsApp Help Center

Email tip: attachments are encoded in Base64 for sending, which makes them about 33% bigger (Microsoft Learn), and the recipient’s mail server may have a lower limit than yours. If an email with a 24 MB video bounces, compress it to about 18 MB.

Discord on mobile: Discord now checks the file size before its own compression on mobile, as it does on desktop (Dexerto), so the file itself has to be under the limit.

Which browsers can compress video

The tool uses the browser’s built-in video encoder through the WebCodecs API. According to MDN’s compatibility data (VideoEncoder, AudioEncoder):

  • Chrome and Edge 94+ (computer and Android): video and audio.
  • Firefox 130+ on computers: video and audio. Firefox for Android doesn’t support it yet.
  • Safari 16.4+ (Mac, iPhone, iPad): video. Audio encoding arrived in Safari 26; in older versions the original sound track is copied when MP4 can hold it.

The page checks this as soon as it opens and tells you if your browser can’t do it. Which source videos can be read also depends on the browser and the device: H.264 is the safe case, while VP9, AV1 and H.265/HEVC (iPhone “High Efficiency” videos) depend on the decoders available. If your browser can’t read a file, the page says so before anything is encoded.

FAQ

Is my video uploaded?
No. The file is read and encoded in your browser; nothing is sent to a server. The settings are saved in the page address so you can bookmark them, but the video is not.
What does “MB” mean here?
1 MB = 1,000,000 bytes. Windows shows sizes in binary units (1 MB = 1,048,576 bytes), so a 19.5 MB file appears there as about 18.6 MB. A file under 20 MB in our units is under the limit whichever unit a site uses.
Why is the result smaller than the target?
The tool aims 4% below it for safety, and simple footage — static shots, screen recordings — often needs less than the bitrate allows. The encoder never pads a file.
Why does it sometimes encode twice?
Encoders treat the bitrate as an average and can overshoot on busy footage. When the first file is over the target, the tool measures by how much and encodes again with the bitrate corrected by that amount. That second pass takes as long as the first.
What format is the result?
An MP4 with H.264 video and AAC audio — the combination that plays almost everywhere, including Discord, WhatsApp, email previews and editing software. Browsers without an AAC encoder (Chrome on Linux, for example) save the audio as Opus instead, and the page tells you.
Is the video rotated correctly?
Yes. Phone videos often store a rotation flag; the tool applies it to the pixels, so the compressed video is the right way up in every player, including vertical videos.
Does it keep metadata such as the location?
No. Location, device and other descriptive tags are not copied to the compressed file. Only the primary video and audio tracks are kept; subtitles and extra audio tracks are dropped. To strip the location from photos, use the photo metadata remover.
How long does it take?
It depends on your device, the video’s length and its resolution: every frame has to be decoded, resized and encoded again. The progress bar shows an estimate of the time left. Keep the tab open — the page keeps the screen awake while it works, where the browser allows it.
Can I compress without losing quality?
Not to a fixed size: making a file smaller always discards detail. What the tool does is spend the size well — the right resolution for the bitrate, and no bits wasted on an overly large frame. If the original is already under the target, the page tells you and you can skip compression.
Which software does it use?
The browser’s own WebCodecs encoders, driven by Mediabunny (open source, MPL-2.0), which reads MP4, MOV, WebM and MKV files and writes the MP4. It is loaded only when you open a video.