devkult_
tools29converters34
home/mime/.flac

.flac MIME type

FLAC audioaudio

audio/flac

Lossless compressed audio, supported by current browsers.

MIME typeaudio/flac
Extensions.flac
Also seen asaudio/x-flac
Content-Typeaudio/flac
Compress in transit?No — already compressed
File signature66 4C 61 43 (fLaC)

Good to know

  • Roughly half the size of WAV with identical audio.

Serve .flac files with the right type

The response header to send:

Content-Type: audio/flac

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

nginx (inside the types block in mime.types)
audio/flac flac;
Apache (.htaccess or server config)
AddType audio/flac .flac
Express
res.set("Content-Type", "audio/flac");
Python
import mimetypes

mimetypes.add_type("audio/flac", ".flac")
HTML file input
<input type="file" accept=".flac,audio/flac">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.flac | grep -i '^content-type:'
file --mime-type file.flac

Frequently asked questions

What is the MIME type for .flac files?

audio/flac. You may also see audio/x-flac, but audio/flac is the one to send.

What Content-Type header should a .flac file be served with?

Content-Type: audio/flac. It's already compressed, so servers shouldn't gzip it.

How can I tell if a file is really a .flac?

Check its bytes rather than the extension: FLAC files start with 66 4C 61 43 (fLaC). On the command line, file --mime-type name.flac does this for you.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options