MP3 to OGG
Published Updated
Add your MP3 file, transcode it locally to the open-source Ogg Vorbis format, then preview and download the OGG file — free, private, and processed entirely in your browser.
The output is Ogg Vorbis at quality 3, with no controls
The converter decodes your MP3 in the browser and encodes it again with libvorbis compiled to WebAssembly. It exposes no quality or bitrate setting, so every file is written at libvorbis's default, quality 3. Xiph, the maker of Vorbis, describes quality 3 as about 110 kbps and as the default setting (Xiph Vorbis FAQ).
The file inside .ogg is Vorbis audio in an Ogg container, defined in the Vorbis I specification. Ogg itself can carry other codecs too, but RFC 5334 says .ogg is used for Ogg files that contain only a Vorbis bitstream, which is what this tool writes.
What happens to the file, in order
Nothing in the MP3 is reused. Your browser decodes it to raw samples, which the Web Audio API holds as 32-bit floating-point numbers (MDN, AudioBuffer). At most two channels go to libvorbis in slices of 4,096 samples, and the Ogg pages it returns are joined into one file. This is a second lossy encode, not a repackaging of the MP3 data.
That route costs memory. One minute of stereo at 48,000 Hz is 48,000 × 60 × 2 channels × 4 bytes, about 23 MB of decoded samples, so a 4-minute track needs about 92 MB and a one-hour recording about 1.4 GB before any Ogg is written. The tool sets no length limit, so the browser tab's memory is the limit. The encoding loop also runs on the page itself without pauses, which means the tab can feel frozen on a long file. Cut very long recordings first with the Audio Cutter.
What a 4-minute track becomes
File sizes are bitrate times duration. The OGG column assumes the nominal 110 kbps and will vary with the music.
| MP3 you start with | MP3 size | OGG size (about) | Change |
|---|---|---|---|
| 320 kbps | 9.6 MB | 3.3 MB | about 66% smaller |
| 256 kbps | 7.7 MB | 3.3 MB | about 57% smaller |
| 192 kbps | 5.8 MB | 3.3 MB | about 43% smaller |
| 128 kbps | 3.8 MB | 3.3 MB | about 14% smaller |
Measured on a 30-second test track
The 110 kbps figure is Xiph's nominal value, so it was checked with this tool's own code. A 30-second stereo track was generated by a script in two versions and written as MP3 with this site's MP3 encoder (lamejs) at five bitrates. Each MP3 was decoded to samples with macOS afconvert, standing in for the browser's decoder, and encoded with this tool's Ogg encoder (wasm-media-encoders 0.7.0, which wraps libvorbis), all in Node. The tonal track is four slow chords with a few overtones each. The dense track adds a noise bed, noise bursts and a kick drum. Sizes are decimal kilobytes, with the MP3 decoded at 44,100 Hz.
| MP3 you start with | MP3 size | Ogg, tonal track | Ogg, dense track |
|---|---|---|---|
| 320 kbps | 1,202 KB | 412 KB (66% smaller) | 399 KB (67% smaller) |
| 256 kbps | 961 KB | 411 KB (57% smaller) | 401 KB (58% smaller) |
| 192 kbps | 721 KB | 410 KB (43% smaller) | 405 KB (44% smaller) |
| 128 kbps | 481 KB | 413 KB (14% smaller) | 431 KB (10% smaller) |
| 96 kbps | 361 KB | 396 KB (10% larger) | 414 KB (15% larger) |
The Ogg size hardly moved with the MP3 bitrate. Across all 20 stereo runs, which also included a decode at 48,000 Hz, the output bitrate ran between 103 and 115 kbps, in line with Xiph's roughly 110. Decoding at 48,000 Hz instead of 44,100 Hz changed the Ogg size by between 3.7% less and 1.0% more. Generated signals are not music, so a real track can land higher or lower. The size is set by the Vorbis quality, not by the bitrate of your MP3.
When the Ogg comes out larger, and what mono does
The encoder never looks at your MP3's bitrate. It sees samples and encodes them at its fixed quality, so a stereo MP3 below about 110 kbps grows. In the table above (44,100 Hz decode) a 96 kbps MP3 became a file 10% to 15% larger, and 7% to 10% larger when the same MP3s were decoded at 48,000 Hz.
Mono is different. The same quality setting gives a lower rate for one channel: the Ogg header declares a nominal 80,000 bits per second for mono against 112,000 for stereo, and the mono test files measured 64 to 74 kbps. A 128 kbps mono MP3 shrank by 43% to 45%. A 64 kbps mono MP3 gave a file from about the same size to 16% larger, depending on the track.
When not to use this
Xiph's own FAQ says decode-and-recompress between lossy formats is generally a bad idea, and the best case is a file that sounds like your MP3 (Vorbis FAQ).
If you still have the WAV or FLAC, encode from that. If you only have the MP3, keep it and treat the OGG as a copy for software that requires Ogg, such as some game engines.
Converting step by step
Step 1
Add an MP3
Choose one .mp3 file. The page decodes it and shows the duration and size before you convert.
Step 2
Press Convert to OGG
There are no settings. The tool encodes with libvorbis at its default quality and plays the result back in the page.
Step 3
Listen, then download
Check the preview player. The .ogg file keeps the name of your MP3.
Sample rate and tags
The Web Audio API resamples decoded audio to the rate of the audio context (MDN, decodeAudioData), and this tool writes the OGG at that rate. A 44.1 kHz MP3 can therefore come out as 48 kHz, which does no harm for listening. Tags are not copied, so retag the OGG afterwards if you need titles.
Parsing the files from the test above shows what is inside. The comment header holds only the encoder's vendor string and zero tags. The identification header lists the channel count, the sample rate and three bitrate fields: maximum and minimum are 0 (unset) and nominal is 112,000 for stereo. The specification calls these fields hints and warns that the nominal value can be well off in a purely variable-bitrate stream. A player that shows "112 kbps" is reading that hint. Xiph describes the same quality-based mode as holding quality steady while the bitrate varies (libvorbisenc overview).
MP3 to OGG, answered
What bitrate does the OGG file have?
You cannot choose one. The encoder runs libvorbis in variable-bitrate mode at its default quality 3, which Xiph's FAQ puts at roughly 110 kbps. The real bitrate moves up and down with the music.
Will the OGG sound better than the MP3?
No. Both formats are lossy, and the MP3 has already discarded detail that Vorbis cannot bring back. Converting between them can only keep the sound about the same or make it slightly worse.
Why is the OGG at 48 kHz when my MP3 is 44.1 kHz?
The browser decodes audio at the sample rate of its own audio engine, and the encoder uses that rate. On many systems it is 48,000 Hz regardless of the source file.
Are the song title, artist and cover art kept?
No. The tool writes only the audio stream, so ID3 tags from the MP3 are not copied into the OGG.
Is the OGG file smaller than the MP3?
It depends on the MP3 bitrate. A 320 kbps MP3 shrinks by about two thirds. A 128 kbps MP3 shrinks by only about 14%.
Does it work on mono recordings?
Yes. A mono MP3 becomes a mono OGG, and stereo stays stereo.
Why did my 96 kbps MP3 turn into a larger OGG?
The encoder ignores the MP3's bitrate and writes at its fixed quality, which came to 103 to 115 kbps for stereo in our test files. An MP3 below that rate grows: a 96 kbps stereo MP3 gave a file 7% to 15% larger across our four runs (two test tracks, decoded at 44,100 and at 48,000 Hz). At 128 kbps and above the OGG was smaller in every run.
Is every .ogg file Vorbis?
Not strictly. Ogg is a container, and RFC 5334 says .ogg is used for Ogg files that contain only Vorbis audio, which is what this tool writes. The same RFC names .spx for Speex and .oga as the general audio extension, and a player can tell the codecs apart by looking inside the file.
How long can the MP3 be?
The tool sets no limit on length or file size, but the whole track is decoded into memory first. At 48,000 Hz stereo that is about 23 MB per minute, so a 4-minute song needs around 92 MB and a one-hour file around 1.4 GB. If the tab runs out of memory the conversion fails, so split long recordings first.
Related guide
MP3, OGG, WAV: when to convert or compress audio. The guide measures the signal-to-noise ratio of a decode-and-re-encode chain and shows an MP3 to Ogg round costing 0.2 to 2 dB on two test tracks.