Skip to content
Audio format library

Audio file formats and technical testing guide

Explore common audio file types and understand how uncompressed Linear PCM, lossless compression, and psychoacoustic lossy codecs differ in bandwidth, dynamic range, sample rates, metadata tags, and browser decoding pipelines.

.mp3.wav.flac.ogg .aac .m4a

Library

Explore common audio formats

Audio files differ fundamentally in their compression architecture: uncompressed linear pulse-code modulation (WAV), bit-perfect lossless compression (FLAC), and perceptual lossy coding (MP3, OGG Vorbis).

View MP3 samples
MPEG-1 Audio Layer III

.mp3

MP3 audio

The universal lossy audio format supported across virtually all browsers and devices. Ideal for streaming, podcasts, and mobile media testing.

View MP3 samples
View WAV samples
RIFF LPCM container

.wav

WAV audio

Uncompressed Linear PCM audio offering pristine studio reference quality with zero decoding overhead. Standard for studio masters and sound FX.

View WAV samples
View FLAC samples
Lossless audio codec

.flac

FLAC audio

An open-source lossless codec that reduces file sizes by 40–60% while preserving 100% bit-perfect audio fidelity. Standard for audiophile archives.

View FLAC samples
View OGG samples
Ogg Vorbis container

.ogg

Ogg Vorbis audio

An open-source container and modern lossy stream format providing high acoustic fidelity per bit. Widely used in game engines, WebRTC, and HTML5.

View OGG samples

Format guide

Audio format technical comparison matrix

Review fundamental parameters across uncompressed, lossless, and lossy audio standards. Examine bitrates, sampling depth, storage consumption, and browser compatibility.

FormatArchitectureTypical BitrateSample RateBit DepthStorage / MinMIME TypeBrowser Support
MP3 Audio (.mp3)
Lossy Perceptual32 – 320 kbps (CBR / VBR)32 kHz, 44.1 kHz, 48 kHz16-bit equivalent~0.9 – 2.4 MB / minaudio/mpegUniversal (100% of browsers & OS)
WAV Audio (.wav)
Uncompressed LPCM1,411.2 kbps (16-bit 44.1 kHz stereo)44.1 kHz, 48 kHz, 96 kHz, 192 kHz16-bit, 24-bit, 32-bit float~10.6 MB / min (CD) / ~33 MB (96 kHz)audio/wavNative across all browsers & DAWs
FLAC Audio (.flac)
Lossless Compression~600 – 1,100 kbps (variable)1 Hz – 655,350 Hz (typically 44.1 – 192 kHz)16-bit & 24-bit (up to 32-bit)~5.0 – 6.5 MB / minaudio/flacChrome, Firefox, Safari, Edge, Android, iOS 11+
Ogg Vorbis Audio (.ogg)
Open-Source Lossy45 – 500 kbps (nominal 160 kbps)8 kHz – 192 kHz16-bit to 24-bit equivalent~1.2 – 2.0 MB / minaudio/oggChrome, Firefox, Edge, Android, VLC, Linux
Audio format library

How digital audio files, codecs and containers work

Analog sound consists of continuous physical pressure waves. Digital audio systems convert these acoustic signals into numerical representations through sampling in time and quantization in amplitude. The mathematical laws governing this conversion define the limits of dynamic range, frequency response, file size, and perceptual fidelity.

Uncompressed PCM vs. Lossless vs. Lossy Architecture

Linear Pulse-Code Modulation (LPCM), used in WAV and AIFF, records voltage amplitudes at uniform intervals without alteration. Lossless formats like FLAC use mathematical prediction and Golomb-Rice entropy coding to achieve ~50% compression with 100% bit-perfect reversibility. In contrast, lossy codecs like MP3 and Vorbis employ psychoacoustic masking models to permanently discard frequencies that human hearing cannot detect, reducing file sizes by up to 90%.

The Nyquist–Shannon Sampling Theorem and Audio Bandwidth

The Nyquist–Shannon theorem states that an analog signal can be reconstructed without aliasing only if the sampling rate exceeds twice the highest frequency present. The human auditory threshold spans roughly 20 Hz to 20,000 Hz. The compact disc standard of 44,100 Hz yields a Nyquist cutoff of 22,050 Hz, leaving a safe 2,050 Hz transition band for anti-aliasing reconstruction filters. Video production and broadcast systems standardize on 48,000 Hz.

Bit Depth, Dynamic Range and Quantization Noise

Bit depth defines the precision of each amplitude sample. Each additional bit adds roughly 6.02 dB of signal-to-quantization-noise ratio (SQNR). A 16-bit stream provides 65,536 discrete amplitude steps and 96.3 dB of dynamic range. Professional 24-bit audio offers 16,777,216 levels and 144.5 dB of dynamic range, exceeding analog hardware noise floors. Audio DAWs and DSP pipelines process in 32-bit floating-point to prevent internal digital clipping.

Distinguishing Audio Containers, Bitstreams and Codecs

A container format (like RIFF, Ogg, or M4A) defines the outer file structure, header metadata, timing tables, and synchronization chunks. An audio coding format specifies the mathematical bitstream syntax (such as MPEG-1 Layer III or Linear PCM). The codec is the software library or silicon hardware implementing the encoder/decoder (e.g., LAME, libvorbis, FFmpeg). Testing file extensions and stream codecs independently is critical in QA.

Web Audio API, HTML5 Audio and Browser Compatibility

Modern web browsers process sound via the lightweight HTML5 <audio> tag for linear playback and the low-latency Web Audio API (AudioContext) for spatialization, synthesis, analysis, and effects. Browsers use platform decoders: MP3 and WAV enjoy universal support across all desktop and mobile browsers, FLAC is native in modern engines (Chrome, Firefox, Safari iOS 11+), while Ogg Vorbis is native in Chromium and Firefox.

Audio QA and Upload Pipeline Testing Checklist

When building audio upload forms, transcoders, or media players, verify MIME types (audio/mpeg, audio/wav, audio/flac, audio/ogg) on web servers. Verify that audio streams support HTTP 206 Partial Content range requests for instant scrubbing. Test variable bitrate (VBR) files to ensure duration calculations remain accurate, test ID3v2 and Vorbis tag preservation, and audit loudness against EBU R128 and ITU-R BS.1770 standards.

Frequently asked questions about audio file formats

What is the difference between an audio container and an audio codec?

An audio container (such as WAV/RIFF, Ogg, or M4A) is a file envelope that structures the storage of audio samples alongside metadata tags, chapter marks, and synchronization headers. An audio codec (such as PCM, MP3, AAC, or Vorbis) is the algorithmic formula that encodes and decodes the actual sound waves into binary data. For example, a .wav file is a RIFF container that typically holds uncompressed PCM audio, but can technically package compressed ADPCM or MP3 streams as well.

Why is a WAV file so much larger than an MP3 or FLAC file?

WAV files typically store uncompressed Linear Pulse-Code Modulation (LPCM), capturing 44,100 samples per second per channel with 16 bits of precision. This results in a continuous bitrate of 1,411.2 kbps (roughly 10.6 MB per minute of stereo audio). In contrast, FLAC applies lossless entropy compression to reduce this to roughly 5–6 MB per minute without discarding any sound data, while MP3 discards inaudible frequencies to achieve bitrates of 128–320 kbps (1–2.4 MB per minute).

Is a 320 kbps MP3 indistinguishable from lossless FLAC?

In double-blind ABX listening tests conducted on consumer headphones and speakers, the vast majority of listeners cannot reliably differentiate a high-quality 320 kbps MP3 encoded with LAME from an uncompressed or FLAC master. However, lossless audio remains essential in production pipelines because repeated lossy re-encoding (generation loss) causes progressive artifact accumulation, and high-end studio monitoring reveals spatial detail and high-frequency decay lost during perceptual lossy compression.

What sample rate and bit depth should I use for web apps and games?

For web media and interactive games, 44.1 kHz or 48 kHz at 16-bit or 24-bit is the industry standard. 48 kHz is strongly recommended if your application combines audio with HTML5 video, as digital video clocks are synced to 48 kHz intervals. High-resolution sample rates such as 96 kHz or 192 kHz provide no audible benefit to human listeners in final delivery, while needlessly quadrupling download sizes and Web Audio API memory consumption.

Why do some web browsers fail to play OGG or FLAC natively?

Web browser audio capabilities depend on underlying platform codec licensing and operating system media engines. MP3 and WAV are universally supported across all browsers. FLAC is supported across all modern versions of Chrome, Firefox, Edge, and Safari (since iOS 11 and macOS High Sierra). Ogg Vorbis is natively supported in Chromium and Mozilla Firefox, but Apple Safari historically prioritizes MP4/AAC/ALAC over Xiph.Org Ogg containers.

How should QA engineers test audio upload forms and media players?

Test with valid and corrupt files across varying bitrates (CBR and VBR), unusual sampling rates (22.05 kHz, 32 kHz, 88.2 kHz), multichannel surround configurations (5.1 surround vs stereo vs mono), extreme file sizes (from small 50 KB sound effects to 100 MB long-form podcasts), and missing or malformed ID3/Vorbis metadata headers. Also verify HTTP Range requests for seamless timeline seeking and check that client-side playback complies with browser autoplay gesture policies.

Encyclopedic references and technical standards: Wikipedia: Audio file format · Wikipedia: Audio coding format · Wikipedia: MP3 · Wikipedia: WAV · Wikipedia: FLAC · Wikipedia: Ogg Vorbis

Browse all file categories