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.

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!

Editors' Recommendations

Simon Cohen
Contributing Editor, A/V
Simon Cohen covers a variety of consumer technologies, but has a special interest in audio and video products, like…
Auracast looks to radically change how you use Bluetooth
Man wearing Sony WH-1000XM4 headphones.

Since its inception, Bluetooth has been used to transmit audio wirelessly and privately between a single headset or speaker and a device like a phone or tablet. But Bluetooth is now poised to get a big upgrade — one that adds an entirely new dimension to how we use our wireless headphones.

That upgrade is called Bluetooth Auracast, and it will turn our smartphones into radio stations, our headphones into hearing enhancers, and it could end up fundamentally changing the way we watch movies, listen to concerts, and experience in-flight entertainment.

Read more
What is Chromecast? Google’s wireless streaming tech explained
Chromecast icon seen on a smartphone screen.

In 2013, Google debuted a small gadget called Chromecast. The device could wirelessly link people's TVs and other devices like smartphones, tablets, and computers. The versatile dongle that you simply plugged into an HDMI port on your TV was far more affordable than other streaming media devices like Roku and Apple TV, but it had less robust streaming offerings. Chromecast added a new meaning to the word "casting," virtually emulating the casting of a fisherman's line by wirelessly casting an image from one screen onto another.

Today, Google's Chromecast is on more than just a stick. It's implemented on a wide variety of smart devices, from TVs to soundbars and smart speakers. As the technology gains popularity, it's worth understanding what exactly Chromecast is, what it does, how to use it, and how it compares to similar wireless technologies. That's what we'll do here.
Is Chromecast hardware or software?

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