WAV to MP3
Published Updated
Shrink a WAV into a 128 kbps MP3, about 11 times smaller for 16-bit stereo, with 8-bit to 32-bit float and µ-law files accepted.
File size: what one minute costs
WAV size is sample rate times bytes per sample times channels. The MP3 is 128,000 bits per second whatever came in. 1 MB here is 1,000,000 bytes:
| WAV type | WAV per minute | MP3 per minute | MP3 is |
|---|---|---|---|
| 16-bit, 44.1 kHz, stereo | 10.58 MB | 0.96 MB | 11 times smaller |
| 24-bit, 48 kHz, stereo | 17.28 MB | 0.96 MB | 18 times smaller |
| 32-bit float, 96 kHz, stereo | 46.08 MB | 0.96 MB | 48 times smaller |
| 16-bit, 44.1 kHz, mono | 5.29 MB | 0.96 MB | 5.5 times smaller |
| 8-bit µ-law, 8 kHz, mono | 0.48 MB | 0.96 MB | twice as large |
Mono does not shrink the MP3: at a fixed 128 kbps a mono stream takes the same bytes as a stereo one. The encoder is lamejs, a JavaScript MP3 encoder derived from LAME's libmp3lame, always called at 128 kbps constant bitrate. The result card counts 1 KB as 1,000 bytes, so one minute of MP3 shows there as about 960 KB.
WAV variants tested in Google Chrome 156
The page hands the file to the browser's decoder, so which WAV types work is up to the browser. These test files, made with Apple's afconvert, all decoded in headless Chrome 156 through the same decodeAudioData call:
| Test file | Decoded | MP3 written as |
|---|---|---|
| 8-bit PCM, 22.05 kHz, stereo | Yes | Stereo, 44.1 kHz |
| 16-bit PCM, 44.1 kHz, stereo | Yes | Stereo, 44.1 kHz |
| 24-bit PCM, 96 kHz, stereo | Yes | Stereo, 44.1 kHz |
| 32-bit integer and 32-bit float, 48 kHz | Yes | Stereo, 44.1 kHz |
| µ-law and A-law, 8 kHz | Yes | Stereo, 44.1 kHz |
| 16-bit PCM, 48 kHz, 6 channels | Yes | Channels 1 and 2 only |
The 44.1 kHz column is the test machine's device rate, not a fixed setting: the Web Audio API resamples decoded audio to the rate of the audio context, and a context made without a rate, as on this page, uses the preferred rate of the output device. For the 6-channel file, the same specification's channel order starts with front left and front right, and the page encodes the first two channels only. The MDN container guide notes that nearly all WAV files hold linear PCM and that support for other WAV codecs is sparse, and the MDN decodeAudioData page states that decoded audio is resampled to the context's rate.
WAV to MP3 in three steps
Step 1
Add the WAV
The file picker shows WAV files. Once the browser has decoded it, the page lists the length, the size and the detected format.
Step 2
Press Convert to MP3
Samples are turned into 16-bit values and encoded by lamejs at a constant 128 kbps, mono or stereo as in the WAV.
Step 3
Listen, then save
A player appears with the new size. The download keeps the WAV's name with an .mp3 ending.
Keep the WAV as your master
MP3 is lossy, so the WAV is the copy to edit, re-master or convert again later. Converting the MP3 back to WAV gives a large file with the losses baked in.
For a smaller WAV instead, WAV Compressor lowers the sample rate or mixes to mono. Audio Converter writes Ogg Vorbis, and Audio Cutter shortens a recording.
Questions about WAV to MP3
How much smaller will the MP3 be?
It depends on the WAV, because the MP3 side is fixed at 128 kbps, about 0.96 MB a minute. A 16-bit 44.1 kHz stereo WAV shrinks about 11 times, a 24-bit 48 kHz stereo master about 18 times. An 8 kHz µ-law file grows to twice its size.
Can I choose 192 or 320 kbps?
Not on this page. The encoder is always called with 128 kbps constant bitrate and there is no quality menu. The FLAC to MP3 tool offers 128 to 320 kbps, but it only takes FLAC files.
Why is my 96 kHz WAV a 44.1 kHz MP3?
Decoding runs at the speed of the browser's audio engine, and your output device sets that speed. On a Mac whose device ran at 44,100 Hz, Chrome 156 returned WAVs recorded at 8, 22.05, 48 and 96 kHz all at 44,100 Hz, and the MP3 was written at that rate. A machine set to 48 kHz gives 48 kHz files.
Does a 24-bit or 32-bit float WAV lose anything on the way?
A little, before encoding starts. Every sample becomes a 16-bit integer, and values above full scale are cut off, which matters for float files that peak over 0 dBFS.
Are markers or text tags in the WAV copied?
No. Only the sound is decoded, and the MP3 carries no ID3 tags, so add a title or artist in a tag editor.
Why does my WAV give Couldn't read this audio file?
The browser could not decode it, and the line under that heading names the reason when the file header shows one, such as ADPCM audio in place of plain PCM. Typical causes are a compressed WAV type the browser does not support, a file cut short during copying, or a recording so long that decoding runs out of memory. Re-export it as plain 16-bit PCM and try again.