Skip to main content

What is an audio codec? A jargon-free explainer

Have you ever overheard someone casually talking about their preferred audio codecs, or perhaps questioning the value of one model of wireless earbuds versus another because of the audio codecs they do (or don’t) support? And then, did you kinda want to ask them what they were talking about, but didn’t want to look dumb, or poorly informed? We got you. (But we’re also going to question the sort of people you’re hanging out with.)

Despite their highly technical-sounding names, audio codecs are pretty easy to understand once all the jargon is cleared away. Here’s everything a lay person should know about audio codecs.

What is a codec?

First, let’s address that word: codec. It’s a portmanteau. It’s two terms smashed together into one word — in this case, encode and decode — thus, “codec.”

Codecs can apply to video, too. But for our purposes, we’re talking about audio. Any kind of sound that can be recorded — from music, to a TV soundtrack, to your favorite podcast, can be affected by a codec.

What does a codec do?

Screenshot of iTunes showing CD import choices.
Image used with permission by copyright holder

Codecs let computer hardware or software change information from one format to another (encoding) and also provide a way to work with the new format (decoding). The most common reason for using a codec is to reduce the amount of information needed to store an audio (or video) recording.

Here’s an example: If you take the audio on a CD and use a codec to turn those songs into MP3 files, you can reduce the size (in megabytes) of those tracks to as little as 10% of their original size. That saves a lot of room on a computer hard drive or in a smartphone’s memory, and it also saves on mobile data when you want to stream those songs from a music service.

Codecs versus file formats

Here’s where it can get a tad confusing. There’s a tendency to use “codec” and “file format” interchangeably. It’s pretty common to hear someone refer to “using the MP3 codec,” or “FLAC is a better codec than MP3.”

Technically speaking, a codec is the set of instructions for creating or reading a specific file format (like an MP3). But because those instructions are baked deep into the software and hardware we use every day, like iTunes, a Roku device, or an iPhone, when most people say “codec,” what they really mean is “file format,” because that’s the part that’s visible to us when we look at the name of an audio file e.g. beatles-penny-lane.mp3.

Now that you know the difference between them, you can forget about the instructions part completely — from here on in, when we say the word codec, we’re going to be talking about audio file formats only.

Why do I even need to know about audio codecs?

Astell&Kern AK UW100 earbuds seen next to the company's SR25 portable media player.
Astell&Kern AK UW100 earbuds seen next to the company’s SR25 portable media player. Simon Cohen / Digital Trends

The two biggest reasons to be passingly familiar with audio codecs are quality and compatibility.

While virtually all audio codecs make files smaller than the original source, some codecs achieve this space-saving by destroying some of the audible sound. This is known as lossy compression, because of the information that is lost in the process.

MP3 and AAC are the two most popular lossy audio codecs. Despite their lossy nature, these codecs can still deliver very high-quality audio. But for the most discerning listeners, even a tiny amount of lost information is unacceptable. For these folks, only lossless compression will do.

As its name suggests, lossless codecs like FLAC and ALAC, make files smaller without destroying any audible portion of the original. But since there’s no such thing as a free lunch, files that use lossless codecs are almost always bigger than their lossy counterparts.

That’s the quality aspect of codecs. On the compatibility side, you simply need to be mindful that not all playback devices or apps are necessarily compatible with all codecs.

These days, it’s rare to run into a widely used audio codec that doesn’t enjoy support among the most popular gadgets, but it can happen. For instance, iTunes, which is still used by many to organize and play digital music on Macs and PCs, doesn’t work with FLAC, which is the most popular of the lossless audio codecs.

There are workarounds for this limitation, but it’s always a good idea to find out if the equipment and software you own or you’re contemplating buying, will work with the audio codecs you want to use.

Note: This question of codec compatibility is only important in the context of the device that you want to use to actually play audio. Headphones and speakers — even wireless ones — do not need to be compatible with any specific audio codec in order to work. But there is a small caveat for wireless headphones and earbuds that we’ll get to in a moment.

The five most popular audio codecs

Lossy audio codecs File extension(s) Lossless audio codecs File extension(s)
MP3 (MPEG Audio Layer-3) .mp3 FLAC (Free Lossless Audio Codec) .flac
AAC (Advanced Audio Coding) .m4a, .mp4, .3gp .m4a, .m4b, .m4p, .m4r, .m4v, .aac ALAC (Apple Lossless Audio Codec) .m4a (or, rarely, .caf)
Vorbis .ogg

Beyond lossless: hi-res audio

Another advantage to lossless audio codecs is that they support hi-res audio, something lossy codecs can’t do. Hi-res audio is loosely defined as anything that’s better than CD quality. Why hi-res matters and what you need to enjoy it is a little outside the scope of what we’re going to cover in this article, but if you’re keen to learn all about it, we have a great hi-res audio explainer.

Bluetooth audio codecs: the exception to the rule

Remember when I said that codecs and file formats were essentially the same thing? I might have been oversimplifying a bit.

You will likely run into terms like SBC, AAC, aptX, LDAC, LC3, or LHDC in the context of Bluetooth headphones, earbuds, and mobile devices. These are all examples of audio codecs, but they are not audio codecs that are used to create audio files.

Instead, they are used to temporarily convert audio into a format that can be streamed wirelessly over Bluetooth connections. With the sole exception of AAC, you will likely never run into an audio file that uses one of these codecs.

What’s the difference between these Bluetooth codecs and why would you need to know about them? Stay tuned, we’ll have an explainer for that shortly!

Simon Cohen
Simon Cohen covers a variety of consumer technologies, but has a special interest in audio and video products, like spatial…
What is MPEG-H? The burgeoning 3D audio standard explained
Sennheiser Ambeo mounted below TV.

When putting together your audio or home theater setup — or eyeing upgrades for your current system — it’s always good to be on the lookout for new and cool technologies that can enhance your music, movies, and TV shows. When it comes to audio, we've all been wowed by the now-commonplace sound standards that are Dolby Atmos and DTS:X, which offer immersive three-dimensional surround sound experiences. And while these standards remain at the top of the heap, there's a new player making its way to the fore that offers a level of flexibility and personalized audio control we've never seen before: MPEG-H.

While not exactly new and yet to be widely adopted, MPEG-H support is showing up in more and more TVs, set-top boxes, soundbars, AV receivers, and more, allowing users to do some pretty cool sound fine-tuning -- from simple adjustments like enhancing and increasing movie dialog to more advanced personalizations like tweaking the audio mix to turn down the fans of the opposing sports team, all using your remote or an app. It's a neat level of control we've not seen before.

Read more
Best MP3 players: a great music streamer for everyone
best music players sony nwa55 walkman 1

Sure, most of us satisfy our music-listening needs these days using our phones, tablets, and smart speakers, but that doesn't mean a dedicated MP3 player or portable music player is a completely obsolete option. In fact, when it comes to overall performance and capabilities, an MP3 player is actually one of the best ways to enjoy your favorite artists and playlists.

Want a player that's small enough to travel everywhere, maybe with an equally-portable pair of Bluetooth speakers? Or how about one that can effectively decode some of the richest audio codecs on the market? Whatever your auditory needs may be, we've got you covered with this roundup of the best MP3 players you can buy right now.

Read more
What is 8D audio, and how can you experience it?
woman wearing headphones

If you spend a lot of time on YouTube, you may have seen something called 8D Audio showing up in the Up Next column or in your recommended videos. 8D? As in eight-dimensional audio? Yes, it's a thing. But how can audio possess eight dimensions? How can our ears hear something in eight dimensions? And why do 8D videos always tell us to put our headphones on?

In short, what the heck is 8D audio, anyway? Give us a few minutes and we'll explore every dimension of 8D audio. Ear we go ...
How can audio have eight dimensions?
An illustration of the Millennium simulation, which uses supercomputers to formulate how the key components of the Universe would have evolved over cosmic time. Illustration: Springel et al. (2005); Spectrum: NASA/CXC/CfA/Kovács et al.

Read more