How to Use the Flac Validator: Step-by-Step Tutorial
The Flac Validator runs entirely in your browser โ your audio file is never sent to any server, no account is required, and nothing leaves your machine. This tutorial walks through every step of using the tool: loading a FLAC file, reading each results panel, understanding what the validator checks, and diagnosing the issues it reports.
Follow along with the tool open: Open the Flac Validator in a second tab, then work through each step below.
Open Flac Validator โTable of Contents
Step 1 โ Open the Tool
Navigate to /developer-tools/flac-validator/. The tool loads entirely in the browser โ after the initial page load, validating a file makes zero outbound network requests. You can confirm this in the browser's DevTools Network panel: drop a file and watch the network tab remain idle.
The tool is accessible from the Developer Tools hub, the command palette (press Ctrl+K or โK and type "Flac Validator"), or directly via the URL above.
Step 2 โ Load Your FLAC File
There is one way to load a file: drag and drop. Drag your .flac file from your file manager and drop it anywhere on the drop zone. The drop zone is labeled with a musical note icon and the text prompting you to drop a .flac file. A visual highlight confirms the file is being received.
If you drop a file that is not a FLAC file โ an MP3, AAC, WAV, or any other format โ the tool shows a type error message identifying the actual file extension and explaining why it was rejected. Only .flac files are accepted.
Once a valid file is dropped, validation runs automatically and the results appear within a second for most files. You do not need to click any button.
Removing a file: Once a file is loaded, an โ button appears next to the filename. Click it to clear the file and reset the tool so you can load a different file.
Step 3 โ Read the Status Bar
After validation runs, a status bar appears below the drop zone. It is colour-coded to give you an immediate answer:
- Green โ "Valid FLAC โ no issues found." The file passed all checks: correct magic bytes, valid STREAMINFO, audio parameters within specification, and no structural anomalies detected. If Vorbis comment tags are present, they were also read successfully.
- Yellow โ "Valid FLAC โ N warning(s). See details below." The file is structurally valid but the validator found one or more conditions worth noting โ for example, a missing VORBIS_COMMENT block, or an unusual but technically valid parameter. See the Warnings panel for specifics.
- Red โ error message. The file failed a required check. The status bar shows a concise description of the first fatal error detected. More detail appears in the Error panel below.
Step 4 โ Review the Error Panel
If validation fails, the Error panel appears below the status bar with a red header. It contains a description of what went wrong and typically enough information to diagnose the root cause. Common error messages and what they mean:
"Not a FLAC file โ magic bytes mismatch"
The first four bytes of the file are not 66 4C 61 43 (the ASCII characters fLaC). The file either has the wrong extension, is a different audio format, or was truncated or corrupted before any data was written. Check the actual file type with a hex editor or the file command on Linux/macOS: file yourfile.flac. If it returns something other than "FLAC audio bitstream data", the file is not a FLAC file regardless of its extension.
"STREAMINFO block missing or not first"
The STREAMINFO metadata block was not found at the expected position immediately after the stream marker. Every valid FLAC file must have STREAMINFO as its first metadata block. This error indicates the file's internal structure is malformed โ possibly due to a failed encode, a corrupt container, or a file that was partially written and never completed. The file is not recoverable without re-encoding from the source.
"STREAMINFO block too short"
The STREAMINFO block declares a length, but the actual bytes available are fewer than expected. This indicates the file was truncated during or after encoding. If you downloaded the file, check that the download completed fully โ compare the file size on disk against the expected size reported by the download source. Re-download if there is a discrepancy.
"Invalid sample rate: 0 Hz"
The sample rate field in STREAMINFO contains zero, which is outside the valid range (1โ655,350 Hz per the FLAC specification). A zero sample rate indicates a malformed STREAMINFO, usually produced by an encoder that failed to write the block correctly. The file cannot be played or decoded reliably. Re-encode from the source if available.
"Invalid bit depth or channel count"
The bits-per-sample or channel count field in STREAMINFO contains a value outside the valid range. Bit depth must be 4โ32; channel count must be 1โ8. Values outside these ranges indicate a corrupt or non-compliant STREAMINFO block.
Step 5 โ Review the Warnings Panel
If warnings were detected, a yellow Warnings panel appears listing each one. Warnings do not indicate a broken file โ the FLAC stream is structurally valid โ but they flag conditions that may cause problems in specific contexts:
"No VORBIS_COMMENT metadata block found"
The file has no embedded tags. It will play correctly in any FLAC decoder, but music library applications (Beets, foobar2000, Plex, Navidrome, MusicBrainz Picard) will have no track metadata to work with โ the track will appear as "Unknown Artist / Unknown Album." Add tags using a tag editor such as MusicBrainz Picard, Kid3, or EasyTag.
"VORBIS_COMMENT block is present but contains no tags"
A VORBIS_COMMENT block exists but it has zero key=value pairs. This sometimes happens when an encoder initialises the comment block but the tagging step is skipped or fails. The result is the same as having no tags at all from the library's perspective. Add tags using a tag editor.
"Unusual sample rate: [value] Hz"
The declared sample rate is valid per the FLAC specification but is not a standard consumer or professional audio rate (44,100, 48,000, 88,200, 96,000, 176,400, or 192,000 Hz). Non-standard rates like 44,056 Hz or 47,952 Hz can indicate a conversion artefact or hardware capture anomaly. The file will play in most decoders, but some streaming platforms or format converters may resample it automatically or reject it.
Step 6 โ Read the Valid File Details
When a file passes validation (green or yellow status), a teal "Valid FLAC" panel appears showing the audio parameters read from STREAMINFO:
- Sample Rate. In Hz โ e.g., 44100 Hz for CD quality, 96000 Hz for hi-res. Verify this matches what you expect for the recording.
- Bit Depth. Bits per sample โ 16 for CD, 24 for studio/hi-res. A 32-bit file is unusual in consumer FLAC and may indicate a floating-point intermediate encode rather than a true 32-bit capture.
- Channels. The number of audio channels โ 1 (mono), 2 (stereo), 6 (5.1 surround), etc.
- Total Samples. The raw sample count declared in STREAMINFO. Divide by the sample rate to get the duration in seconds โ e.g., 10,584,000 samples at 44,100 Hz = 240 seconds = 4 minutes.
- Duration. Calculated from total samples and sample rate, displayed in minutes:seconds format.
- Minimum / Maximum Block Size. The range of block sizes used in the audio frames, in samples. These are internal FLAC encoding parameters and do not affect playback quality.
- Minimum / Maximum Frame Size. The range of compressed frame sizes in bytes. A maximum frame size of zero means the encoder did not write this value (it is optional per the specification).
Cross-check the sample rate, bit depth, and channels against what you expect for the file. If a 16-bit CD rip shows 24-bit, the file may have been upsampled. If a supposed stereo recording shows 1 channel, it may have been downmixed to mono at some point in the processing chain.
Step 7 โ Inspect the Vorbis Comment Tags
If the file contains a VORBIS_COMMENT block with at least one tag, a purple "Vorbis Comment โ Metadata" panel appears. It shows:
- Panel heading. If the VORBIS_COMMENT block includes a vendor string (the encoder identification field), it is shown in parentheses in the heading โ for example, "Vorbis Comment โ Metadata (reference libFLAC 1.4.3 20230624)" identifies the encoder version.
- Tag table. All key=value pairs from the VORBIS_COMMENT block, displayed as a two-column table with Field and Value columns. Standard fields include TITLE, ARTIST, ALBUM, ALBUMARTIST, DATE, TRACKNUMBER, DISCNUMBER, GENRE, and COMMENT. Any custom fields the tagger added also appear here.
Use this panel to confirm the tags are present and correct before ingesting the file into a music library or submitting it to a streaming platform. Common things to check:
- TITLE is not blank or set to a filename
- ARTIST and ALBUMARTIST are present and spelled consistently
- TRACKNUMBER uses the format
NorN/Total(e.g.,3or3/12) - DATE is a four-digit year or full ISO date
- No unexpected fields that a previous tool may have injected
Worked Examples
Example 1: Downloaded FLAC that refuses to play
Situation: You downloaded a FLAC album from a music store. One track fails to play in your media player.
What to do: Drop the file into the Flac Validator. If the status bar shows red with "Not a FLAC file โ magic bytes mismatch", the download was corrupted or the wrong file was delivered. Re-download the track. If the status shows "STREAMINFO block missing or not first", the file's internal structure is malformed โ re-download. If the status is green but playback still fails in one specific player, the issue is with the player's codec rather than the file.
Example 2: Ripped CD tracks showing wrong metadata in Plex
Situation: You ripped a CD to FLAC with a ripping tool and the tracks show as "Unknown Artist" in Plex.
What to do: Drop one of the FLAC files into the validator. If the Warnings panel shows "No VORBIS_COMMENT metadata block found" or the tag panel shows no tags, the ripping tool did not write tags. Use MusicBrainz Picard to look up and write the correct tags. After tagging, re-validate to confirm the VORBIS_COMMENT block now appears with the expected fields.
Example 3: Hi-res file showing unexpected parameters
Situation: You purchased a "24-bit / 96 kHz" FLAC from a hi-res music store. You want to confirm the file is actually what was advertised.
What to do: Drop the file into the Flac Validator. The green Valid FLAC panel will show the actual Sample Rate and Bit Depth read from STREAMINFO. If it shows 44100 Hz / 16-bit instead of the advertised 96000 Hz / 24-bit, the file may have been mislabeled by the store. This is sometimes called "hi-res fraud" in audiophile communities. Contact the store with the validator output as evidence.
Example 4: Archival validation of a large music collection
Situation: You maintain an archive of several thousand FLAC files on a NAS and want to confirm they haven't been corrupted by storage media degradation.
What to do: The browser-based Flac Validator is designed for individual file inspection. For bulk archival validation of thousands of files, use the command-line tool flac --test (which performs a full MD5 checksum verification) or metaflac --list (which reads and displays all metadata blocks). The browser tool is most useful for spot-checking individual suspect files and for environments where installing command-line tools is not practical.
Tips and Edge Cases
- Non-FLAC files with .flac extensions. If a file named
track.flacis actually an MP3 or AAC that was renamed, the magic bytes check will catch it immediately and report the mismatch. - Multi-channel FLAC. Files with 3โ8 channels (5.1, 7.1 surround) validate the same way as stereo files. The channel count is reported in the valid file panel.
- FLAC files embedded in other containers. Some FLAC audio is embedded inside an Ogg or MKV container (with
.oggor.mkvextensions). These are not raw FLAC files โ they will fail the magic bytes check because the container header appears before the FLAC stream marker. The Flac Validator only supports raw FLAC files (.flacextension). - Very large files. The tool processes files using the Web File API. It reads a limited portion of the file header and metadata blocks โ it does not decode the entire audio stream โ so even large files (500 MB+) validate quickly without loading the whole file into memory.
- Privacy. The file bytes are processed entirely in JavaScript running in your browser tab. No data is sent to any server. The tool works offline once the page has loaded.
- After fixing a file. If you re-encode or re-tag a FLAC file based on the validator's output, drag the new version onto the drop zone to re-validate. Click the โ button first to clear the previous result.
