How to compress a video to fit gmail's 25 mb attachment limit
- Step 1Drop your video onto the tool — Drag in (or click to browse) an
MP4,MOV,MKV,WebM,AVI,M4V, orTSfile. A hidden<video>element probes duration and resolution in about 50 ms — no FFmpeg load yet — so the tool already knows the clip length it needs to budget for. - Step 2Leave the target on **GMAIL** — The Email provider panel has one control — a
Targetdropdown with GMAIL and OUTLOOK. GMAIL is the default and the one you want here: it sets the internal byte target to 24 MB. There is no custom-MB field; if you need a tighter cap, the OUTLOOK option (19 MB internal) is the smaller of the two. - Step 3Run the compressor — Click Run Email Fit. JAD loads the engine, probes the source, computes
totalKbps = target bytes x 8 / duration, reserves 128 kbps for audio (96 kbps on clips under 30 s), and gives the rest to video — never dropping below a 200 kbps video floor. - Step 4Watch the encode path it picks — On a Chrome/Edge machine with H.264 GPU encode, the dashboard shows Hardware encoding (H.264) and a live frame counter. If WebCodecs H.264 encode isn't available, it shows Software encoding (libx264) instead and reports source-seconds processed. Either way the output is the same MP4.
- Step 5Download and attach — The result card shows input size → output size and elapsed time. Download the MP4, then drag it into Gmail's compose window. Because it's now under 24 MB, Gmail attaches it inline rather than offering the Drive-link conversion.
- Step 6If Gmail still balks, account for Base64 — Email encodes attachments in Base64, which inflates the on-the-wire size by roughly 33%. Gmail's 25 MB limit is generally measured on the decoded attachment, so a 24 MB file is fine — but if you're sending through a stricter relay, switch the target to OUTLOOK (19 MB) to leave extra headroom, or trim the clip first with the lossless trimmer.
What the Gmail target actually sets
The email compressor exposes exactly one control. These are the real internal numbers from the processing code — not adjustable sliders.
| Target option | Internal byte target | Why the gap from the named cap | Output |
|---|---|---|---|
| GMAIL (default) | 24 MB (24 x 1024 x 1024 bytes) | Gmail's cap is 25 MB; the 1 MB margin covers MP4 muxing + +faststart so the file can't drift over | H.264 + AAC, .mp4 |
| OUTLOOK | 19 MB (19 x 1024 x 1024 bytes) | Outlook.com's cap is 20 MB; same 1 MB margin. Use it as a 'tighter' option even for Gmail if a relay is strict | H.264 + AAC, .mp4 |
| (no custom field) | — | There is no free-text MB target. For other caps use a sibling: discord-compressor (25/50 MB) or whatsapp-compressor (15 MB) | — |
How the bitrate budget is split
The compressor solves for bitrate from duration and target. Longer clips get a lower video bitrate (and look softer) because the same 24 MB has to stretch further.
| Clip duration | Audio reserved | Approx. video bitrate @ 24 MB | Realistic quality |
|---|---|---|---|
| 20 s | 96 kbps (clips < 30 s) | ~9,700 kbps | Crisp 1080p — visually near-lossless |
| 60 s | 128 kbps | ~3,100 kbps | Clean 1080p for most footage |
| 3 min | 128 kbps | ~940 kbps | Watchable; 720p-equivalent detail, soft on motion |
| 10 min | 128 kbps | ~200 kbps (video floor) | Heavily compressed — consider trimming or a Drive link instead |
Cookbook
Real Gmail scenarios with the file sizes and the path the compressor takes. Numbers are approximate — exact output depends on the encoder and source complexity.
Phone clip that triggered the Drive-link swap
A 48-second 1080p iPhone clip exported at ~62 MB. Dropped into Gmail compose, it converted to a Drive link with a permissions prompt. Compressing first keeps it inline.
Input: IMG_4821.MOV · 61.8 MB · 48 s · 1080p
Target: GMAIL (24 MB)
Budget: 24 MB x 8 / 48 s = ~4,190 kbps total
- 128 kbps audio
= ~4,060 kbps video
Output: img-4821.mp4 · ~23.4 MB · H.264 + AAC
Result: attaches inline in Gmail — no Drive promptMOV that won't even preview in Gmail
A QuickShare .mov used a HEVC track Gmail's inline player ignored. Re-encoding to H.264 MP4 both shrinks it and makes the preview render.
Input: screen-demo.mov · 31 MB · HEVC/H.265 Gmail: attaches but shows no inline preview Target: GMAIL -> H.264 + AAC MP4 re-encode Output: screen-demo.mp4 · ~22 MB Result: under 25 MB AND plays in Gmail's web preview
Long clip where compression alone isn't enough
An 11-minute walkthrough at 24 MB would hit the 200 kbps video floor and look blocky. The honest move is to trim to the part that matters, then compress.
Input: walkthrough.mp4 · 410 MB · 11 min If compressed as-is: ~200 kbps video -> blocky Better: 1. lossless-trimmer -> keep the 90 s that matters 2. email-compressor (GMAIL) on the 90 s clip Output: ~24 MB at a healthy ~1,950 kbps
4K source on a free account
Free tier accepts source files up to 1 GB, so a large 4K capture is allowed — it just gets compressed down to the 24 MB target. Hardware encode keeps it fast.
Input: 4k-capture.mp4 · 780 MB · 90 s · 2160p Tier: Free (1 GB / 1 file) -> accepted Path: WebCodecs HW H.264 (GPU) on Chrome/Edge Output: 4k-capture.mp4 · ~23 MB (downscaled bitrate, full res kept)
Silent source — no audio track
When the source has no audio, the whole budget goes to video, so a silent screen recording looks noticeably sharper at the same 24 MB.
Input: no-audio-screencap.mp4 · 55 MB · 70 s · no audio
Budget: 24 MB x 8 / 70 s = ~2,870 kbps total
audio skipped (hasAudio=false)
= full ~2,870 kbps to video
Output: ~23 MB, sharper than an equivalent clip with audioEdge cases and what actually happens
Gmail converts the attachment to a Drive link
By design (Gmail)Gmail doesn't error when you exceed 25 MB — it offers to insert a Google Drive link instead. That's the behaviour this tool exists to avoid. Compress to the GMAIL target (24 MB) before composing and Gmail attaches the file inline.
Output came out slightly over the target
Soft overshootThe compressor solves for a bitrate, it doesn't iterate to a guaranteed size. On very short or motion-heavy clips the muxed file can land a touch above 24 MB; the code logs a console warning but still hands you the file (it never silently fails). If it edges over 25 MB, re-run with the OUTLOOK target for extra headroom, or trim a few seconds first.
Base64 inflation on a strict relay
Provider-sideEmail transport Base64-encodes attachments, adding ~33% to the wire size. Gmail measures its 25 MB on the decoded file, so 24 MB is safe end-to-end — but corporate relays sometimes check the encoded envelope. If a send bounces despite being under 25 MB, the OUTLOOK target (19 MB) clears the inflated size comfortably.
HEVC / H.265 source won't preview in Gmail
Fixed by re-encodeGmail's inline player handles H.264 but not always HEVC. Because this tool always outputs H.264, an HEVC .mov or .mp4 comes out as a Gmail-friendly H.264 MP4 as a side effect of compression. No separate conversion step needed.
10-minute-plus clip hits the 200 kbps video floor
Quality limitBitrate falls as duration rises. Past roughly 10 minutes at 24 MB the math wants less than the 200 kbps video floor, so quality degrades sharply. For long content, trim with the lossless trimmer or send a Drive link — 24 MB simply can't carry 10 minutes of detail.
Compressing on a phone with a large source
Mobile capIf the WebCodecs hardware path is unavailable on a mobile browser, the FFmpeg.wasm fallback refuses sources over 80 MB (the phone's WASM heap can't host an HEVC decoder plus libx264 encoder at once). It tells you to trim the clip or run on desktop. Above 720p on mobile it also auto-downscales to 720p to avoid an out-of-memory crash.
Unreadable or corrupt duration
RejectedIf the probe can't determine the clip's duration (truncated download, broken container), the encode throws 'Could not determine video duration' rather than guessing. Re-export the source or repair the container — the transcoder can often rewrap a salvageable file into a clean MP4.
Source already under 25 MB
Still worksYou can run an already-small clip through; it will be re-encoded toward the 24 MB target and may end up smaller still. If you just need it under the cap and it already is, you don't have to run anything — attach it as-is.
Frequently asked questions
What is Gmail's exact attachment limit?
Gmail allows attachments up to 25 MB for sending. Beyond that, instead of failing, Gmail offers to insert the file as a Google Drive link. JAD's GMAIL target compresses to 24 MB so the file sits safely under the cap and attaches inline.
Does JAD upload my video to compress it?
No. The entire encode runs in your browser — WebCodecs on your GPU where available, FFmpeg.wasm otherwise. The video file never leaves your device, which matters for confidential demos, customer recordings, and internal screen captures.
Why does it target 24 MB instead of 25 MB?
MP4 muxing and the +faststart flag add a little overhead on top of the encoded streams. Aiming at 24 MB leaves a 1 MB margin so the finished file can't drift back over Gmail's 25 MB ceiling.
Can I set a custom target size, like 20 MB or 10 MB?
No — the email compressor's only control is a Target dropdown with GMAIL (24 MB) and OUTLOOK (19 MB). For other caps, use a sibling tool: discord-compressor targets 24/49 MB and whatsapp-compressor targets 15 MB.
What output format do I get?
Always an MP4 with H.264 video and AAC audio. That's the most universally compatible combination for email previews across Gmail web, the Gmail mobile apps, and forwarded threads.
Will the quality be acceptable?
For short clips, yes — a 20-second 1080p clip gets ~9,700 kbps at 24 MB, which is visually near-lossless. Quality drops as duration rises because the same 24 MB stretches further; past ~10 minutes the video bitrate hits a 200 kbps floor and looks rough. Trim long clips first.
What's the audio bitrate?
AAC at 128 kbps for clips 30 seconds or longer, and 96 kbps for clips under 30 seconds. The remaining budget goes to video. If the source has no audio track, the full budget goes to video.
What input formats can I drop in?
MP4, MOV, MKV, WebM, AVI, M4V, and TS. Whatever you start with, the output is an H.264 MP4 sized for Gmail.
My clip is huge — will it be rejected before compressing?
On the free tier you can drop sources up to 1 GB and one file at a time; they get compressed down to 24 MB. The only hard pre-flight reject is on mobile without hardware encoding, where the FFmpeg.wasm fallback won't take sources over 80 MB.
It says hardware vs software encoding — what's the difference?
On Chrome/Edge with H.264 GPU encode, JAD uses the WebCodecs hardware path — typically 5–10x faster. On Firefox or older Safari it falls back to FFmpeg.wasm (libx264) with -preset ultrafast. The output MP4 is equivalent either way.
Should I just use a Google Drive link instead?
For a short clip you want viewable directly in the thread, an inline 24 MB attachment is the better experience — no click, no sharing permissions. For long content where quality matters, a Drive link bypasses compression entirely. This tool is for the inline-attachment case.
Can I run this from the command line or a script?
Yes, via the @jadapps/runner. GET /api/v1/tools/email-compressor returns the option schema, then POST your payload to http://127.0.0.1:9789/v1/tools/email-compressor/run. The runner processes locally, so the video still never reaches a server.
Privacy first
Every JAD Video tool runs entirely in your browser via WebCodecs and FFmpeg (WebAssembly). Your video files never leave your device — verified by zero outbound network requests during processing.