Fit an audio file under Discord's limit
Drop a track or recording — smallcord reads its length on your device and computes the exact bitrate that fits, then gives you the command to re-encode it.
Honest heads-up: smallcord does not re-encode audio inside your browser yet. The only ready-made in-browser audio engine (ffmpeg compiled to WebAssembly) ships under a GPL / non-redistributable licence that doesn't fit this project — so rather than ship something we can't license cleanly, this page does the reliable part: it plans the exact bitrate and hands you a one-line command to run the re-encode locally. Need to shrink an image right now? The image tool works fully in your browser today.
Audio fit planner
Everything runs in your browser — your files never leave your device.
How the planner works
Pick your tier
10 MB (free), 50 MB (Nitro Basic), or 500 MB (Nitro) — match the account you'll upload from.
Drop your audio
Your browser reads the file's size and length locally — no upload — and works out the target bitrate to fit.
Run the command
Copy or download the ready-made ffmpeg line to re-encode on your machine, then upload the smaller file.
Why a bitrate, not a magic button
Audio file size is almost purely bitrate × duration. You can't trim someone's song for them, so unlike
video the only lever is the bitrate. To land a clip under a hard cap, smallcord picks the highest constant
bitrate where bitrate × seconds ≈ target bytes, holding back ~3% for the container's own overhead —
MP3 frame headers, an ID3 tag, or the Ogg pages an Opus stream is wrapped in. That's the same math the planner in
this repo is unit-tested against, so the number you see is the number the tests lock.
MP3 or Opus? At or below ~96 kbps the planner recommends Opus: at low bitrates it sounds dramatically cleaner than MP3, and Discord plays it inline. Above that it recommends a plain MP3, which every device and app understands. There's an honest floor at 32 kbps — below that even Opus turns music to mush — so if fitting a very long recording under a small tier would need less than 32 kbps, the planner says so plainly and suggests a bigger tier or splitting the file, instead of handing you a bitrate that makes an unusable file.
Honest limits: this is a planning estimate, not a byte-exact promise. A real encoder hits a target average bitrate with tolerance, and variable-bitrate content wanders a little. The estimate is deliberately conservative (it already adds the ~3% overhead back), so a first pass should land under your limit; if it ever lands slightly over, drop the bitrate about 5% and re-encode.
Got a different kind of file? Fit a video (MP4/MOV/WebM) plans a target bitrate the same way, fit a GIF converts it to a tiny inline MP4, and fit an image re-encodes a PNG or JPEG fully in your browser — all to slip under the same Discord caps.
Questions
Is my audio uploaded anywhere?
No. This page reads the file's size and duration on your own device using the browser's built-in audio decoder, and computes the bitrate locally. There is no server to receive it — you can confirm in your browser's Network tab that choosing a file makes zero requests. The actual re-encode also runs on your machine, via the command we give you.
Why can't smallcord just re-encode it in the browser?
It technically can, with ffmpeg compiled to WebAssembly — but the ready-made builds of that engine bundle GPL-licensed encoders, or are marked non-redistributable, which doesn't fit this project's licensing. We'd rather be honest about that than ship something we can't license cleanly. A clean, permissively licensed in-browser encoder is on the roadmap; until then the planner plus a local command gets the job done reliably.
I don't have ffmpeg. What's the easiest way?
ffmpeg is a free command-line tool for Windows, macOS, and Linux (ffmpeg.org, or brew install
ffmpeg / your package manager). Install it, then paste the command from the planner in the folder with your
file. Prefer a window with buttons? Audacity (audacityteam.org) can open the file and export an MP3 or Opus
at the bitrate smallcord shows.
The result came out a little over the limit — now what?
That's uncommon, because the estimate already holds back ~3% of headroom, but variable-bitrate music can wander. Lower the bitrate by roughly 5% and re-encode. If you're near the 32 kbps floor and it still won't fit, the clip is simply too long for that tier — split it into parts or upload from a Nitro account.