Free FLAC test files and sample generator
The Free Lossless Audio Codec, used for archival and hi-fi. Generate valid .flac sample files to test audio players, converters, taggers and upload handling.
What is a .flac file?
FLAC: Free Lossless Audio Codec. FLAC is lossless compressed audio: smaller than WAV with bit-perfect reconstruction, which is why it is the archival and hi-fi standard. Every frame carries checksums that a decoder verifies, so corruption is detected rather than played.
Why generate a test FLAC file?
- Test lossless audio intake, tagging or transcoding.
- Verify checksum validation catches corrupted frames.
- Check metadata handling in a music library.
What you can put inside a .flac file
You get 4 content options for FLAC, so the file holds something meaningful rather than random padding: Silence, Tone (beep), Noise, Voice (synthetic). For FLAC these are alternatives, so choose the one that matches what you need to test.
How a .flac file is identified
Every .flac file begins with 66 4C 61 43, "fLaC". That is what a validator inspecting content rather than the file name looks for.
How the size lands on the exact byte
FLAC defines a PADDING metadata block for exactly this purpose, so the padding is a documented part of the file rather than a trick.
Negative testing with broken FLAC files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed, so the
66 4C 61 43identifying a .flac is gone. Same length as the valid file. - Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.
Sample FLAC content
[FLAC], "fLaC" magic + STREAMINFO metadata + frames with CRC-8/CRC-16 checksums.
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Play in VLC or foobar2000; verify integrity with `flac -t file.flac`.
Media type audio/flac · extension .flac · category Audio
Generate a .flac file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about FLAC files
What identifies a .flac file?
A .flac file begins with the bytes 66 4C 61 43, "fLaC". Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.
How can a .flac file be an exact number of bytes?
FLAC defines a PADDING metadata block for exactly this purpose, so the padding is a documented part of the file rather than a trick.
What can go inside the FLAC file?
There are 4 content options for .flac: Silence, Tone (beep), Noise, Voice (synthetic). For FLAC these are alternatives, so pick the one matching what you need to test.
Can I download several broken FLAC files at once?
Yes, select more than one File Condition and you get one ZIP containing a .flac per condition, each named after its condition.
Can the FLAC file use UTF-16 or a byte-order mark?
No, and deliberately. A .flac file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.
How do I open or verify the FLAC file?
Play in VLC or foobar2000; verify integrity with flac -t file.flac.