How to use the WAV to PCM Base64 tool
- Select PCM16 WAV audio and choose a .wav file up to 20 MiB.
- Select Extract PCM to read the samples.
- Copy the Base64 PCM from the Result box and paste it into your request or event payload.
- Use the Download link if you want the raw bytes as audio.pcm.
How PCM is extracted from a WAV file
A WAV file is a RIFF container: the letters RIFF, a size, the letters WAVE, and then a series of chunks that each have a 4-character tag and a length. The fmt chunk describes the audio. The data chunk holds the samples. Recorders and editors often add more chunks, such as LIST for metadata, so the samples do not always start at byte 44.
The tool walks the chunk list instead of assuming a fixed offset. It reads the format code and bit depth from fmt, takes the contents of the first data chunk, skips everything else and honors the padding byte after odd-sized chunks. What comes out is exactly the sample bytes: signed 16-bit little-endian values, interleaved by channel.
Worked example: WAV to PCM for a 50-byte file
A minimal mono file at 24,000 Hz with three samples is 50 bytes long: a 44-byte header followed by 6 bytes of data. The tool drops the header and encodes the 6 bytes. The samples are 0, 32767 and -32768.
WAV file (hex):
52 49 46 46 2A 00 00 00 57 41 56 45 66 6D 74 20
10 00 00 00 01 00 01 00 C0 5D 00 00 80 BB 00 00
02 00 10 00 64 61 74 61 06 00 00 00 00 00 FF 7F
00 80
PCM Base64: AAD/fwCASupported files and error messages
The reader is strict about format, so the Base64 you copy is always plain PCM16.
- Accepted: RIFF/WAVE files with format code 1, integer PCM, and 16 bits per sample, at any sample rate and channel count.
- Choose an uncompressed RIFF/WAVE file: the file is shorter than 44 bytes or does not start with RIFF and WAVE. MP3, FLAC, M4A and Ogg files end here, as do RF64 files.
- Only uncompressed 16-bit PCM WAV files are supported: the audio is 8-bit, 24-bit, 32-bit float, mu-law or ADPCM, or it uses the extensible format code that some tools write for multichannel files.
- The WAV file is truncated: a chunk claims more bytes than the file contains. This also happens with files written to a pipe, where the size fields were never filled in.
- Choose a file up to 20 MiB: the file is over the limit or none was selected.
The output carries no sample rate
Raw PCM has no metadata, and this tool does not print the rate or channel count it found in the header. The receiving API interprets the bytes with its own fixed or configured settings. Before converting, make sure the WAV already matches them, commonly 16,000 or 24,000 Hz mono for speech services.
Audio recorded at 44,100 or 48,000 Hz stereo must be resampled and downmixed with an audio tool first. Otherwise the service reads it at the wrong speed and recognition fails.
Frequently asked questions
What is the difference between WAV and raw PCM?
WAV is PCM plus a header that states sample rate, channels and bit depth. Raw PCM is only the samples. Players need the header, while many streaming speech APIs want the samples alone because the format is fixed by the session.
Can I just remove the first 44 bytes of a WAV file?
Only when the file has the minimal layout. Files with metadata chunks before the data, or a longer fmt chunk, have a larger header, and other chunks can follow the audio. Cutting at 44 then leaves stray bytes that are heard as a click or noise.
How do I send long audio in pieces?
Paste the Base64 output into the Base64 Chunk Splitter. Pick a chunk size that is a multiple of 8 for mono or 16 for stereo, which keeps 16-bit samples and frames intact.
How can I verify the extracted PCM?
Paste the Base64 into PCM to WAV Base64, enter the original sample rate and channel count, and play the preview. If it sounds like the source file, the extraction is correct.
Is my recording uploaded during conversion?
No. The file is opened and parsed in your browser, and both the Base64 text and the audio.pcm download are produced locally.