Compress a video to an exact size
Choose the limit, drop the video, done. nanogb works out the right bitrate and resolution for the length of your clip and checks the result fits before you download it.
Your file never leaves this device.
The maths behind a size target
A video's file size is simply its bitrate multiplied by its length. To hit a size, nanogb divides your limit by the duration, keeps about 4.5 % for the file container, gives the sound a sensible share (32 to 128 kbps) and spends the rest on the picture. It then picks the highest resolution that bitrate can carry without turning to mush, from 4K down to 240p.
Hardware encoders do not always land exactly on target, so nanogb measures the result. If it is over the limit, it encodes again with a lower bitrate (up to four passes). If it fits, it re-opens the file to check the length matches the original.
How long a video fits?
Picture quality nanogb can give a 16:9 video, by length and limit (estimates from the bitrate maths above):
| Length | Discord free (20 MB) | Gmail (25 MB) | Discord Nitro Basic (50 MB) |
|---|---|---|---|
| 30 s | 1080p · 4813 kbps | 1440p · 6048 kbps | 2160p · 12223 kbps |
| 1 min | 720p · 2342 kbps | 1080p · 2960 kbps | 1440p · 6048 kbps |
| 2 min | 540p · 1107 kbps | 720p · 1416 kbps | 1080p · 2960 kbps |
| 3 min | 540p · 727 kbps | 540p · 901 kbps | 720p · 1931 kbps |
| 5 min | 360p · 430 kbps | 480p · 554 kbps | 540p · 1107 kbps |
| 10 min | 240p · 215 kbps | 240p · 277 kbps | 480p · 554 kbps |
| 20 min | 240p · 92 kbps | 240p · 122 kbps | 240p · 277 kbps |
What you get
- An MP4 file with H.264 video and AAC sound, which plays almost everywhere. If your browser cannot encode H.264, nanogb falls back to VP9 in WebM.
- The original aspect ratio and orientation.
- A fits receipt: original and new size, the limit used, duration in and out, codec settings and a SHA-256 fingerprint.
When a video will not fit
Below about 60 kbps for the picture, video stops being watchable, so nanogb refuses rather than hand you a blur. A 25 MB limit holds roughly half an hour at that floor; Discord's 20 MB holds a little less. For longer recordings, trim or split them, or send a link from a cloud drive instead.
Private by design
Your video is decoded and re-encoded inside this tab using WebCodecs, the browser's built-in access to your device's video hardware. Nothing is uploaded, which is also why it is fast: there is no waiting for a 500 MB upload. How we prove it.
Frequently asked questions
Which browsers work?
Current Chrome and Edge, Safari 26 or later (Mac, iPhone, iPad) and current Firefox on computers. They all include WebCodecs video encoding; speed depends on your device.
Is there a file size or length limit?
Files of several gigabytes work on most computers because the video is read in pieces. Phones with little memory may struggle with very long 4K videos.
Will it add a watermark?
No. There is no watermark and no sign-up.
Does it keep the sound?
Yes. Sound is kept and re-encoded at a bitrate that suits the target size.