Convert WebM to OGG

Converting WebM to OGG moves the audio into the container that game engines, wikis and open-format toolchains accept. Both formats are Xiph and Google territory and the codec is the same on both sides — the WebM held Opus and the Ogg holds Opus — so this is a container change with a small, honest cost attached, described below. It runs in your browser.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy Some detail is traded for size. OGG cannot hold everything a WebM can.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing Every soundtrack the browser can decode comes across, so a film with a second language or a commentary keeps both. A track in AC-3, E-AC-3, DTS or TrueHD is dropped without a warning.

Up to 100 files at once. Mixed formats are fine.

The one pair here where the codec does not change

Every other audio conversion from a WebM swaps one codec for another: Opus becomes MP3, or AAC, or PCM. This one does not. The Ogg written here carries Opus, and the WebM it came from almost certainly carried Opus too, because that is what browsers record and what WebM was designed around. Two containers, one codec, both from the same royalty-free lineage.

That makes this conversion conceptually the cheapest in the bundle and practically the one with the most interesting caveat, which the next section is about. It also makes it the conversion least likely to be about compatibility with consumer hardware and most likely to be about a rule: an engine that loads `.ogg`, a wiki that accepts only free formats, a build script with a fixed extension.

Why the audio is re-encoded when it did not need to be

In principle, moving Opus from a WebM into an Ogg is a rewrap: read the compressed frames out of one container, write them into the other, touch none of them. It takes about as long as copying the file and loses precisely nothing.

That is not what happens here. This tool asks its encoder for a quality band on every lossy target, and requesting a bitrate is exactly what disqualifies the direct packet copy the underlying library supports. So the audio is decoded to samples and compressed again — a real second generation. For a voice note or a recorded talk this is inaudible. For a music asset that will be layered and looped in a game, it is worth knowing that `ffmpeg -i input.webm -c copy output.ogg` does the same job losslessly in a second.

Ogg Vorbis and Ogg Opus are not the same file

The Ogg container has held three different audio codecs over its life: Vorbis from 2000, FLAC, and Opus since 2012. All three use the `.ogg` extension, and nothing in the name distinguishes them. This is the single most common way an Ogg conversion disappoints someone.

A great deal of software written before about 2015 reads `.ogg` and assumes Vorbis. Older game engines, some middleware, a few asset importers and a long tail of embedded players will open a file, find Opus and fail with an error that mentions neither. If your target is one of those, what you need is Ogg Vorbis specifically, and the tool for that is `oggenc` or your engine’s own importer rather than a browser.

Where an Ogg file is the required answer

Godot loads `.ogg` natively and it is the conventional format for music and long ambience in Godot projects. Unity accepts it. Wikimedia Commons and a number of open archives accept Ogg and Opus and refuse patent-encumbered formats outright, which makes this the only route for contributing a recording there. Linux desktop tooling has assumed Ogg for two decades.

What those cases share is that the format was chosen by a policy rather than by a device. Nobody picks Ogg because their car stereo wants it — car stereos do not. That is why the reader of this page is different from the reader of the MP3 or M4A pages, who is solving a playback problem rather than satisfying a specification.

Opus is genuinely the better codec, and that is why it is here

Opus was published by Xiph.Org in 2012 as RFC 6716, and it is the strongest general-purpose audio codec in common use. It beats Vorbis and MP3 at every bitrate that matters, degrades gracefully rather than falling apart at low rates, and handles speech at bitrates where the older codecs are unusable. Every browser supports it because WebRTC made it mandatory.

That combination — best-in-class and royalty-free — is exactly why WebM uses it and why the open-format world adopted it. If your toolchain is modern enough to take Opus, take Opus. The only reason to prefer Vorbis is a piece of software that predates the choice.

What an Ogg file will not do for you

Support outside the open ecosystem is thin. iOS handles Ogg poorly, most car head units and hi-fi streamers do not read it, and until recently Safari did not either — the registry classes browser support as modern rather than universal for that reason. It is not a format to send to somebody.

It also inherits the usual limits of this conversion: any video track in the WebM is discarded, only the first audio track survives, and no tags are carried across. For a game asset none of those matter. For a recording you intend to share, MP3 remains the format nobody has to think about.

The extension: .ogg, .oga and .opus all mean something

Xiph publishes guidance on this and almost nobody follows it, which is why the situation is confusing. `.ogg` was originally meant for Ogg Vorbis specifically; `.oga` is the general-purpose extension for audio in an Ogg container whatever the codec; `.opus` is the recommended extension for Ogg holding Opus. In practice `.ogg` is used for all three and everything reads it.

It matters when a tool decides what to expect from the name alone. An importer that sees `.ogg` and reaches for a Vorbis decoder will fail on an Opus file with an error that mentions neither, while the same file renamed `.opus` may be handled correctly. If a target rejects the file without explaining why, changing the extension is a ten-second experiment worth running before assuming the conversion is at fault.

Converting a project’s worth of audio locally

Asset conversion is rarely a single file. Up to a hundred WebM recordings can be dropped in one pass, each converting independently, with the finished Ogg files downloading together as a ZIP. Nothing is queued, and the only other cap is 100 MB a file.

Because the work happens on your machine there is no service sitting in the middle of a build. That matters for a project rather than a one-off: a converter that uploads is a dependency with an uptime, a rate limit and a privacy policy, and none of those belong in an asset pipeline you have to be able to run offline.

The recording stays where it was made

The Opus is decoded and re-encoded inside the tab using codecs the browser already ships. Nothing carrying the audio is sent anywhere, there is no account, and there is no upload to wait for even on a large file.

For this audience that is usually a practical point rather than a privacy one, but the privacy point holds anyway: unreleased game audio and unpublished recordings are exactly the material that should not pass through a free web service on the way to a folder on the same disk it started on.

How to convert WebM audio into an Ogg file

  1. Drop your WebM onto this page, or click to choose one.
  2. The Opus audio is decoded and re-encoded into an Ogg container in your browser.
  3. Download the Ogg file and drop it into your project.

WebM and OGG: the same Opus in two different wrappers

WebM compared with OGG
WebMOGG
Full nameWebM VideoOgg Audio
File extension.webm.ogg, .oga
Media typevideo/webmaudio/ogg
CompressionLossy — file size is bought with qualityLossy — file size is bought with quality
First published20102000
Published byGoogleXiph.Org
SpecificationRFC 3533
LicensingOpen standardOpen standard
Standing todayCurrentCurrent
Opens in a browserEvery browserCurrent browsers
Considered insteadMP4, MKVMP3, AAC, OPUS

Opening the result

Current browsers read OGG; older ones do not. It is the less portable of the two, so it is worth being sure the program at the other end accepts it before sending one.

OGG is a container rather than a single format. What actually plays is the codec inside it — usually Vorbis, Opus and FLAC — which is why two files with the same extension can behave differently on the same device.

VLC reads both WebM and OGG, so there is a way to check the result against the original without a second tool.

What each format is for

OGG comes from Xiph.Org and dates from 2000, specified as RFC 3533. Audacity, VLC and foobar2000 all read it.

WebM to OGG: Vorbis, Opus and where each is accepted

Is this Ogg Vorbis or Ogg Opus?

Opus. The Ogg container can hold Vorbis, Opus or FLAC, and what is written here is Opus — which is also what was already inside the WebM. If a tool of yours expects Vorbis specifically, an .ogg holding Opus will fail in it, and that is the single most common surprise with this conversion.

If the codec is the same, why is the audio re-encoded?

Because this tool asks its encoder for a bitrate on every lossy target, and that request disqualifies the direct packet copy the underlying library is capable of. The result is a genuine decode and re-encode rather than a rewrap, which costs a small amount of quality. For speech it is inaudible; for a music asset it is a reason to know about the alternative below.

What does the lossless alternative look like?

`ffmpeg -i input.webm -c copy output.ogg` moves the Opus frames from one container to the other without touching them. It takes about as long as copying the file and loses nothing at all. If you have FFmpeg to hand and the audio is a master rather than a delivery copy, that is the better route.

Will browsers play the result?

Current ones will. Ogg support is good in Firefox and Chrome and has been added to Safari relatively recently, which is why the registry describes it as modern rather than universal. For a web page that has to work everywhere, MP3 or AAC remains the safer audio target.

Is the file uploaded?

No. The decode and the Opus encode both run in your browser. For a game project or a wiki contribution that also means no service in the middle of your asset pipeline and no per-day limit on how many files you convert.

Is any picture in the WebM kept?

No. The video track is discarded and only the first audio track is written. That is usually what is wanted here — an .ogg is an audio asset — but it means a screen recording converted this way keeps the narration and nothing else.

More about these formats