Testing

WebCodecs: Browser Support, Features, Use Cases

WebCodecs works in Chrome 94+, Edge 94+, Firefox 130+, Opera 80+, Samsung Internet 17+, and Safari 26.0+. Learn the API, codecs, and quirks.

Author

Prince Dewani

May 1, 2026

WebCodecs is a W3C JavaScript API that gives web pages low-level access to the browser's audio and video encoders and decoders. It works in Chrome 94+, Edge 94+, Opera 80+, Firefox 130+ on desktop, Samsung Internet 17+, and Safari 26.0+, while Safari 16.4 through 18.7 supported only video and Internet Explorer never added it.

This guide covers what WebCodecs is, which browsers support it, its key features, common use cases, how to detect support, and known issues.

What is WebCodecs?

WebCodecs is a W3C JavaScript API that exposes the browser's built-in audio and video codecs to web pages through five main classes: VideoEncoder, VideoDecoder, AudioEncoder, AudioDecoder, and ImageDecoder. The Media Working Group at the W3C edits the spec, and the API hands raw frames and chunks to the page without dictating any codec list.

Which browsers does WebCodecs support?

WebCodecs is fully supported in Chrome 94+, Edge 94+, Firefox 130+ on desktop, Opera 80+, Samsung Internet 17+, and Safari 26.0+ on macOS, iOS, and iPadOS. Safari 16.4 through 18.7 ships only the video interfaces, and Internet Explorer never added support.

Loading browser compatibility data...

WebCodecs compatibility in Chrome

Chrome supports the full WebCodecs API from Chrome 94 on Windows, macOS, Linux, and ChromeOS. Chrome for Android shipped full support from Chrome 147. Chrome 4 through 93 did not support WebCodecs at all. Hardware acceleration kicks in automatically when the system codec is GPU-backed, and the browser falls back to a software decoder otherwise.

WebCodecs compatibility in Edge

Microsoft Edge supports the full WebCodecs API from Edge 94 on Windows, macOS, and Linux, since Edge tracks the Chromium engine. Pre-Chromium EdgeHTML versions 12 through 93 never added WebCodecs. Edge for Android also exposes the API, since the mobile build tracks Chromium for Android.

WebCodecs compatibility in Firefox

Firefox supports the full WebCodecs API from Firefox 130 on Windows, macOS, and Linux desktop. Firefox 2 through 129 did not support WebCodecs. Firefox for Android does not support the API in any version, so WebCodecs is desktop-only on Mozilla browsers. Some Linux configurations need the media.ffvpx.enabled flag in about:config for hardware codec paths.

WebCodecs compatibility in Safari

Safari ships full WebCodecs support from Safari 26.0 on macOS, iOS, and iPadOS. Safari 16.4 through 18.7 added a partial implementation with only the video interfaces (VideoDecoder, VideoEncoder, EncodedVideoChunk, and VideoFrame) and no audio or image classes. Safari 3.1 through 16.3 did not support WebCodecs at all, so iPhone and iPad users on those builds need a fallback path.

WebCodecs compatibility in Opera

Opera supports the full WebCodecs API from Opera 80 on Windows, macOS, and Linux, in line with the matching Chromium release. Opera 9 through 79 did not support WebCodecs. Opera Mini does not expose WebCodecs in any version, since the proxy mode strips most modern web platform APIs before pages reach the device.

WebCodecs compatibility in Samsung Internet

Samsung Internet supports the full WebCodecs API from Samsung Internet 17.0 on Galaxy phones and tablets, since the browser tracks Chromium. Samsung Internet 4.0 through 16.0 did not support WebCodecs. The API is on by default, so Galaxy users do not need to flip a setting in the Samsung Internet app.

WebCodecs compatibility in Android Browser

Chrome for Android supports the full WebCodecs API from Chrome 147. Earlier Chrome for Android builds and the legacy stock Android Browser based on WebView 2.x through 4.x did not support WebCodecs. Firefox for Android does not support the API, so a Chromium-based browser is required for any WebCodecs work on Android.

WebCodecs compatibility in Internet Explorer

Internet Explorer never shipped WebCodecs in any version. The API depends on Chromium media plumbing that the Trident engine never had. Microsoft has retired Internet Explorer 11, so any IE-targeted apps that need codec access have to migrate to Chromium-based Edge or use a WebAssembly fallback like FFmpeg.wasm.

Note

Note: WebCodecs breaks across Safari 16.4 to 18.7 and Firefox for Android. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of WebCodecs?

WebCodecs ships a small set of low-level primitives instead of a high-level player. The features below are the ones developers actually pull in when building media tools.

  • VideoEncoder and VideoDecoder: Encode and decode raw frames against codecs the browser already ships, including H.264, H.265, AV1, VP8, and VP9. Each call takes a configure() codec string and returns frames or chunks asynchronously.
  • AudioEncoder and AudioDecoder: Encode and decode raw PCM samples and codec-specific chunks for AAC, Opus, FLAC, and others. The encoders run off the main thread inside a Web Worker.
  • ImageDecoder: Decodes still and animated images (GIF, PNG, JPEG, WebP, AVIF) into VideoFrame objects, with track selection for animated formats.
  • Hardware-accelerated codecs: Uses the OS GPU media stack when available, so video playback and encoding skip the CPU. Software fallback is automatic when the GPU codec is missing.
  • Asynchronous queue model: Encoders and decoders maintain an internal processing queue. configure(), encode(), decode(), and flush() append to the queue, while reset() and close() purge it.
  • Web Worker friendly: Every WebCodecs class is transferable across postMessage, so video frames move between workers without a copy.
  • VideoFrame and AudioData: Pass raw, uncompressed media as transferable objects you can paint to a canvas, send to WebGL, or feed into the Insertable Streams API.
  • Codec configuration probing: isConfigSupported() asks the browser whether a codec string and parameter set will work before you commit to a decoder, so you can pick a fallback at runtime.

What are the use cases of WebCodecs?

WebCodecs powers media work that used to require Flash, native apps, or huge WebAssembly bundles. Several production apps already lean on it.

  • In-browser video editors: Tools like Clipchamp, CapCut Web, and Veed.io use WebCodecs to seek, trim, and export video without uploading every clip to a server.
  • Real-time video conferencing: Google Meet, Zoom Web, and the Discord browser app use WebCodecs to fan out one camera frame to multiple encoders for simulcast, instead of relying on a single WebRTC encoder.
  • Live streaming and low-latency playback: YouTube, Twitch, and several cloud-gaming sites use WebCodecs to decode WebTransport or WebRTC datagram streams below the WebRTC default jitter buffer.
  • Camera capture and recording: Webcam apps, screen recorders, and short-form video tools encode VideoFrame objects from getUserMedia or getDisplayMedia into MP4 or WebM in the browser.
  • AI and ML video pipelines: Computer vision demos pull individual VideoFrame objects out of a stream, run them through TensorFlow.js or ONNX Runtime Web, and re-encode the result without a server round-trip.
  • GIF and animated AVIF decoders: ImageDecoder unpacks animated formats frame-by-frame, so timeline scrubbing and slow-motion preview run on the original bitstream instead of a pre-rendered MP4.
...

How do you check if a browser supports WebCodecs?

You feature-detect WebCodecs by checking the global VideoDecoder constructor, then ask isConfigSupported() whether the codec you actually need is decodable in this build.

The API only exposes constructors when the page runs in a secure context (HTTPS or localhost). On Safari 16.4 through 18.7, AudioDecoder and ImageDecoder are undefined while VideoDecoder works, so guard each interface separately.

Paste this snippet into the DevTools console of any browser and you will see which interfaces are present and whether the requested codec is decodable.

// Paste this into the DevTools console to see which WebCodecs interfaces and codecs the browser supports.
if ("VideoDecoder" in window) {
  console.log("VideoDecoder is available.");

  const probes = [
    { codec: "avc1.42E01E", label: "H.264 baseline" },
    { codec: "vp09.00.10.08", label: "VP9 profile 0" },
    { codec: "av01.0.04M.08", label: "AV1 main profile" },
    { codec: "hvc1.1.6.L93.B0", label: "HEVC main profile" },
  ];

  Promise.all(
    probes.map(async (p) => {
      const result = await VideoDecoder.isConfigSupported({ codec: p.codec });
      return { ...p, supported: !!result.supported };
    })
  ).then((rows) => console.table(rows));
} else {
  console.log("VideoDecoder is not available in this browser.");
}

console.log("AudioDecoder is", "AudioDecoder" in window ? "available" : "missing");
console.log("ImageDecoder is", "ImageDecoder" in window ? "available" : "missing");

If isConfigSupported returns supported: false, the browser shipped the constructor but the underlying codec is missing, often because of OS-level codec licensing. Fall back to a polyfill or a WebAssembly decoder for those visitors.

What are the known issues with WebCodecs?

WebCodecs gives you raw codec access but skips the parts that make a player work end-to-end, so the painful edges land on container muxing, codec licensing, and the long Safari partial-support window.

  • No container muxing or demuxing: WebCodecs only reads and writes coded chunks. To play an MP4 you still need MP4Box.js, mp4-muxer, or a WebAssembly demuxer to pull EncodedVideoChunk objects out of the file.
  • Safari 16.4 through 18.7 was video-only: AudioDecoder, AudioEncoder, EncodedAudioChunk, and ImageDecoder were all undefined on those Safari versions. Apps that only checked VideoDecoder broke for iPhone audio.
  • No Firefox for Android support: Firefox 130 enabled WebCodecs on desktop only. The Android build still shows VideoDecoder as undefined, so Firefox mobile users need a fallback path.
  • Codec availability varies by OS: Hardware H.265 decoding is on macOS and Windows but missing on most Linux builds without proprietary drivers, and AV1 hardware decode is only on recent Intel, AMD, and Apple silicon. isConfigSupported is the only honest check.
  • No DRM bridge: EncodedVideoChunk is plain bytes, so encrypted streams (Widevine, FairPlay, PlayReady) still need MediaSource Extensions and Encrypted Media Extensions. WebCodecs does not bridge to EME.
  • Hardware encoder bugs leak through: The browser surfaces vendor encoder quirks, like Intel QuickSync dropping B-frames or NVIDIA NVENC hitting per-process session limits. Code that worked on a MacBook can fail on a Windows GPU.
  • Memory pressure from VideoFrame: Forgetting to call frame.close() leaks GPU memory fast. The garbage collector does not free decoded frames until close() runs explicitly, so long sessions need careful lifecycle code.

In my experience, the muxing gap costs more time than the codec work itself. Building a WebCodecs export path that hits all browsers means shipping mp4-muxer for the MP4 case, the WebM Muxer library for VP9 or AV1 in WebM, and a MediaRecorder fallback on Safari 16.4 to 18.7 where AudioEncoder is undefined. Plan two days for the muxer plumbing, not the encode loop.

...

Citations

All WebCodecs version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests