MP3 and FLAC are their own codec and container at once. AAC almost always arrives inside an M4A wrapper. OGA is the trap: Xiph's own convention lets it hold Vorbis, Opus, FLAC or Speex, so the extension alone tells you nothing. Convert a file to OGA on FileFlip and the codec you get depends on your browser, not on what you asked for, which is the first thing worth knowing before you pick one.
Which audio codec should you use?
Use MP3 when:
- The file has to open on something you don't control: a car stereo, an old DAW, a client's laptop, a feature phone.
- You don't want to think about licensing. MP3's core patents expired in 2017, and nothing about using it costs anyone anything. Convert WAV to MP3 and it will play on essentially everything you hand it to.
Use AAC, delivered as an M4A file, when:
- You're inside Apple's ecosystem, or streaming, or recording video with an audio track.
- You want better quality than MP3 at the same bitrate and don't need it to open on something from 2005.
Use Opus or Vorbis, both delivered as an OGA file, when:
- The destination is Opus specifically: a video call, in-game voice chat, anything built on WebRTC.
- You control both ends and can verify what actually landed in the file. Convert MP3 to OGA and see "How do you match the codec to the destination?" below before you trust the extension.
Use FLAC when:
- The file is going into an archive, a DAW, or anywhere it might get edited and re-exported later.
- You want the source back exactly, bit for bit. Convert WAV to FLAC and nothing about the audio changes at all.
MP3, AAC, Opus, Vorbis and FLAC at a glance
| Codec | Compression | Standard | First released | Patent status |
|---|---|---|---|---|
| MP3 | Lossy | ISO/IEC 11172-3 | 1993 | Core patents expired April 2017 |
| AAC | Lossy | ISO/IEC 14496-3 | 1997 | Free to play; encoder/decoder developers need a license |
| Opus | Lossy | RFC 6716 (IETF) | 2012 | Royalty-free by design |
| Vorbis | Lossy | Xiph.Org spec, no ISO or IETF number | 2002 | Royalty-free by design |
| FLAC | Lossless | RFC 9639 (IETF) | 2001 | Royalty-free by design |
Vorbis is the odd one out. Every other codec here eventually went through a standards body; Vorbis has stayed a Xiph.Org specification since 2002, which is part of why it shows up almost exclusively in Ogg files rather than as a named option in most encoders.
Which audio codecs are lossy?
MP3, AAC, Opus and Vorbis all throw away sound a listener is unlikely to notice, and none of them can give it back. Each uses a psychoacoustic model to decide what to discard; the four differ mainly in how good that model is and how efficiently the rest gets packed.
AAC improved on MP3's model enough that Apple picked it for the iTunes Store in 2003 and never looked back. Opus and Vorbis are both Xiph.Org projects, and Opus is the newer one, built to handle speech and music equally well across a much wider range, from 6 kbit/s up to 510 kbit/s per its RFC.
Which audio codecs are lossless?
FLAC is the only lossless codec in FileFlip's writable formats, and it reconstructs the exact original samples on decode, byte for byte. We tested that claim rather than repeating it: encoding our own speech WAV to FLAC and decoding it back produced a file that hashes identically to the source, every time.
| Size vs the source WAV | Decodes bit-identical | |
|---|---|---|
| FLAC | 18.0% | Yes |
| MP3 at 96 kbps | 6.9% | No |
That's the lossless trade in one row each: FLAC gives up almost nothing in fidelity and gives back less than half the space of the uncompressed WAV. It costs you roughly three times the file size of a decent MP3 to get that guarantee. See lossy vs lossless compression for what happens when you convert a lossy file into a lossless container expecting the loss to reverse. It doesn't.
Which codec sounds best at a given bitrate?
Opus does, according to every listening test we could find, and we can't reproduce that result ourselves since scoring perceived audio quality needs a human panel, not an encoder. Xiph's own comparison page cites a Hydrogenaudio test at 64 kbit/s where Opus beat two HE-AAC encoders and libvorbis, and one at 96 kbit/s where it beat LC-AAC, libvorbis and a 136 kbit/s MP3 encoder outright: MP3 needed 40% more bitrate just to lose.
What we could measure directly is whether an encoder hits the bitrate you ask it for, which matters for anyone budgeting file size in advance:
| Bitrate asked | MP3 actual (size vs WAV) | AAC actual (size vs WAV) | Opus actual (size vs WAV) |
|---|---|---|---|
| 96 kbps | 97 kbps (6.9%) | 98 kbps (7.0%) | 89 kbps (6.3%) |
| 128 kbps | 129 kbps (9.1%) | 130 kbps (9.2%) | 119 kbps (8.4%) |
| 160 kbps | 161 kbps (11.4%) | 163 kbps (11.5%) | 150 kbps (10.6%) |
| 192 kbps | 194 kbps (13.7%) | 195 kbps (13.8%) | 185 kbps (13.1%) |
| 256 kbps | 258 kbps (18.3%) | 229 kbps (16.2%) | 263 kbps (18.6%) |
| 320 kbps | 323 kbps (22.9%) | 232 kbps (16.4%) | 339 kbps (24.0%) |
The Opus column is libopus encoding directly to a .opus file. The next section covers what you actually get when the target is .oga specifically, which is not always the same codec.
- MP3120,416 bytes
- AAC (M4A)121,652 bytes
- Opus (OGA)110,855 bytes, 8% smaller
All three asked for 128 kbps on the same source WAV. Smaller isn't automatically better quality, but Opus buying a smaller file at the same nominal bitrate is consistent with the listening-test results above.
MP3 and AAC both track the requested bitrate closely all the way up. AAC is the one with a ceiling worth knowing about: it stopped climbing past 256 kbps requested and landed around 229-232 kbps actual both times, a limit of FFmpeg's own built-in AAC encoder on this clip rather than something inherent to the codec.
Which codec will actually play on the destination device?
AAC does, on the widest range of hardware of any lossy codec here, and MP3 comes close behind it on sheer age. Android's own supported formats page lists MP3, AAC and Vorbis decoding since the platform's earliest versions, with FLAC added in 3.1 (2011) and Opus in 5.0 (2014). Apple's current iPhone specifications list AAC, MP3, Apple Lossless and FLAC as supported playback formats, as of August 2026. Opus and Vorbis appear nowhere on that page.
Opus wins a different contest. RFC 7874 requires every WebRTC implementation to support it, so it's mandatory in Chrome, Firefox, Safari and Edge for anything carrying live audio: Zoom's browser client, Google Meet, Discord voice, WhatsApp calls. You've almost certainly heard Opus today without ever having a file with that extension.
How do you match the codec to the destination?
FileFlip writes four of these five as files you can hand to something else: MP3, FLAC, M4A (AAC) and OGA. OGA is where this gets confusing, because the codec inside depends on which engine does the conversion, not on what you asked for.
| MP3 | FLAC | M4A | OGA | |
|---|---|---|---|---|
| Compression | Lossy only | Lossless only | Lossy or lossless | Lossy or lossless |
| Embedded metadata | Yes | Yes | Yes | Yes |
| Audio | Yes | Yes | Yes | Yes |
| Released | 1993 | 2001 | Unknown | Unknown |
| Developer | Fraunhofer Institute for Integrated Circuits (IIS) | Xiph.Org Foundation | Apple Inc. | Xiph.Org Foundation |
When your browser's WebCodecs can encode audio, which current Chrome and Edge can, FileFlip's engine picks Opus for an OGA target, the only lossy codec its Ogg writer and the browser's encoder currently agree on. When it can't, the conversion falls through to FileFlip's FFmpeg engine, and FFmpeg's own default codec for the .oga extension isn't Vorbis. It's FLAC.
We checked by running the exact command our fallback engine runs, with no codec flag, and letting FFmpeg's own muxer default decide:
- 96 kbps requested230,142 bytes
- 160 kbps requested230,142 bytes
- 320 kbps requested230,142 bytes
Same source WAV, three different bitrate requests, identical output. FFmpeg's oga muxer defaults to the native flac encoder, which ignores -b:a entirely, so nothing about the request changes the result.
Every request landed at exactly 230,142 bytes, 17.5% of the source WAV, because FFmpeg's oga muxer (distinct from its ogg muxer, whose documented default is Vorbis) defaults to FLAC, and FLAC doesn't read a bitrate flag at all. That's close to plain FLAC's own 18.0% ratio from the table above, which is exactly what you'd expect if the same lossless codec is doing the work in both cases.
What do you lose when you convert between codecs?
Converting a lossy file into another lossy codec stacks a second, permanent loss on top of the first, whichever two you pick. FLAC only protects audio that's still lossless going in; wrapping an already-lossy MP3 in FLAC doesn't undo the MP3 encoding, it just stops adding to it.
Watch the extension on anything you receive. An .oga file makes no promise about what's inside beyond "Ogg audio," and Android's native FLAC decoder, despite handling plain .flac files since 3.1, doesn't extend to FLAC-in-Ogg. A lossless OGA can fail to play on a device that opens FLAC files all day.
Audio codec questions people ask
Is AAC better than MP3?
At the same bitrate, yes, particularly below 128 kbps where MP3's older model shows its artifacts first. Above 256 kbps the gap narrows enough that most listeners can't reliably tell the two apart.
Does OGG always mean Vorbis?
By Xiph.Org's own convention, yes for the .ogg extension; FFmpeg's ogg muxer documents Vorbis as its default codec. .oga exists precisely to avoid that assumption, and as the section above shows, FileFlip's own fallback path defaults it to FLAC instead.
Should I convert my MP3s to Opus or FLAC?
Opus adds a second lossy pass for a format most players and hardware don't accept, so it rarely makes sense for an existing library. FLAC only recovers space if your goal was ever the WAV in the first place; it can't restore what MP3 already threw away, it just stops further loss from there.
What codec does Spotify use?
Ogg Vorbis, at bitrates Spotify itself describes as roughly 24 kbps on Low up to 320 kbps on Premium. That's the same Vorbis this page covers, chosen for the same royalty-free reasons Xiph built it for.
Convert between them
FileFlip converts WAV to MP3, WAV to FLAC and MP3 to OGA entirely inside your browser, using WebCodecs where your browser supports it and a WebAssembly build of FFmpeg where it doesn't. The file never leaves your machine: nothing is uploaded, there's no account, and there's no queue.
Open Advanced options to set Bitrate for MP3, at 96, 128, 192, 256 or 320 kbps, matching the ladder measured above. FLAC has no bitrate control because it never throws anything away to control.
For the format details, see the MP3, FLAC, M4A and OGA format references.
How we measured this
- Corpus: one 7.47-second spoken-word WAV synthesized with macOS
say, 44.1 kHz stereo, 1,316,926 bytes, fetched withpnpm blog:corpora. One file is a single data point; a music source would shift the absolute byte counts while the shape should hold. - Encoder: FFmpeg 8.1.2 on macOS, the library FileFlip runs as WebAssembly. The ladder ran
ffmpeg -i speech.wav -b:a <n>k out.<ext>for each codec's own extension:.mp3(libmp3lame),.m4a(nativeaac),.opus(libopus). FLAC took no bitrate flag. - The OGA default: run three times exactly as FileFlip's fallback engine invokes it,
ffmpeg -i speech.wav -b:a <n>k out.ogawith no-c:a, at 96, 160 and 320 kbps. All three wrote a byte-identical 230,142-byte file.ffmpeg -h muxer=ogadocuments its default codec asflac;ffmpeg -h muxer=oggdocuments a separate default ofvorbis. Codec selection in FileFlip's own engine is confirmed fromapps/nextjs/src/utils/convert/ffmpeg.ts, which passes no-c:a, andapps/nextjs/src/utils/convert/mediabunny.ts, whoseOggOutputFormatoffers only Vorbis and Opus to WebCodecs, and whose own comment notes Chromium currently encodes Opus and AAC but not MP3 or FLAC. - Bit-identical check: FFmpeg's
-f md5on the decoded PCM from the FLAC file and from the source WAV, which matched. - Caveat: the listening-test rankings cited above are cited, not measured by us; there's no SSIM equivalent for audio, so a real ranking needs a human panel, which is what those tests used. Apple's list is current as of August 2026 and may change with future models.
The bitrate ladder is reproducible with node scripts/benchmark-audio-encoders.mjs <corpus-dir> <formatA> <formatB> in apps/nextjs.