Convert ALAC to WEBA — Free Online Tool

Convert ALAC lossless audio files (.m4a) to WEBA format using the Opus codec — ideal for shrinking large Apple lossless archives into efficient, web-optimized audio. The conversion transcodes your Apple Lossless audio into an Opus stream inside a WebM container, trading lossless fidelity for dramatically smaller file sizes suited to browser playback and web delivery.

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

ALAC stores audio as lossless PCM data compressed without any quality loss inside an MPEG-4 container, meaning the source file faithfully represents every sample of the original recording. During conversion, FFmpeg decodes the ALAC stream back to raw PCM, then re-encodes it using the libopus encoder at 128k bitrate, wrapping the result in a WebM container with the .weba extension. This is a full transcode — not a remux — because ALAC and Opus are fundamentally different codecs: one lossless, one lossy. The Opus codec is perceptually optimized and performs exceptionally well at moderate bitrates, but the conversion is a one-way lossy step; you cannot recover the original lossless audio from the resulting WEBA file.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg command-line tool. In this browser tool, FFmpeg runs entirely via WebAssembly (FFmpeg.wasm) inside your browser — no server is involved. The same binary command can be run on your local machine if you have FFmpeg installed.
-i input.m4a Specifies the input file — an ALAC audio file in the MPEG-4 container with the .m4a extension. FFmpeg will detect the ALAC codec automatically from the container metadata.
-c:a libopus Sets the audio encoder to libopus, which encodes the decoded ALAC PCM audio into the Opus format. Opus is the default and preferred codec for the WEBA/WebM container and is optimized for web streaming and browser playback.
-b:a 128k Sets the Opus audio bitrate to 128 kilobits per second. This is the default quality setting for this tool and provides a good balance between file size and audio fidelity for most music content when transcoding from a lossless ALAC source.
-vn Disables any video stream in the output. Although ALAC .m4a files are audio-only, this flag is included as a safeguard to ensure no video or cover art stream from the MPEG-4 container is accidentally written into the WEBA output, which is a pure audio format.
output.weba Specifies the output filename with the .weba extension. FFmpeg uses this extension to automatically select the WebM container format configured for audio-only output, resulting in a file ready for use in HTML5 web audio players and web applications.

Common Use Cases

  • Publishing music previews or samples on a website from your Apple lossless music library, where full lossless quality is unnecessary and file size matters for page load speed
  • Converting ALAC rips of CDs stored in iTunes or Apple Music into a web-compatible format for use in an HTML5 audio player using the native <audio> element
  • Reducing the storage footprint of ALAC podcast masters or voice recordings before hosting them on a web server or streaming platform that serves browser-based players
  • Preparing audio assets from an Apple ecosystem production workflow for use in a web application or Progressive Web App where Opus in WebM is the preferred modern codec
  • Sending large ALAC music files to collaborators or clients via a web interface where bandwidth is limited and browser playback compatibility is required without installing external plugins
  • Archiving ALAC files with a smaller web-delivery copy alongside the lossless original, using the WEBA version for streaming previews while keeping the .m4a for offline archival

Frequently Asked Questions

Yes, some quality is lost because Opus is a lossy codec, but at 128k bitrate Opus is widely considered transparent or near-transparent for most music and voice content — meaning most listeners cannot distinguish it from the original in a blind test. ALAC is a perfect replica of the source PCM audio, so the WEBA file will technically have less information, but Opus at 128k is one of the most efficient modern audio codecs and outperforms MP3 or AAC at the same bitrate. If your use case requires a higher quality web copy, you can increase the bitrate using the -b:a flag.
Metadata handling differs significantly between the two formats. ALAC in an MPEG-4 container stores rich iTunes-style metadata tags (ID3-like atoms) including embedded album art. The WebM/WEBA container supports a different, more limited tagging scheme, and FFmpeg will attempt to map common tags like title, artist, and album across during conversion. However, embedded album artwork is typically not carried over into WEBA, and some Apple-specific metadata fields may be dropped. If metadata preservation is critical, verify the output tags with a tool like MediaInfo after conversion.
Safari on macOS and iOS has historically had limited or no support for the WebM container and Opus codec, which are the foundations of the WEBA format. As of recent macOS and iOS versions, Safari has gained some WebM/Opus support, but compatibility is not as universal as AAC or MP3 in an MPEG-4 container. WEBA files are best suited for web applications targeting Chrome, Firefox, or Edge. If your audience is heavily Apple-device-based, consider converting to Opus in an OGG container or using AAC instead for broader Safari compatibility.
ALAC is lossless compression, meaning it preserves every audio sample from the original recording — a typical ALAC file for a 4-minute song might be 20–30 MB. Opus at 128k is a lossy codec that discards audio information the human ear is less sensitive to, resulting in files closer to 3–5 MB for the same track. The size reduction ratio is typically 5x to 10x depending on the audio content, which is the fundamental tradeoff of this conversion: much smaller files suitable for web delivery, at the cost of the bit-perfect accuracy ALAC provides.
Replace the 128k value in the -b:a 128k flag with your desired bitrate. For example, use -b:a 192k or -b:a 256k for higher quality closer to the ALAC source, or -b:a 96k for smaller files where audio fidelity is less critical, such as voice recordings or podcasts. Opus is efficient enough that 96k is often sufficient for voice content, while 192k or higher is recommended if you want the WEBA output to be as faithful as possible to the original lossless ALAC audio. The full adjusted command would look like: ffmpeg -i input.m4a -c:a libopus -b:a 192k -vn output.weba
Yes, the displayed FFmpeg command works for a single file, but you can wrap it in a shell loop to process an entire directory. On Linux or macOS, use: for f in *.m4a; do ffmpeg -i "$f" -c:a libopus -b:a 128k -vn "${f%.m4a}.weba"; done. On Windows PowerShell, use: Get-ChildItem *.m4a | ForEach-Object { ffmpeg -i $_.FullName -c:a libopus -b:a 128k -vn ($_.BaseName + '.weba') }. This is particularly useful for converting large Apple Music or iTunes ALAC libraries to web-friendly Opus audio in bulk.

Technical Notes

ALAC (.m4a) files use Apple's lossless codec stored in an MPEG-4 container — the same container format used for AAC audio and MP4 video. Because ALAC is bit-perfect, these files can be quite large, often comparable in size to uncompressed WAV or AIFF audio. The WEBA format is an audio-only WebM container (a subset of the Matroska format) and almost always contains Opus-encoded audio, which is what this tool produces via libopus. Opus is a royalty-free codec standardized by the IETF (RFC 6716) and is specifically designed for internet streaming with low latency characteristics — properties that ALAC was never intended to support. One important limitation: ALAC supports chapter markers within its MPEG-4 container, but the WebM/WEBA format does not support chapters, so any chapter data in the source file will be silently discarded. Additionally, ALAC files sometimes carry multiple metadata atom types specific to Apple's ecosystem; these will not map cleanly to WebM's Vorbis comment-style tagging. For users converting large files (over 1GB), this browser-based tool may hit memory constraints; the displayed FFmpeg command is provided precisely for those cases, allowing local desktop processing with the same conversion parameters.

Related Tools