Audio Converter
Published Updated
Turn any audio your browser can decode into a 16-bit WAV, a 128 kbps MP3 or an Ogg Vorbis file, and play the result before you save it.
Three outputs compared
Each target uses its own encoder. Sizes are for one minute of stereo at 44.1 kHz, with 1 MB = 1,000,000 bytes:
| Output | How it is written | Channels kept | One minute | Best for |
|---|---|---|---|---|
| WAV | 16-bit PCM, 44-byte header | All of them | 10.58 MB | Editing, or apps that want uncompressed audio |
| MP3 | lamejs, 128 kbps constant | First two | 0.96 MB | Playing almost anywhere |
| OGG | libvorbis in WebAssembly, quality 3 | First two | About 0.8 MB, varies | Web pages and games that use Ogg |
The Ogg row depends on the music, since Vorbis quality 3 is variable bitrate. The Xiph Vorbis FAQ calls quality 3 the default and puts it at approximately 110 kbps. The MDN audio codec guide rates Vorbis as generally more efficient than MP3 at similar quality.
Why WAV here is not a lossless copy
The button calls WAV a lossless PCM container, and the container is. The conversion around it can still lose detail. The browser decodes at its own audio-context rate, so a 96 kHz master becomes 44.1 or 48 kHz, and every sample is stored as 16 bits, so 24-bit and float masters lose their extra depth and any peak above full scale is clipped.
In our test, on a Mac whose audio context ran at 48,000 Hz in all four engines we tried, a 96 kHz WAV and an 8 kHz one both came back at 48,000 Hz. The MDN decodeAudioData page describes this resampling. Keep your original if it is a high-resolution file.
Which files opened, browser by browser
We loaded the page's real converter in Google Chrome 156, Chromium 153 (Playwright build, not Google Chrome), Firefox 155 and Playwright's WebKit build (not the Safari app) and gave it 26 generated files: 5-second tones written as WAV by a script, the same tones converted to other formats with macOS afconvert, an Ogg Opus file recorded in Firefox, and an MP3 and an Ogg Vorbis file made by this site's own encoders. For every file that opened we clicked WAV, MP3 and OGG in turn, downloaded each result from the page's link and decoded it again in the same browser. Nothing was played and we did not listen to the results; one run per engine.
| Input (generated) | Chrome 156 | Chromium 153 | Firefox 155 | WebKit build |
|---|---|---|---|---|
| PCM WAV: 8, 16 and 24-bit and 32-bit float; 8, 22.05, 44.1, 48 and 96 kHz; mono, stereo and 6 channels | Opened | Opened | Opened | Opened |
| WAV holding A-law or µ-law samples | Opened | Opened | Opened | Opened |
| WAV holding IMA ADPCM samples | Refused, the card names ADPCM | Refused, the card names ADPCM | Refused, the card names ADPCM | Opened |
| AAC-LC and HE-AAC in .m4a, AAC in a raw .aac file | Opened | Opened | Opened | Opened |
| FLAC, Ogg Vorbis, Ogg Opus and MP3 | Opened | Opened | Opened | Opened |
| Apple Lossless (ALAC) in .m4a | Refused, the card names ALAC | Refused, the card names ALAC | Refused, the card names ALAC | Opened (labelled M4A / AAC) |
| AIFF and CAF, 16-bit | Refused (general message) | Refused (general message) | Refused (general message) | Opened |
| The first half of an AAC .m4a, as if a download stopped midway | Opened, 2.07 s | Opened, 2.07 s | Refused (general message) | Opened, 2.00 s |
| 50,000 random bytes named .mp3 | Refused (general message) | Refused (general message) | Refused (general message) | Refused (general message) |
Every file that opened gave all three outputs in all four engines, and every output decoded again in the browser that made it, the OGG files in the WebKit build included. An empty file did not reach the converter: the upload box itself said it was empty (0 bytes) in all four. The Format line on the card comes from the file type or extension, which is why the WebKit build called the Apple Lossless file M4A / AAC.
What is inside each output
The rate is the same for every output: on our test Mac the browser's audio context ran at 48,000 Hz in all four engines, and all 273 outputs of the run were written at 48,000 Hz, whatever the source rate. The table uses the 5-second 16-bit 44.1 kHz stereo tone as the source.
| Output | What the header says | Channels | Length read back (source 5.000 s) | Size |
|---|---|---|---|---|
| WAV | PCM (format tag 1), 16-bit, 48,000 Hz, a 44-byte header | All of them: the 6-channel test file stayed 6 channels in all four engines | 5.000 s | 960,044 bytes in all four |
| MP3 | MPEG-1 Layer III, 128 kbps, 48,000 Hz; no ID3 tag, no Xing or Info frame | The first two | 5.040 s | 80,640 bytes in all four |
| OGG | Ogg Vorbis, 48,000 Hz, nominal bitrate 112,000 bit/s (80,000 for mono) | The first two | 5.000 s; the WebKit build read OGG files back up to 0.003 s short | 21,004 to 22,161 bytes, depending on the engine |
Two worked examples from the same run. An 8 kHz mono WAV of 80,044 bytes came back as a WAV of 480,044 bytes in every engine: six times larger, because 8,000 samples a second became 48,000, with no detail added. A 24-bit WAV and a 32-bit float WAV of the same tone both came back as 960,044 bytes, the same size as the 16-bit version, because every sample is written as 16 bits.
OGG size follows the sound, not the clock. The pure 440 Hz tone needed about 34 to 35 kbps; the same tone stored as 8-bit, A-law or µ-law WAV (formats with coarser steps) gave 52,962 to 72,365 bytes for the same 5 seconds; and a minute of two tones with light noise gave 657,686 to 660,309 bytes (about 88 kbps). That is below the About 0.8 MB in the table above, which uses Xiph's figure of about 110 kbps; real recordings were not tested.
Lengths moved a little where the decoder moved them. Firefox 155 read our AAC .m4a as 5.062 seconds and the HE-AAC file as 5.133 seconds, so its WAV of the .m4a was 971,940 bytes instead of 960,044. Every MP3 read back 0.024 to 0.047 seconds longer than what went into it; none of them carried a Xing or Info frame.
Time for one-minute and five-minute files
For speed we built 16-bit 44.1 kHz stereo WAVs in the page (two tones and a little seeded noise, 10,584,044 and 52,920,044 bytes), opened each once and converted it to each format, one run per engine. Times run from the click on Convert Audio to the result card; the first column is the decode when the file is picked.
| Engine | Opening the 5-minute WAV | 1 minute: WAV / MP3 / OGG | 5 minutes: WAV / MP3 / OGG |
|---|---|---|---|
| Chrome 156 | 0.5 s | 0.08 / 3.5 / 0.9 s | 0.3 / 17.6 / 4.3 s |
| Chromium 153 | 1.0 s | 0.08 / 3.7 / 0.9 s | 0.3 / 18.2 / 4.3 s |
| Firefox 155 | 4.1 s | 0.07 / 6.2 / 1.2 s | 0.3 / 28.0 / 5.2 s |
| The WebKit build | 0.4 s | 0.27 / 3.4 / 0.9 s | 1.3 / 18.7 / 4.3 s |
| Size, all four engines | 11,520,044 / 960,384 / 657,686 to 660,309 bytes | 57,600,044 / 4,800,384 / 3,268,479 to 3,281,526 bytes |
MP3 took about four times as long as OGG in Chrome 156, Chromium 153 and the WebKit build, and about five times as long in Firefox 155. WAV needs no encoding, only copying samples, which is why it finished in about a third of a second for five minutes in three engines. One minute of WAV came to 11,520,044 bytes here because our test Mac ran at 48,000 Hz; the 10.58 MB in the table at the top of this page is the same minute at 44.1 kHz. The page holds the whole decoded file in memory while it works; we did not test files longer than five minutes.
Converting audio between formats
Step 1
Add an audio file
Any audio type can be picked. After the browser decodes it, the page shows its length, size and a format label taken from the file type or extension.
Step 2
Pick WAV, MP3 or OGG
WAV is selected by default. None of the three has a quality setting.
Step 3
Convert and play
Convert Audio writes the new file, a player lets you hear it, and the download keeps your file name with the new extension.
Surround and multichannel files
WAV output keeps every channel: a 6-channel test file decoded with all 6 and the WAV writer copies each one. The header is the basic PCM type without speaker positions, while the Library of Congress format description says multichannel WAV requires WAVE_FORMAT_EXTENSIBLE, so some players may not place the channels correctly.
MP3 and OGG keep channels 1 and 2 and drop the rest without a mixdown. For single-purpose pages see MP3 Converter, MP3 to OGG and FLAC to MP3, which offers 128 to 320 kbps and keeps tags.
Audio Converter FAQ
Which formats can I convert from?
Whatever your browser can decode. In our test, PCM, A-law and µ-law WAV, AAC and HE-AAC (.m4a and .aac), FLAC, Ogg Vorbis, Ogg Opus and MP3 opened in Chrome 156, Chromium 153, Firefox 155 and WebKit. ADPCM WAV, Apple Lossless, AIFF and CAF opened only in the WebKit build; the other three named the ADPCM and Apple Lossless cases on the error card.
Can I set the MP3 bitrate or the Ogg quality?
No. MP3 is always 128 kbps constant bitrate. Ogg uses the libvorbis default, quality 3, which Xiph puts at roughly 110 kbps. For other MP3 bitrates, MP3 Compressor re-encodes at 64 to 192 kbps.
Will an OGG file play on an iPhone or in Safari?
MDN's audio codec guide lists no Vorbis support in Safari for audio and video elements. Playwright's WebKit build did decode every OGG made here through the Web Audio decoder this page uses, which is a different path from a player. The same guide lists MP3 support in Safari from version 3.1, so of the two compressed outputs here, MP3 is the one it lists for Safari.
Why is the converted WAV so large?
WAV stores every sample without compression. One minute of 16-bit stereo at 44.1 kHz is 10.58 MB, about 11 times a 128 kbps MP3. Converting an MP3 to WAV makes it bigger without bringing back anything the MP3 lost.
Why did the sample rate change?
The browser hands the decoded audio over at the rate of its audio context, which is the preferred rate of your output device. All three outputs are written at that rate. The audio context ran at 48,000 Hz in all four engines we tried, and files from 8 kHz to 96 kHz all came out at 48,000 Hz.
What does Couldn't read this audio file mean?
Decoding failed. The card adds the likely reason when the file reveals one, for example Apple Lossless inside an .m4a or a video with no sound track. Otherwise the file is probably in a format your browser cannot decode, or damaged. Trying another browser is the quickest check.
Why is the OGG file so much smaller than the MP3?
Vorbis spends bits where the sound needs them, while the MP3 here is fixed at 128 kbps. A 5-second stereo tone gave an MP3 of 80,640 bytes and an OGG of 21,004 to 22,161 bytes. With more going on in the sound the gap narrows: a minute of two tones with light noise gave 960,384 bytes as MP3 and about 660,000 bytes as OGG.
How long does a five-minute recording take?
MP3 took 17.6 seconds in Chrome 156, 18.2 in Chromium 153, 28.0 in Firefox 155 and 18.7 in the WebKit build, while OGG took 4.3 to 5.2 seconds and WAV 1.3 seconds or less. Opening the file took another 0.4 to 4.1 seconds. Those are one run each on a desktop Mac.
Why did my 8 kHz recording turn into a much bigger WAV?
Because the browser decodes it at its own rate. An 8 kHz mono WAV of 80,044 bytes came back as 480,044 bytes in all four engines, written at 48,000 Hz: six times the samples, none of them new detail. Keep the original if size matters.
Is the converted file as long as the original?
WAV and OGG were, within 0.003 seconds, for every PCM source in our test. Each MP3 read back 0.024 to 0.047 seconds longer. AAC sources depend on the browser: Firefox 155 decoded our 5-second .m4a as 5.062 seconds, so all three outputs carried that extra 0.062 seconds there.