.PCM Pulse-Code Modulation
.pcm

Pulse-Code Modulation

Convert raw PCM audio to WAV or MP3 directly in your browser — no upload, no server, full privacy. FileDex uses FFmpeg WebAssembly to wrap headerless PCM data with the correct container format locally on your device.

Learn more ↓
Audio structure
Header format info
Meta tags · codec
Samples audio data
Raw AudioUncompressedNo HeaderUniversal StandardLossless
By FileDex

Your files never leave your device

Common questions

How do I convert PCM to WAV in my browser?

Drop your PCM file into FileDex above and select WAV as the output. FileDex wraps your raw PCM data with a RIFF/WAV header locally using FFmpeg WebAssembly — no file is uploaded. You may need to specify sample rate and bit depth if they differ from the defaults.

Why does my PCM file play as static noise?

PCM has no header — the player is guessing the wrong parameters. You need to specify the correct sample rate (e.g., 44100 or 48000 Hz), bit depth (8, 16, or 24-bit), byte order (little-endian or big-endian), and channel count (mono or stereo). Even one wrong parameter produces noise or distorted audio.

What is the difference between PCM and WAV?

PCM is raw audio samples with no container or metadata. WAV wraps identical PCM data in a RIFF header that stores sample rate, bit depth, and channel count. Converting PCM to WAV adds a 44-byte header with no change to the audio data — the conversion is lossless.

How do I determine the sample rate of a PCM file?

There is no way to determine PCM parameters from the file itself — it is just raw bytes. Check the documentation of the software or hardware that created the file. Common rates are 44100 Hz (CD), 48000 Hz (video/broadcast), 16000 Hz (telephony), and 8000 Hz (voice).

What makes .PCM special

Digital audio at its most elemental, PCM (Pulse Code Modulation) is not a file format but a raw encoding method. Every other audio format — WAV, AIFF, FLAC, MP3, AAC — either wraps PCM samples in a container or compresses them. PCM itself is the unprocessed stream of amplitude values captured at regular intervals.

Continue reading — full technical deep dive

PCM at CD quality (44.1 kHz, 16-bit, stereo) produces exactly 1,411,200 bits per second. The 44.1 kHz sampling rate traces back to an engineering constraint from the early 1980s: Sony and Philips needed a rate that could be recorded onto PAL video tape using a PCM adapter (the PCM-1600). PAL's 294 active lines per field at 50 fields per second, with three samples per line, yields 44,100 samples per second. The rate stuck, became the Red Book CD standard in 1982, and remains the baseline for consumer audio.

How PCM works

An analog-to-digital converter (ADC) measures the voltage of an analog waveform at the sampling rate — 44,100 times per second for CD audio. Each measurement is quantized to the nearest value representable in the bit depth. With 16-bit depth, there are 65,536 possible amplitude levels. With 24-bit, there are 16,777,216 levels.

The Nyquist-Shannon theorem guarantees that a sampling rate of F can perfectly reconstruct frequencies up to F/2. At 44.1 kHz, the theoretical ceiling is 22.05 kHz — just above the ~20 kHz upper limit of human hearing. A steep anti-aliasing filter removes frequencies above Nyquist before sampling to prevent aliasing artifacts.

Bit depth and dynamic range

Bit depth Dynamic range Noise floor Typical use
8-bit 48 dB Audible hiss Early games, telephony
16-bit 96 dB Inaudible in quiet rooms CD, consumer playback
24-bit 144 dB Below thermal noise of microphones Recording, mixing
32-bit float 1528 dB theoretical Infinite headroom DAW internal processing

16-bit provides 96 dB of dynamic range via the formula 6.02 * n + 1.76 where n is bit depth. 24-bit gives 144 dB — far exceeding the ~120 dB range of the best analog recording chains. 32-bit float is used internally by DAWs because floating-point arithmetic cannot clip; values above 0 dBFS are preserved and only clipped at final output.

Raw PCM files

A raw PCM file (often .pcm or .raw) contains nothing but sample data — no header, no metadata, no channel layout. To play it correctly, you must know the sample rate, bit depth, channel count, endianness, and whether samples are signed or unsigned. Get any parameter wrong and you hear static or pitch-shifted noise.

This is why PCM is almost always wrapped in a container:

  • WAV — RIFF header + PCM data (little-endian)
  • AIFF — IFF header + PCM data (big-endian)
  • AU — Sun/NeXT header + PCM data
  • CAF — Apple Core Audio Format, no 4 GB limit

Data rates

Configuration Bits/sec MB per minute
8 kHz / 8-bit / mono (telephony) 64,000 0.46
44.1 kHz / 16-bit / stereo (CD) 1,411,200 10.1
48 kHz / 24-bit / stereo (broadcast) 2,304,000 16.5
192 kHz / 32-bit / stereo (mastering) 12,288,000 88.0

When PCM matters

PCM is the starting point and ending point of every audio pipeline. Microphones produce analog signals; ADCs convert them to PCM. Speakers need analog signals; DACs convert PCM back. Every lossy codec (MP3, AAC, Opus) decodes to PCM before reaching your ears.

Use raw PCM when interfacing with embedded systems, FPGA audio pipelines, or real-time DSP code where container parsing adds unwanted latency. For storage and interchange, always wrap PCM in WAV or AIFF. For distribution, compress with FLAC (lossless) or Opus/AAC (lossy). FileDex converts raw PCM to WAV, FLAC, MP3, and other formats directly in the browser — just specify your source parameters.

.PCM compared to alternatives

.PCM compared to alternative formats
Formats Criteria Winner
.PCM vs .WAV
Usability
WAV wraps identical PCM samples in a RIFF header that stores sample rate, bit depth, and channel count. Any player can open WAV without external parameters. PCM requires the user to know and specify these parameters manually.
WAV wins
.PCM vs .FLAC
File size
FLAC losslessly compresses PCM to 50-70% of original size. PCM is fully uncompressed — every sample stored at full precision with zero overhead. FLAC decodes to bit-identical PCM.
FLAC wins
.PCM (16-BIT) vs .PCM (24-BIT)
Dynamic range
16-bit PCM provides 96 dB dynamic range (sufficient for CD playback). 24-bit PCM provides 144 dB, exceeding any microphone or speaker — used in professional recording for headroom during mixing.
PCM (24-BIT) wins

Technical reference

MIME Type
audio/L16
Developer
Alec Reeves / ITU
Year Introduced
1937
Open Standard
Yes

Binary Structure

PCM files contain raw audio samples with no header, no magic bytes, no metadata, and no container structure. The file is a flat sequence of interleaved audio samples. Correct interpretation requires external knowledge of four parameters: sample rate (e.g., 44100 Hz), bit depth (e.g., 16-bit), channel count (e.g., 2 for stereo), and byte order (little-endian or big-endian). For 16-bit stereo audio, each sample frame is 4 bytes: 2 bytes for left channel followed by 2 bytes for right channel, with values representing signed integers in two's complement. Without these parameters, the raw bytes are meaningless — any misinterpretation of rate, depth, or endianness produces noise, speed distortion, or silence.

1937Alec Reeves patents Pulse Code Modulation at ITT laboratories in France1962Bell System deploys T1 digital trunk lines using 8-bit mu-law PCM at 8 kHz for 24 telephone channels1982Compact Disc (CD) standard (Red Book) adopts 16-bit PCM at 44.1 kHz as the consumer digital audio format1991Microsoft/IBM publish the WAV specification, wrapping PCM in a RIFF container with header metadata2000DVD-Audio introduces 24-bit/192 kHz PCM for high-resolution consumer audio2012USB Audio Class 2.0 standardizes high-resolution PCM streaming up to 32-bit/384 kHz over USB
Wrap raw PCM in a WAV container ffmpeg
ffmpeg -f s16le -ar 44100 -ac 2 -i input.pcm output.wav

-f s16le specifies signed 16-bit little-endian input format. -ar 44100 sets sample rate. -ac 2 sets stereo channels. These parameters are mandatory because PCM has no header to describe itself.

Convert raw PCM to MP3 ffmpeg
ffmpeg -f s16le -ar 44100 -ac 2 -i input.pcm -c:a libmp3lame -b:a 192k output.mp3

Reads raw 16-bit PCM at 44.1 kHz stereo and encodes to MP3 at 192 kbps. Adjust -ar and -ac to match your actual PCM parameters. Use -f s16be for big-endian source data.

Play raw PCM directly without conversion ffmpeg
ffplay -f s16le -ar 44100 -ac 2 input.pcm

ffplay renders PCM audio in real-time with the specified format parameters. Useful for quickly verifying sample rate and format before committing to a conversion.

PCM WAV render lossless Adding a RIFF/WAV header to raw PCM embeds the sample rate, bit depth, and channel count into the file itself, making it self-describing and playable by all audio software without external parameter specification.
PCM MP3 transcode lossy MP3 encoding compresses raw PCM to approximately 10% of original size while maintaining perceptually acceptable quality. The correct sample rate and format must be specified as input parameters since PCM has no header.
LOW

Attack Vectors

  • PCM files contain no structured data — they cannot carry embedded scripts, metadata exploits, or executable payloads. The attack surface is limited to buffer overflow in decoders that miscalculate buffer sizes based on user-specified parameters
  • A file disguised as PCM could be any format; processing it as audio is harmless but produces noise

Mitigation: FileDex processes PCM files locally using FFmpeg WASM in a sandboxed browser environment. No data is sent to external servers.

Audacity tool
Free audio editor that imports raw PCM via File > Import > Raw Data with format selection
SoX tool
Command-line audio tool for PCM format conversion, resampling, and effects
FFmpeg tool
Universal media framework that reads raw PCM with explicit format parameters
NumPy library
Python library for reading PCM as integer arrays via numpy.fromfile() for DSP work
PortAudio library
Cross-platform audio I/O library for real-time PCM capture and playback