smallcord

Fit an audio file under Discord's limit

Drop a track or recording — smallcord compresses it right here on your device to fit, or hands you the exact command to do it yourself.

Your Discord tier Which one?

Compress in your browser new

New: actually shrink an audio file to fit your Discord limit right here. smallcord decodes it, re-encodes to Opus at the fitted bitrate with WebCodecs, and hands you the finished, smaller file — no upload, no ffmpeg install. If your browser can’t encode Opus it says so plainly and the command planner below still gets the job done.

Output is Opus in a WebM file, which Discord plays inline on every platform. It targets the exact bitrate the planner below computes, so the result should land under your cap — the download shows a real byte size you can check, not a promise. Need an .mp3 or .m4a specifically (for a player or workflow that wants one)? The command generator below emits that instead — it stays first-class, right under this panel.

Target: Free — 10 MB (set your tier at the top of this page)

Compress only part of it (optional) Size is bitrate × length: when the bitrate hits its 32 kbps floor, a shorter span is the only honest lever left. Accepts M:SS, H:MM:SS, or plain seconds.

Leave both blank to compress the whole recording — that is the default, and nothing is ever cut unless you type a range here.

Everything runs in your browser — your files never leave your device.

Honest heads-up: the in-browser compressor above outputs Opus in a WebM file, which Discord plays inline — and it only runs where your browser exposes a WebCodecs Opus encoder (it says so plainly when it can’t). If you specifically need an MP3 or M4A/AAC file — some players and editing apps still prefer those — the planner below computes the exact fitting bitrate and hands you a one-line ffmpeg command to produce it locally. (We do not ship the ffmpeg-WebAssembly transcoders: every ready-made build is GPL / non-redistributable, which doesn’t fit this project.) Need to shrink an image instead? The image tool works fully in your browser today.

Audio fit planner

Your Discord tier is set at the top of this page — the planner below and the in-browser tool share it.

No file handy? Type the recording’s length — same planner, nothing is read from any file.
Output format

By default the planner recommends MP3 (or Opus at low bitrates). Pick AAC to get an .m4a at the very same fitted bitrate — the AAC/M4A container that iPhones, iMovie and many hardware players prefer, and which Discord plays inline. The emitted command uses ffmpeg’s built-in aac encoder (present in every build); the higher-quality libfdk_aac is often absent from stock ffmpeg builds, so smallcord never assumes it.

Lowering the sample rate throws away the top of the frequency range in exchange for a cleaner result at a low bitrate — there is simply less treble to encode. Speech stays fully intelligible at 22050 or 16000 Hz. This is size-neutral: the estimate below reflects the bitrate you pick, not the sample rate. Honest warning: 8000 Hz sounds like a phone call — fine for a quick voice memo, muddy for music. Keep source rate is the default and leaves your audio’s own rate untouched.

Drop an audio file above or click to choose one. It is read on your own device to measure its size and length — nothing is uploaded.
Get ffmpeg — install it on Windows, macOS, or Linux

Windows: if winget is available (it is on most current Windows 10/11 systems), open a terminal — PowerShell or Command Prompt — and run winget install ffmpeg. Otherwise download a Windows build linked from the official ffmpeg.org downloads page, unzip it, and add its bin folder to your PATH — then open a new terminal so the change takes effect.

macOS: with Homebrew installed, run brew install ffmpeg in Terminal. No Homebrew? The ffmpeg.org downloads page links macOS builds too.

Linux: use your distro's package manager — sudo apt install ffmpeg on Debian/Ubuntu, sudo dnf install ffmpeg on Fedora. Honest note: some distros ship the full ffmpeg from a third-party repo (Fedora's full build comes from RPM Fusion, for example), so the one-liner may need that repo enabled first — your distro's docs will say.

Check it worked: run ffmpeg -version. If it prints a version banner, you're set — come back and copy the command the planner gives you above. Prefer an app with buttons instead of a terminal? See the Audacity tip in the questions below.

Everything runs in your browser — your files never leave your device.

How the planner works

1

Pick your tier

10 MB (free), 50 MB (Nitro Basic), or 500 MB (Nitro) — match the account you'll upload from.

2

Drop your audio

Your browser reads the file's size and length locally — no upload — and works out the target bitrate to fit.

3

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, which leaves exactly two levers. Bitrate is the first, and it is the one smallcord pulls for you: to land a clip under a hard cap it 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.

Duration is the second lever, and it is yours alone. Shortening someone's recording is destructive, so nothing is ever cut for you: the Start / End boxes in the in-browser compressor above start empty and stay empty until you type a range, and leaving them blank compresses the whole file exactly as before. Where the bitrate lever runs out — a 60-minute voice memo under the free 10 MB tier would need ~22 kbps, below the honest floor — the tool now offers the range that does fit (the first 42:22 at 32 kbps) as a one-click prefill you still have to confirm. Two scopes, kept separate on purpose: those boxes trim the in-browser compressor only, by slicing the decoded audio before it reaches the encoder; the ffmpeg commands below trim on your machine, where -t tells ffmpeg how many seconds of the input to encode, and they still handle inputs (and output formats) the browser can't.

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.

What about AAC / .m4a? Flip the output-format switch above to AAC and smallcord keeps the exact same fitted bitrate but writes an .m4a file instead. AAC is the codec Apple's apps default to, so an .m4a drops straight into iMovie, Voice Memos or an iPhone without a conversion step, and Discord still plays it inline. The command it hands you uses ffmpeg's built-in aac encoder — chosen deliberately because it ships in every ffmpeg build. The alternative libfdk_aac encoder sounds a little cleaner at the same bitrate, but it's left out of most prebuilt ffmpeg binaries for licensing reasons, so a command that assumed it would simply fail for many people. At the bitrates that fit a Discord cap the built-in encoder is perfectly fine; if ffmpeg -encoders shows you have libfdk, swapping in -c:a libfdk_aac is an easy upgrade.

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.

Questions

Is my audio uploaded anywhere?

No. Both paths run entirely on your own device: the in-browser compressor decodes and re-encodes the audio locally with WebCodecs, and the planner reads the file's size and duration to compute the bitrate — neither sends the file anywhere. There is no server to receive it; you can confirm in your browser's Network tab that choosing a file and compressing it makes zero requests. If you use the command instead, that re-encode also runs on your machine.

What does the in-browser compressor output, and when can't it run?

It outputs Opus audio in a WebM file, encoded with the browser's built-in WebCodecs encoder — no ffmpeg install, no upload. Discord plays Opus/WebM inline on every platform. It runs only where your browser actually exposes a WebCodecs Opus encoder — the panel checks that live (feature detection, not a version guess) and shows you the result, and it says so plainly when it can't, leaving the command planner as the reliable fallback. We deliberately do not ship the ffmpeg-WebAssembly transcoders — every ready-made build bundles GPL-licensed or non-redistributable code that doesn't fit this project's licensing — so if you need an MP3 or M4A/AAC file specifically, the planner gives you a one-line local ffmpeg command for exactly that.

I don't have ffmpeg. What's the easiest way?

ffmpeg is a free command-line tool for Windows, macOS, and Linux — the Get ffmpeg section in the planner above has per-OS steps (winget, Homebrew, or your distro's 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.