Start with the difference between a codec and a container

A codec is the method that turns audio samples into encoded data and decodes that data for playback. MP3, AAC, FLAC, Opus, and Vorbis are codecs. A container packages one or more streams plus timing and metadata. MP4, Ogg, WebM, and QuickTime are containers. WAV and AIFF are also containers, although they are strongly associated with uncompressed PCM audio.

The extension is therefore a clue, not complete proof. An .m4a file is an MPEG-4 audio container that commonly carries AAC or Apple Lossless. An .ogg file may contain Vorbis, Opus, or FLAC. A .wav file often contains PCM but can hold other encodings. Reliable software inspects the file’s headers and codec information rather than choosing a decoder from the extension alone.

Uncompressed, lossless, and lossy are different choices

Uncompressed PCM represents sampled audio directly. It is straightforward to edit and widely accepted, but its files are relatively large. WAV and AIFF frequently carry PCM. Lossless codecs such as FLAC and Apple Lossless compress the data so that decoding reconstructs the original samples exactly. They reduce storage without the permanent information removal of a lossy codec.

Lossy codecs such as MP3, AAC, Vorbis, and Opus remove information to achieve much smaller files. Their quality depends on the source, encoder, bit rate, channel layout, and listening conditions. Re-encoding from one lossy format to another adds another lossy generation; a high output bit rate cannot recreate information already discarded. Use lossless masters when repeated editing or future conversion is likely.

MP3, AAC, and M4A for everyday delivery

MP3 remains a practical delivery format because playback support is broad and its files are easy to share. It uses lossy compression and supports a range of bit rates. MP3 is a sensible final copy for music, podcasts, and devices that value compatibility, but it is not an ideal intermediate format for repeated editing and exporting.

AAC is another lossy codec and is often carried in an MP4-family container. M4A is a filename convention for audio-only MPEG-4 files, not a single codec: an M4A may contain AAC or Apple Lossless, and protected media can impose additional restrictions. Do not promise that every M4A file will decode merely because one AAC test file worked. Inspect the codec, reject encrypted input honestly, and test across target browsers or applications.

WAV, AIFF, FLAC, and ALAC for production or archives

WAV is common in Windows, recording, broadcast, and digital audio workstations; AIFF serves a similar role and has a long association with Apple workflows. Both often contain PCM and can preserve high-resolution samples, but the container name alone does not guarantee a particular bit depth or codec. Record the sample rate, bit depth, and channels when exchanging production files.

FLAC is an open lossless codec maintained by the Xiph community and is widely used for music libraries and archival-quality distribution. ALAC, or Apple Lossless, provides a similar lossless goal inside Apple-oriented workflows and commonly appears in an M4A container. Lossless does not mean indestructible or automatically authentic: keep backups, checksums, provenance, and verified metadata for material that matters.

Ogg, Vorbis, Opus, WebM, and legacy formats

Ogg is an open container. Ogg Vorbis is a familiar combination for music, while Ogg Opus uses the Opus codec. Opus is standardized by the IETF and is designed to handle speech and music across a wide range of bit rates; it is also important in real-time communication. WebM can carry Opus or Vorbis audio as well as video streams, so a WebM extension does not describe audio alone.

WMA belongs to Microsoft’s Windows Media family and appears in older music libraries and Windows-centric archives. AMR is optimized for speech and occurs in some voice recordings. AAX and protected store files may include access controls rather than being ordinary interchangeable audio. Browser support for these formats is uneven, so a robust converter may require an explicit codec library or server process instead of the browser’s native decoder.

Choose a format by the next job

For recording, mixing, and interchange with a digital audio workstation, use a format the project accepts without unnecessary lossy compression, commonly PCM WAV or AIFF. For a smaller lossless music library, FLAC is a strong open choice; ALAC can fit Apple-centered libraries. For broad consumer delivery, MP3 is conservative, while AAC can offer efficient delivery where the target devices and container are known.

For speech or interactive web communication, Opus may be appropriate when the platform supports it. For a web page, provide formats that the target browsers actually play and include fallbacks when necessary. For long-term preservation, the format is only one part of the plan: retain source files, metadata, documentation, backups, and integrity checks. No extension substitutes for a tested workflow.

  • Editing master: uncompressed PCM or a lossless format accepted by the project.
  • Lossless music library: FLAC or ALAC according to ecosystem needs.
  • Broad listening copy: MP3, with a documented encode setting.
  • Known Apple-oriented delivery: AAC in an appropriate MPEG-4 container.
  • Real-time speech and web communication: consider Opus and test support.

What conversion changes—and what it cannot repair

A genuine conversion decodes the source codec and encodes or packages the result in the selected output. Renaming .wav to .mp3 does not perform that work. Transcoding may change the codec, container, sample rate, bit depth, channel count, bit rate, metadata, duration padding, and file size. It should not be described as lossless unless the complete path actually preserves the decoded samples.

Converting MP3 to WAV can make a file easier for an editor to open, but it cannot restore frequencies or precision removed by the MP3 encoder. Converting FLAC to WAV can preserve decoded samples when settings and implementation are correct, but metadata may still change. Before deleting a source, audition the output, compare duration and channels, inspect the technical properties, and retain the original until the new workflow is proven.