Convert MP3 to WEBA — Free Online Tool

Convert MP3 files to WEBA format, re-encoding the audio from MPEG Layer III (libmp3lame) to the modern Opus codec (libopus) inside a WebM container. WEBA with Opus delivers superior audio quality at equivalent or lower bitrates compared to MP3, making it ideal for web applications and browser-based audio playback.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

MP3 stores audio using the MPEG Layer III compression algorithm via the libmp3lame codec. Since WEBA uses a completely different audio codec — Opus (libopus) — this conversion cannot simply remux the stream; it must fully decode the MP3 audio and re-encode it into Opus. This is a lossy-to-lossy transcode, meaning the audio goes through two generations of compression. The Opus encoder is then wrapped in a WebM container with the .weba extension, and the -vn flag is applied to explicitly suppress any video stream (though MP3 contains none). The result is a file optimized for streaming and low-latency web playback, leveraging Opus's superior compression efficiency over MP3.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles the decoding of the input MP3 and re-encoding to Opus for the WEBA output.
-i input.mp3 Specifies the input file, an MP3 audio file encoded with the MPEG Layer III (libmp3lame) codec. FFmpeg will fully decode this audio stream before re-encoding it to Opus.
-c:a libopus Sets the audio codec for the output to libopus, the Opus encoder. This is the default and recommended codec for WEBA files, offering better compression efficiency than the MP3 codec used in the source file.
-b:a 128k Targets an audio bitrate of 128 kilobits per second for the Opus output stream. At this bitrate, Opus typically achieves perceptual quality comparable to or better than a 128k MP3, making it a reasonable default for general-purpose audio.
-vn Disables any video stream in the output. This is important because some MP3 files embed album art as an attached picture that FFmpeg may interpret as a video stream — -vn ensures the WEBA output contains only the Opus audio track.
output.weba Specifies the output filename with the .weba extension, which signals to FFmpeg to use the WebM container muxer and tells browsers and web servers that this is an audio-only WebM file containing Opus audio.

Common Use Cases

  • Preparing audio assets for a web application or Progressive Web App (PWA) where Opus/WEBA is preferred over MP3 for its better compression at the same bitrate
  • Reducing the file size of MP3 podcast segments for web streaming by re-encoding to Opus, which can match MP3 quality at roughly half the bitrate
  • Supplying a WEBA audio source as a fallback or primary format in an HTML5 <audio> element targeting Chromium-based browsers and Firefox, both of which natively support Opus in WebM
  • Converting a library of MP3 music files to WEBA for use in a browser-based audio player or game engine that leverages the Web Audio API
  • Archiving voice recordings or spoken-word MP3s in WEBA format, where Opus's efficiency at low bitrates (e.g., 64k) significantly outperforms MP3 for speech content
  • Preparing audio for a WebRTC-based application where Opus is the native codec and file compatibility with the browser pipeline is important

Frequently Asked Questions

Because both MP3 and Opus are lossy codecs, converting between them introduces a second generation of compression artifacts. In practice, at 128k the quality difference is subtle for most listeners, but it is not lossless. Opus is actually a more efficient codec than MP3 — it can achieve comparable perceived quality at lower bitrates — but starting from an already-compressed MP3 source means some of the original quality was already discarded before the WEBA encode begins. If audio fidelity is critical, always convert from the highest-quality source available.
No — ID3 tags are specific to the MP3 container format and are not carried over to WEBA/WebM. The WebM container uses its own metadata scheme, and FFmpeg does not automatically map ID3 fields like artist, album, or track title during this transcode. If you need to preserve metadata, you would need to add extra FFmpeg flags (such as -map_metadata 0) and verify that the specific tag fields are supported by the WebM muxer.
The -vn flag explicitly tells FFmpeg to exclude any video stream from the output. While MP3 files don't contain video, some MP3s embed album artwork as an attached picture stream, which FFmpeg may detect as a video stream. Including -vn ensures the WEBA output remains a pure audio file and prevents FFmpeg from attempting to mux an image into the WebM container, which could cause errors or unexpected behavior.
Replace the value after -b:a in the command to adjust the Opus bitrate. For example, use -b:a 64k for a smaller file that works well for speech and podcasts, or -b:a 192k for higher-fidelity music. Opus is especially efficient at low bitrates — 64k Opus often sounds better than 128k MP3 for voice content. The command would look like: ffmpeg -i input.mp3 -c:a libopus -b:a 64k -vn output.weba.
Yes — WEBA supports both Opus and Vorbis audio codecs. To use Vorbis instead, change -c:a libopus to -c:a libvorbis in the command. Vorbis is an older codec and generally less efficient than Opus at most bitrates, but it has broader compatibility with legacy software and certain WebM players. Opus is the recommended default for new projects targeting modern browsers.
WEBA with the Opus codec is natively supported in Firefox, Chrome, Edge, and Opera. Safari added Opus-in-WebM support starting with Safari 16.4 (released 2023), so modern Safari versions should handle it as well. Internet Explorer has no WebM support at all. If you need broad legacy compatibility, keeping an MP3 version alongside WEBA and using the HTML5 <audio> source element to offer both formats is a common approach.

Technical Notes

This conversion transcodes audio from the MPEG Layer III codec (libmp3lame, as used in .mp3 files) to the Opus codec (libopus) wrapped in a WebM container with a .weba file extension. Opus is a modern, royalty-free codec standardized by the IETF (RFC 6716) and is built on SILK (optimized for speech) and CELT (optimized for music) technologies, giving it a significant efficiency advantage over the aging MP3 standard. Because this is a lossy-to-lossy pipeline, some generational quality loss is inherent — the recommendation is always to source from the highest-quality original available. The default bitrate of 128k with Opus typically sounds equal to or better than 128k MP3. FFmpeg's libopus implementation targets the specified bitrate in variable bitrate (VBR) mode by default, which improves perceptual quality distribution across complex and simple audio segments. Notably, MP3 files do not support chapters or multiple audio tracks, and neither does WEBA, so no data of that kind is lost. The .weba file extension is a convention used by browsers and web servers to signal an audio-only WebM file; the underlying container is identical to .webm. Ensure your web server is configured to serve .weba files with the MIME type audio/webm for correct browser handling.

Related Tools