Convert MP3 to FLAC — Free Online Tool
Convert MP3 files to FLAC using the native FLAC codec — entirely in your browser, with no uploads required. While FLAC's lossless encoding cannot restore audio data discarded during the original MP3 compression, it preserves every bit of the decoded audio and repackages it in an archival-quality container with superior metadata support.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MP3 file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
When you convert an MP3 to FLAC, FFmpeg first decodes the MP3's lossy libmp3lame-compressed audio into raw PCM (uncompressed audio samples). It then re-encodes that raw audio using the FLAC codec, which applies lossless compression — meaning the decoded audio is stored perfectly without any further quality degradation. Because MP3 is a lossy format, the original audio quality ceiling was set when the MP3 was first encoded; FLAC faithfully preserves that decoded result, but cannot recover frequencies or detail that MP3 discarded. The output file is typically larger than the source MP3, since FLAC trades smaller file size for perfect fidelity to whatever audio data the MP3 contained.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool, which handles all decoding, encoding, and format conversion. In the browser version, this runs via FFmpeg.wasm compiled to WebAssembly, so no software installation is needed. |
-i input.mp3
|
Specifies the input file — in this case, an MP3 file encoded with the MPEG Audio Layer III codec. FFmpeg will decode the lossy MP3 bitstream into raw PCM audio samples as the first step of the conversion. |
-c:a flac
|
Sets the audio codec for the output to FLAC (Free Lossless Audio Codec). This tells FFmpeg to take the decoded PCM audio from the MP3 and re-encode it using lossless FLAC compression, producing a file with no further audio quality loss beyond what the original MP3 encoding introduced. |
-compression_level 5
|
Sets FLAC's internal compression effort to level 5, the format's standard default on a scale of 0–8. This controls only the file size and encoding speed — the decoded audio output is bit-identical regardless of which level is chosen, so this setting never affects listening quality. |
output.flac
|
Defines the output filename and, through its .flac extension, confirms to FFmpeg that the file should be wrapped in the FLAC container format. FLAC is both the codec and the container, so the extension and the -c:a flac flag work in concert to produce a valid, self-contained FLAC audio file. |
Common Use Cases
- Archiving a music collection ripped from CDs that was originally stored as MP3s — FLAC prevents any further generational quality loss if the files need to be re-encoded later for different devices.
- Preparing audio tracks for professional editing or mastering in a DAW, where working with a lossless intermediate avoids introducing additional compression artifacts from repeated MP3 re-encoding.
- Uploading music to platforms like Bandcamp or streaming services that require or strongly prefer lossless FLAC submissions over lossy MP3s.
- Building a local hi-fi audio library for use with audiophile players like foobar2000 or hardware streamers (e.g., Volumio, Roon) that prioritize FLAC for bit-perfect playback.
- Standardizing a mixed audio library into a single lossless format so that metadata tagging tools and music managers treat all files consistently using FLAC's Vorbis comment tag standard.
- Creating a lossless working copy of a podcast or voiceover recording originally delivered as an MP3, so future edits or noise-reduction passes don't stack additional lossy compression artifacts.
Frequently Asked Questions
No — converting from MP3 to FLAC does not restore quality that was lost when the MP3 was originally encoded. MP3 is a lossy format that permanently discards audio data (particularly high frequencies and subtle details) to achieve small file sizes. FLAC is lossless, meaning it will preserve the decoded MP3 audio with zero further degradation, but it cannot invent or recover what was already discarded. Think of it as making a perfect copy of an imperfect original.
MP3 achieves small file sizes through lossy perceptual compression, which throws away audio data the human ear is deemed unlikely to notice. FLAC uses lossless compression, which must store every audio sample intact, resulting in files that are typically 3–5 times larger than an equivalent-duration MP3 at 128k bitrate. The FLAC file size depends on the complexity of the audio content, not the original MP3 bitrate, since FLAC encodes the fully decoded PCM data.
FFmpeg will attempt to carry over metadata from the MP3's ID3 tags into the FLAC file, but FLAC uses a different metadata system called Vorbis comments. Common fields like title, artist, album, and track number map cleanly between the two formats. However, some MP3-specific ID3 fields or embedded album art may transfer imperfectly depending on how the original tags were structured, so it's worth verifying metadata in a tool like MusicBrainz Picard or beets after conversion.
The -compression_level flag controls how hard the FLAC encoder works to shrink the file, on a scale from 0 (fastest, largest) to 8 (slowest, smallest). Critically, it is purely a space-versus-speed tradeoff — the decoded audio output is bit-identical at every compression level. Level 5 is the FLAC standard's default and offers a good balance for most use cases. You'd only want to use level 8 if storage is at a premium and you don't mind longer encoding times, or level 0 if you need near-instant conversion for many large files.
The displayed command converts a single file, but you can batch process an entire directory in a shell with a one-liner. On Linux or macOS, run: for f in *.mp3; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.mp3}.flac"; done. On Windows PowerShell, use: Get-ChildItem *.mp3 | ForEach-Object { ffmpeg -i $_.FullName -c:a flac -compression_level 5 ($_.BaseName + '.flac') }. This is especially useful for the local FFmpeg command when your files exceed the 1GB browser limit.
Yes — you can add audio resampling flags to the FFmpeg command to change sample rate or bit depth during conversion. For example, to upsample to 24-bit / 96kHz (common for hi-res audio workflows), you would add -ar 96000 -sample_fmt s32 to the command before the output filename. However, upsampling an MP3 does not add real audio detail — it simply stretches the decoded data into a larger container. This is only useful if your downstream software or hardware requires a specific sample rate or bit depth.
Technical Notes
MP3 to FLAC conversion involves a full decode-and-reencode cycle rather than a simple container remux, because MP3 and FLAC use fundamentally different compression schemes that share no common intermediate representation. The libmp3lame decoder in FFmpeg reconstructs the PCM audio from the MP3 bitstream, and the FLAC encoder then applies its LPC-based lossless compression to that PCM data. The resulting FLAC file inherits the audio characteristics of the source MP3 — including any aliasing, pre-echo, or frequency rolloff introduced during the original MP3 encode — so a FLAC made from a 128k MP3 is audibly equivalent to the MP3, just stored in a lossless container. FLAC supports up to 32-bit depth and 655,350 Hz sample rate natively, but the output will match the MP3's decoded PCM parameters (typically 16-bit, 44,100 Hz for most music). One genuine benefit of the conversion is long-term archival stability: FLAC is an open, patent-free format with guaranteed bit-perfect decoding, whereas MP3 decoders can occasionally differ in how they handle edge cases in the bitstream. FLAC's Vorbis comment metadata system also supports arbitrary tags and embedded ReplayGain values, giving you more flexibility for library management than ID3.