Free OGG test files and sample generator

Open, royalty-free compressed audio format, common in games and open-source software.

Generate a .ogg file →

What is a .ogg file?

OGG: Ogg Vorbis Audio. Ogg is a container built around pages rather than a sample table: audio is split into packets, packets are grouped into pages, and every page carries its own checksum plus a lacing table describing how the packets inside are divided. It is the standard home for Opus, which is now the default codec for WebRTC and much of the web's real-time audio. One quirk catches implementers out, Ogg's CRC-32 uses the usual polynomial but without the bit reflection and inversions almost every other CRC-32 applies, so a conventional CRC produces a file every decoder rejects.

Why generate a test OGG file?

What you can put inside a .ogg file

You get 4 content options for OGG, so the file holds something meaningful rather than random padding: Silence, Tone (beep), Noise, Voice (synthetic). For OGG these are alternatives, so choose the one that matches what you need to test.

How a .ogg file is identified

Every .ogg file begins with 4F 67 67 53, "OggS", the start of every Ogg page. That is what a validator inspecting content rather than the file name looks for.

How the size lands on the exact byte

The padding extends the vendor string inside OpusTags. A comment field carries its own 4-byte length, so it cannot absorb a remainder of one or two bytes. The vendor string can.

Negative testing with broken OGG files

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 OGG content

[Binary audio], Vorbis, 44.1 kHz, stereo.

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 it in any browser, VLC or foobar2000, or inspect it with `opusinfo` / `ffprobe file.ogg`. Files here carry real Opus audio encoded by your browser. Note that Opus compresses silence extraordinarily well, a silent file of a given size runs far longer than a tone of the same size, which is correct rather than a fault.

Media type audio/ogg · extension .ogg · category Audio

Generate a .ogg file → · questions about sizes, privacy or cost are answered on the site FAQ.

Frequently asked questions about OGG files

What identifies a .ogg file?

A .ogg file begins with the bytes 4F 67 67 53, "OggS", the start of every Ogg page. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.

How can a .ogg file be an exact number of bytes?

The padding extends the vendor string inside OpusTags. A comment field carries its own 4-byte length, so it cannot absorb a remainder of one or two bytes. The vendor string can.

What can go inside the OGG file?

There are 4 content options for .ogg: Silence, Tone (beep), Noise, Voice (synthetic). For OGG these are alternatives, so pick the one matching what you need to test.

Can I download several broken OGG files at once?

Yes, select more than one File Condition and you get one ZIP containing a .ogg per condition, each named after its condition.

Can the OGG file use UTF-16 or a byte-order mark?

No, and deliberately. A .ogg 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 OGG file?

Play it in any browser, VLC or foobar2000, or inspect it with opusinfo / ffprobe file.ogg. Files here carry real Opus audio encoded by your browser. Note that Opus compresses silence extraordinarily well, a silent file of a given size runs far longer than a tone of the same size, which is correct rather than a fault.

Related Audio formats

MP3 · WAV · FLAC · AAC · M4A · AIFF · AU · MIDI

Browse all file formats →